- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: sftp batch not working
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
Forums
Discussions
Discussions
Discussions
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
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
03-31-2009 01:39 PM
03-31-2009 01:39 PM
I'm trying to set up an SFTP batch file. When I execute the batch file it just hangs and eventually times out. I can connect and transfer the file interactively. I've sent my public key and am not prompted for a pw when logging on to the remote server. I'm on an rx4640 running 11.23. What do I have wrong?
sftp -b batchfilename.sftp mylogin@remote.com
Batch file:
sftp mylogin@remote.com>>EOF
put /home/rocky/somefile.csv
quit
EOF
Thanks,
Rocky
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-31-2009 01:44 PM
03-31-2009 01:44 PM
Re: sftp batch not working
You have:
sftp mylogin@remote.com>>EOF
Try:
sftp -b mylogin@remote.com << EOF
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-31-2009 02:02 PM
03-31-2009 02:02 PM
Re: sftp batch not working
Thanks for the reply - I made the change and it still hangs. Anything else I can look at?
Thanks,
Rocky
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-31-2009 02:21 PM
03-31-2009 02:21 PM
Solution> sftp mylogin@remote.com>>EOF
I don't do much with SFTP, so I know nothing,
but I'd expect an SFTP batch file to contain
a list of SFTP commands, not a shell script.
So, these look out-of-place to me:
sftp mylogin@remote.com>>EOF
EOF
but these look plausible:
put /home/rocky/somefile.csv
quit
(although I'd expect "quit" to be optional).
If you want to use a shell script with a
here-document in it, then it's a shell
script, not an SFTP batch file.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-31-2009 02:29 PM
03-31-2009 02:29 PM
Re: sftp batch not working
I changed my batch file to:
put /home/rocky/somefile.csv
quit
and it works.
Thanks for the help,
Rocky