[K12OSN] remote home directories/CRON?SSH

mrgoblin goblin at scooter.co.nz
Fri Sep 9 09:32:35 UTC 2005


> You had it almost right the first time.  The key pairs are
> generated on the initiating machine but you copy the
> public key to /root/.ssh/authorized_keys2 on the target
> machine (actually you append to this file but if there
> is only one key it won't matter).  If you want it to
> run under cron you need to use an empty passphrase
> when you create the keys.
> 
> Conceptually, what happens is that the ssh program
> (connecting client) must have read access to the
> private key, and the target sshd uses the public
> key to make it prove that before accepting who
> it says it is.  Ssh is very picky about permissions
> on the .ssh directory and above - for good reasons.
> If you have trouble with a passwordless connection
> you might find the reason by using ssh -v or
> by looking at /var/log/secure on the server side.

I find "ssh-copy-id" good for this as it copies your public key and
takes care of permissions too.

mrgoblin






More information about the K12OSN mailing list