Reputation: 4475
I have followed SSH Git without having to type in my password every time
but now I still have to type password every time.
[root@web2 .ssh]# pwd
/home/git/.ssh
[root@web2 .ssh]# /etc/init.d/sshd restart
Stopping sshd: [ OK ]
Starting sshd: [ OK ]
------------
caojinhuamatoMacBook-Pro:.ssh caojinhua$ ssh -p 2332 [email protected]
The authenticity of host '[xx.xx.xx.xxx]:2332 ([xx.xx.xx.xxx]:2332)' can't be established.
RSA key fingerprint is 9b:e6:97:b1:a7:22:bd:b3:20:57:f3:0b:01:4e:b7:eb.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '[xx.xx.xx.xxx]:2332' (RSA) to the list of known hosts.
[email protected]'s password:
Last login: Mon Jun 27 11:00:16 2011 from 121.x8.23x.1x3
[git@web2 ~]$
Upvotes: 0
Views: 709
Reputation: 13763
Either you didn't add the key correctly, the key was in the wrong format, you have a permission problem, or the SSH configuration on the host is only allowing password authentication.
Of the four possibilities, the second is the most likely. If you cut and paste an SSH.com-format key into authorized_keys for example, it won't work. You have to convert it to an OpenSSH format first.
What does your public key look like in authorized_keys? (There's no harm in posting it - it's a public key after all)
Upvotes: 0
Reputation: 1867
You should make sure the permission for ~/.ssh/authorized_keys
is 600.
Upvotes: 1