1820592 Members
1878 Online
109626 Solutions
New Discussion юеВ

RSYNC PASSWORD

 
meekrob
Super Advisor

RSYNC PASSWORD

Hi ,
i have 2 servers running HP-UX 11.23 ,
i have installed Rsync on both servers,
Rsync work properly ,but my problem is that it asks me always for a password
rsync -av /tm/test node2:/tmp/test1
password:
when i put the root password of the node2 server thersync work well
but how can i eliminate the question of password ,
i tried to put the password in a file and specify it in the --password-file option ,and i tried also the environnement variable rsync_password , also i tried to generate ssh keys with ssh-keygen -t rsa and not specifying a password , but all of these did not work , always i'm prompted for a password

can someone have ideas about that ?
thank u
4 REPLIES 4
Mel Burslan
Honored Contributor

Re: RSYNC PASSWORD

If you look in the man pages, you will see and option to specify passwords in a a file.

man rsync

then search for phrase:
password-file

Other than doing this, I think your only other option is to trust servers to each other using .rhosts file, which I would avoid, if I were you.
________________________________
UNIX because I majored in cryptology...
Steven E. Protter
Exalted Contributor

Re: RSYNC PASSWORD

Shalom Rue,

If you use the -e ssh option on rsync the authethtication and testing will be encrypted.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Bill Thorsteinson
Honored Contributor

Re: RSYNC PASSWORD

SSH keys won't work if there is a world
writeable directory in the path to the key.
The authorized_keys file should have
permisions 600 or 400. Likewise the private
key. Check permissions at both ends.

Try ssh to the destination server after
generating the keys there and adding the
server's public key to the client's
authorized_keys file. If that works then
rsync with ssh should work.
Don Mallory
Trusted Contributor

Re: RSYNC PASSWORD

If you don't specify a -e value, ssh is assumed in rsync 2.6.x. Otherwise, you have to use -e remsh. Noting of course that remsh is NOT secure by any means and all data including passwords would be transferred in clear text.

Also note that using ssh will increase the packet overhead by 100% for encryption, so, if it's completely internal and speed is your greatest concern, you may want to enable using remsh instead.

I've done extensive testing for speed and can definitively note that remsh is fastest, add a checksum (-c) and it will slow down, also adding ssh will half the speed, and further loss with a checksum again.

Ensure that remsh (or ssh) is in the path on the other end, otherwise it won't work. Same goes for rsync (unless you use the --rsync-path= option.)

Bill is right, test to see that you have passwordless authentication using ssh (or remsh / rlogin / rcp) Once that is working, rsync is good to go.

Remember, rsync is just a mirroring algorithm and. ssh or remsh is the transport medium.