SCP script

Brad Crotchett brad at ispn.net
Tue Dec 3 22:08:43 CST 2002


Hi all,

I am trying to write a script that will run under cron and scp a file
from one server to another at night.  I can run this command manually
just fine and it works:

	scp root at server1:/path_to_file /path_to_file_on_server2

But when I put it in an expect script, it looks like it is launching
scp, but it never prompts for a password and just hangs there.  Here is
the expect script:

send " scp root at server1:/path_to_file /path_to_file_on_server2r"
expect "root at server1's password:"
send "passwordr"

Am I missing something?  Any help is appreciated.

Brad




More information about the Kclug mailing list