[PLUG] scp in batch mode -- help
Bruce Kingsland
brucek at kingkon.com
Thu Nov 21 14:17:13 UTC 2002
Matt King's Log: StarDate 1112.1410:
> 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.
Did all that. It still asks for a password.
After being frustrated with pacifier using OpenBSD, and the multitude
of things that are different there, I looked at the ISP I'm dialing
in to.
That ISP uses linux 2.4.18, with all the expected files in place.
So, some one else suggested that I use rsync (not available on the BSD
system).
And I created a new user (ipsync) on my local system that will do
nothing except this update function, so that I don't have to muck with
my keys that I use for other systems.
ran ssh-keygen as the new user. created a cron entry to run the ip
update script. The script works, except for the last bit:
RSYNC_PASSWORD=itsAsecret
export RSYNC_PASSWORD
rsync -e ssh -logptrvz renegaid.html asavage at ncplus.net:www/
This _always_ asks for a password if run by hand, and always reports:
Permission denied, please try again.
Permission denied, (publickey,password).
unexpected EOF in read_timeout
when running in the cron. Once I get this working, I'll post the full
script.
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
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 232 bytes
Desc: not available
URL: <http://lists.pdxlinux.org/pipermail/plug/attachments/20021121/0672b08a/attachment.asc>
More information about the PLUG
mailing list