By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,542 Members | 1,740 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,542 IT Pros & Developers. It's quick & easy.

Problem While doing Sftp

P: 5
Hi Friends,

I tried to send some zips from local to remote location but the transfer is not sucess i can transfer the zips partially can some one assist me how to make it
as sucess

i had used the below code
Expand|Select|Wrap|Line Numbers
  1. #!/bin/sh
  2.  
  3. /usr/local/bin/expect <<EOF
  4.  
  5. spawn  sftp USERNAME@IPADDRESS
  6. expect "password:"
  7. send "Tgsf324a \r"
  8. expect "sftp> "
  9. send "cd /nas_ftp5/Customer/Troy/tbscclm/tmp/BSSFtp \r"
  10. expect "sftp> "
  11. send "lcd /forms/bscclmsa/outdata/bsca/b2collate/its/ready \r"
  12. expect "sftp> "
  13. send "put HOV_CLM_ATT_bsc20090223010100.md5 \r"
  14. expect "sftp> "
  15. send "lcd /forms/bscclmsa/outdata/bsca/b2collate/its/ready \r"
  16. expect "sftp> "
  17. send "put HOV_CLM_ATT_bsc20090223010100.zip \r"
  18. expect "sftp> "
  19. send "ls \r"
  20. expect "sftp> "
  21. send "bye "
  22. EOF
  23.  
Thanks in advance
siva
Feb 24 '09 #1
Share this Question
Share on Google+
2 Replies


gpraghuram
Expert 100+
P: 1,275
Hi,
R u getting any error when running the script?
Means when the file is uploaded did u get any error?
Do the normal FTP or scp works?

Raghu
Feb 25 '09 #2

jonthysell
P: 8
If you're using sftp, why not use scp: http://www.hypexr.org/linux_scp_help.php
Mar 6 '09 #3

Post your reply

Sign in to post your reply or Sign up for a free account.