[PLUG] scp in batch mode -- help
Matt King
plug at magnetinternet.com
Tue Nov 12 22:10:35 UTC 2002
Put the public_key into the .ssh/authorized_keys2 file on the server you
want to send the files to...here's how I do it (YMMV).
Machine1 = Local Machine
Machine2 = Remote Machine
[Machine1]: ssh-keygen -t rsa
On this step don't enter a passphrase for the key.
[Machine1]: scp .ssh/id_rsa.pub [youruser]@[Machine2]:~/.ssh/authorized_keys2
Or if you have an authorized_keys2 file on Machine2, copy it to your home
directory, ssh to Machine2, and do 'cat id_rsa.pub >>
.ssh/authorized_keys2'
Now you should be able to login without a password. At least that's what
worked for me.
--
Matt King
magnet | internet
http://www.magnetinternet.com
Bruce Kingsland busted out the keyboard and typed:
> I want to scp a file to a remote server in a cron job. scp provides the
> -B switch to support that, but I haven't figgered out from the docs
> where I put the passphraze so that the command will work. The remote
> server doesn't support sftp, but does support ssh and scp (and ftp). Any
> ideas?
>
> TIA.
> -bk
> --
> Bruce Kingsland
> Kingsland Konsulting
> brucek at kingkon.com
> 360-531-3730
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> D/2B8DA3D7 g/2884A18E 49C3 BBDE 6BC5 3F39 0C03 3BE4 FBC5 2C8D 2B8D
> A3D7
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
More information about the PLUG
mailing list