Unix Shell - Re: sftp script need....

This is Interesting: Free IT Magazines  
Home > Archive > Unix Shell > February 2006 > Re: sftp script need....





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Re: sftp script need....
grulos

2006-02-20, 2:48 am


mail2me wrote:
> How can I make a sftp scipt including password ? (script file includes 1,2,3
> procedure)


the best thing to do is generate authentication keys and use scp.
man ssh-keygen

otherwise (if you have expect) something as ugly as this would do the
job:

#!/usr/bin/expect
spawn sftp user@host
expect "password:"
send "mypass\n"
expect "sftp> "
send "mkdir test_from_script\n"
expect "sftp> "
send "bye\n"


--
http://grulos.blogspot.com/

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com