Connecting Tech Pros Worldwide Help | Site Map

Problem While doing Sftp

Newbie
 
Join Date: Feb 2009
Posts: 5
#1: Feb 24 '09
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
gpraghuram's Avatar
Expert
 
Join Date: Mar 2007
Location: Chennai
Posts: 1,256
#2: Feb 25 '09

re: Problem While doing Sftp


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
jonthysell's Avatar
Newbie
 
Join Date: Sep 2008
Location: Redmond, WA
Posts: 6
#3: Mar 6 '09

re: Problem While doing Sftp


If you're using sftp, why not use scp: http://www.hypexr.org/linux_scp_help.php
Reply


Similar Unix / Linux / BSD bytes