Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sftp on solaris.

Status
Not open for further replies.

aswolff

Programmer
Jul 31, 2006
100
US
Hello,

I would like to use sftp to transfer files...I am wondering if it works anything like regular ftp redirect a file of commands to execute:

sftp -vn <ftpcommand

where ftpcommand is text file of commands to execute:

Code:
open my.site.com
user myuser mypasswd
put myfile
quit

Thanks.
 
sftp is just a command interface to scp (it kind of looks like ftp). So the easiest way to automate things is to use key authentication and scp.
 
If you need fancy commands you could also use expect in combination with what elgrandeperro suggested.
 
Quick answer: SFTP will allow you to specify a batch file just like FTP does. Unsure as to whether you can put the user/pass in it though. If that's the case you're best to create an RSA or DSA certificate and use that for authentication.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top