This is very helpful. However, in my /root/.ssh directory I have: identity identity.pub known_hosts known_hosts2 I don't have the other files you mentioned. This is version 1. Thanks, Brad -----Forwarded Message----- > From: Chris Zwilling > To: Brad Crotchett > Cc: KCLUG > Subject: Re: SCP script > Date: 04 Dec 2002 11:30:56 -0600 > > > I think that the reason the script doesn't work is because the "Password" > prompt doesn't show up on .... it shows up on the tty via PAM > (?) > > What I would do here is set up user-host-key based authentication; > then the password requirement would disappear. Check to see if you have > a .ssh directory in your home directory. If so, check to see if you have > *.pub files in there. Those are your public keys that you can put in an > ~/.ssh/authorized_keys file on the server that you are ssh'ing (or > scp'ing) to. > > For SSH version 2: > $ cd .ssh > $ cat id_dsa.pub > > $ cd .ssh > $ vi authorized_keys2 > > > $ > > For SSH version 1: > $ cd .ssh > $ cat id_rsa.pub > > $ cd .ssh > $ vi authorized_keys > > > $ chmod 700 authorized_keys > $ chmod 600 . > > > SSH version 1 is picky about file and directory permissions. It is a good > idea to apply the same permissions to the version 2 files also. > > It is important to use 'cat' (not 'more' or 'less') to display the key > because 'cat' will not put in line breaks (where others may break up the > lines when the right edge of the tty is hit...). Also, it is important to > create/edit the authorized_keys[2] files with an editor that doesn't do > word or line wrap. > > Once the files are created, you should be able to 'ssh' to the server > without a password. The first time you ssh to the server, it may ask you > to verify the server's host key. > > [czwillin@solstice czwillin]$ ssh admin > Last login: Tue Dec 3 17:24:33 2002 from 10.XXX.XXX.XXX > Sun Microsystems Inc. SunOS 5.8 Generic February 2000 > > NOTICE: For security reasons, please use ssh and/or scp when logging into > other Sun servers and/or transfering files. > > [czwillin@admin czwillin]$ exit > logout > Connection to admin closed. > [czwillin@solstice czwillin]$ scp Sony_4mm_Data.pdf admin: > Sony_4mm_Data.pdf 100% |*****************************| 6223 KB 00:01 > [czwillin@solstice czwillin]$ > > I hope this helps! > :) > > > > > send " scp root@server1:/path_to_file /path_to_file_on_server2r" > > > > expect "root@server1's password:" > > > > send "passwordr" > > > > > > I'd change the expect line to just "password:" Its possible that the name > > > may be resolved and displayed differently under cron since cron may be the > > > owner of that job. > > > > > > > > > > > > > > > ;--------------------------------; > ; The problem with reality is ; chris@nukequarters.com > ; that there isn't a coherent ; http://www.nukequarters.com > ; soundtrack. ; > ;--------------------------------; >