There are several alternatives:
- using expect (ref: http://www.linux-bsd-central.com/index.php/content/view/26/29/)
Create this file:
#!/usr/local/bin/expect
This will spawn sftp in batch mode and pass in the password shhh! to the program. SFTP will than execute all the commads in cmdFile
cmdFile:
lcd /home/ftp/test
cd /home/ftp/somedir
mput *.dat
lcd /home/ftp/test
cd /home/ftp/somedir
mput *.dat
lcd /home/recieving
cd /home/someotherdir
mget *.dat
cd /home/someotherdir
mget *.dat
- ssh public key
- using specific tools
No comments:
Post a Comment