views:

89

answers:

3

I need to do rsync by ssh and want to do it automatically without need of passing password for ssh manually.

+1  A: 

You should use a keyfile without passphrase for scripted ssh logins. This is obviously a security risk, take care that the keyfile itself is adequately secured.

Instructions for setting up passwordless ssh access

Fabian
There are no possibility for putting password in a text of command?
liysd
Not easily, there is no options for it in ssh
Fabian
+1  A: 

use a ssh key :

look at ssh-keygen and ssh-copy-id.

After that you can use an rsync this way :

rsync -a --stats --progress --delete /home/path server:path
Guillaume Lebourgeois
If I use key with ssh I write: ssh u@serv -i ./rsaBut how to do it in rsync?
liysd
If you put the key into your .ssh directory and give it a standard name (typically id_rsa / id_rsa.pub) it will be picked up automatically by rsync.
Craig Trader
A: 

You'll want to look here for details on what can/cannot be done with rsync. http://www.samba.org/rsync/documentation.html

revive