Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Linux Links | Bling | About BLU

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Discuss] hosts.equiv



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-



BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org