- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- ftp in shell script
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-23-2002 05:04 PM
тАО01-23-2002 05:04 PM
ftp in shell script
I tried "user account password" and
"USER & PASS". But I was still prompted
for a password.
I am ftping to a windows server from a HPUX server.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-23-2002 05:19 PM
тАО01-23-2002 05:19 PM
Re: ftp in shell script
You can try to use "ftp -i -n" instead.
If can't, put all the commands in a file and use "ftp -i -n < file", eg.
#file
open xxx.xxx.xxx.xxx
user USER PASSWORD
get file
bye
Then in the shell script, put this line:
ftp -i -n < file
Hope this helps.
Kenny.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-23-2002 05:19 PM
тАО01-23-2002 05:19 PM
Re: ftp in shell script
I had previously written this script for my user for non-interactive file transfers:
=========================================
#!/sbin/sh
ftp -i -n FTP_SERVER <
put
EOF
=========================================
Hope this helps. Regards.
Steven Sim Kok Leong
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-23-2002 06:07 PM
тАО01-23-2002 06:07 PM
Re: ftp in shell script
Try this,
ftp -n server_name_or_ip <
bin
ascii
put ...
get ..
...
other ftp commands
...
..
bye
EndFTP
Hope this helps.
Regds
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-23-2002 06:36 PM
тАО01-23-2002 06:36 PM
Re: ftp in shell script
The best ftp scripting I've seen, is something that Clay showed us a while back:
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xc88106295e00d6118ff40090279cd0f9,00.html
live free or die
harry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-23-2002 08:20 PM
тАО01-23-2002 08:20 PM
Re: ftp in shell script
ftp -vin $rhost <
cd $scrdir
lcd $destdir
EOF
But it keeps asking me for a password.
I also tried,
ftp -vin $rhost <
pass
cd $scrdir
lcd $destdir
EOF
Also failed...probably the problem is the other end...an NT server
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-24-2002 02:09 AM
тАО01-24-2002 02:09 AM
Re: ftp in shell script
try
ftp -i -n <
user login passwd
pwd
close
bye
EOF
It works for me
Steve Steel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-24-2002 05:33 AM
тАО01-24-2002 05:33 AM
Re: ftp in shell script
The easiest way to send USER and PASS from script is .netrc file in users home directory.
#cd
#echo 'machine ftp.xxxx.com login USER password PASS' >> .netrc
#chmod 600 .netrc
#ftp ftp.xxxx.com
Sure Clay's way to write ftp scripts with perl allows more abiliies to trap errors and stuff like that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-24-2002 05:38 AM
тАО01-24-2002 05:38 AM
Re: ftp in shell script
You can't FTP to an NT server, or any M$ system unless that NT system is running an FTP daemon. You'll find some ftp server stuff here for M$ products:
http://www.webattack.com/Freeware/server/fwftpserver.shtml
live free or die
harry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-24-2002 05:51 AM
тАО01-24-2002 05:51 AM
Re: ftp in shell script
If you are able to see the prompt for a password, then your FTP connection is likely to be established.
What FTP daemon program are you using ie. Microsoft FTP service that comes with IIS (Internet Information Server)?
Or, are you using other third-party FTP daemon programs?
Hope this helps. Regards.
Steven Sim Kok Leong
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-24-2002 02:16 PM
тАО01-24-2002 02:16 PM