[Discuss] hosts.equiv
Dan Ritter
dsr at randomstring.org
Fri Sep 14 09:51:12 EDT 2012
On Fri, Sep 14, 2012 at 08:40:44AM -0400, dan moylan wrote:
>
> i have a script to rsync a number of directories between two
> computers on my local net and would like to avoid having to
> enter my password for each one. i thought i could do this
> using hosts.equiv, but it's not working for me. i solved
> this once before a number of years ago, but i'm undoubtedly
> forgetting something now. any help would be appreciated.
Create an ssh key:
ssh-keygen -t rsa -b 2048
Change the filename to "rsync.key"
Don't put in a passphrase.
man sshd. Read the section on Authorized_Keys file format.
Add restrictions to rsync.key.pub: no-agent-forwarding,
no-port-forwarding, no-pty, no-X11-forwarding, perhaps a from
restriction. Make it tight. command = rsync?
Copy rsync.key.pub with the restrictions to your remote machine,
and cat it to the end of ~/.ssh/authorized_keys
When you run rsync, pass it "-e ssh -i /home/jdm/.ssh/rsync.key"
You should have a fairly safe passwordless rsync.
-dsr-
More information about the Discuss
mailing list