Hi!I've a problem using ssh without password: I want use rsync for automatic scripts,I'm using this 2 names for my asterisk@home2.5 linux (based on red hat), rsync11 and rsync12. This is the way I use to change the configuration and then using without password , but the password is always asked: [rsync11@asterisk11]$ ssh-keygen -t rsa Generating public/private rsa key pair. Enter file in which to save the key (/home/rsync11/.ssh/id_rsa): Created directory '/home/user1/.ssh'. Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /home/rsync11/.ssh/id_rsa. Your public key has been saved in /home/rsync11/.ssh/id_rsa.pub. The key fingerprint is: 31:df:a5:73:4a:2f:a6:6c:1c:32:a2:f2:b3:c5:a7:1f rsync11@asterisk11 [rsync11@asterisk11]$ ssh -l rsync12 asterisk12 mkdir -p .ssh rsync12@asterisk12's password: [rsync11@asterisk11]$ cat .ssh/id_rsa.pub | ssh -l rsync12 192.168.251.12 \>'cat >> .ssh/authorized_keys'rsync12@asterisk12's password: I changed the permissions on the rsync12 like: [rsync12@asterisk12 .ssh]$ chmod 600 authorized_keys [rsync12@asterisk12 ~]$ chmod 700 .ssh and also for the asterisk11 inside the files authorized_keys there's the key right. [rsync12@asterisk12 .ssh]# vi authorized_keys ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAIEA3KjoZF979dIHasW108TesUKvC7vFMI2knsvhmg2aq2lh4kDdDYsBJBKnsA2mCR8B +BaCnn9ZmkeEy0S7HY2V36b8cGX+cHaCZ4ZCsb+VRp38yMavrF9pykXcnD5NbXP0XIaordQhZktQyjNmGW1dbgvsacxM/MdSQmgaz1JzLFk= rsync11@asterisk11.local [rsync11@asterisk11 .ssh]$ vi authorized_keys ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAIEAvRFkfeGzbVJGlWsfXKxxbKEFfBs4ZZIHndlR/YpcgS/8buAxYfToahRC+GSl+ wkQ86c6BqYI/HpFOKoq0EE9nP+5Z1o4GftPTeqUzgfFD+vZtKuwQmmZAH/zuwsMLyjBht+wGBdQQrx36a7sRaEYLpHQHlGyk0ZEKYo+Rv66oXs= rsync12@asterisk12.local the same like root@asterisk11 or root@asterisk12. But if I use [rsync11@asterisk11]$ ssh -l rsync12 192.168.251.12 is always asked the password....and the same for [rsync12@asterisk12]$ ssh -l rsync11 192.168.251.11 where is the problem?rsync script can run in this way...is always asked the password... 1000000000000 thanks, Emanuele
On Mon, May 29, 2006 at 11:57:54AM +0200, sinidr@libero.it wrote:> [rsync11@asterisk11]$ ssh -l rsync12 192.168.251.12 > is always asked the password....and the same forIs ssh asking for the pass-phrase to unlock your private key? If so, you need to use an ssh-agent to unlock the key for more than one ssh command. See also the "keychain" project for one way to manage an ssh-agent (which also allows a user's ssh-using cron jobs to run). (You could alternately remove the pass-phrase from your private key, but using "keychain" should be safer than that.) If the prompt was actually for your password, then you need to configure ssh to allow PubkeyAuthentication (RSAAuthentication for protocol v1) and ensure that the AuthorizedKeysFile is what you're expecting. For instance, some setups have used .ssh/authorized_keys2 for protocol v2 connections (probably not a modern open-ssh setup, though). Another alternative you may (or may not) wish to consider is using HostbasedAuthentication (RhostsRSAAuthentication for protocol v1) instead of public-key authentication via ssh-agent. ..wayne..