SiHa
December 21st, 2008, 06:08 AM
I'm confused. I'm sure I've done something fundamentally stupid, but I can't fathom what it is.
Let me start by saying that I'm relatively new to linux, and this is my first foray any any sort of public/private key encryption, so I may be hazy on the terminology.
I'm trying to setup passwordless ssh authorization, I have done as follows.
On the host machine, I have run ssh-keygen and ssh-keygen -t dsa to create both dsa & rsa keys (rsa wasn't working, so I added dsa just in case). I have copied ~/.ssh/id_rsa.pub to ~/.ssh/authorized_keys on the remote machine, and added the contents of ~/.ssh/id_rsa.pub on the second line.
According to the manpages, I should now be able to ssh from the remote machine to the hostssh mythbox@ip.address.of.host
But I'm still prompted for the password. If I ssh with the -v switch, I get the following:debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Trying private key: /home/numpty/.ssh/identity
debug1: Trying private key: /home/numpty/.ssh/id_rsa
debug1: Offering public key: /home/numpty/.ssh/id_dsa
debug1: Server accepts key: pkalg ssh-dss blen 434
debug1: Next authentication method: password
where 'numpty' is the remote machine.
I'm guessing the problem is that the usernames are different on both machines ('numpty' on remote, 'mythbox' on host), but how to resolve this?
I'm stumped.
Very grateful for any help. Thanks.
Let me start by saying that I'm relatively new to linux, and this is my first foray any any sort of public/private key encryption, so I may be hazy on the terminology.
I'm trying to setup passwordless ssh authorization, I have done as follows.
On the host machine, I have run ssh-keygen and ssh-keygen -t dsa to create both dsa & rsa keys (rsa wasn't working, so I added dsa just in case). I have copied ~/.ssh/id_rsa.pub to ~/.ssh/authorized_keys on the remote machine, and added the contents of ~/.ssh/id_rsa.pub on the second line.
According to the manpages, I should now be able to ssh from the remote machine to the hostssh mythbox@ip.address.of.host
But I'm still prompted for the password. If I ssh with the -v switch, I get the following:debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Trying private key: /home/numpty/.ssh/identity
debug1: Trying private key: /home/numpty/.ssh/id_rsa
debug1: Offering public key: /home/numpty/.ssh/id_dsa
debug1: Server accepts key: pkalg ssh-dss blen 434
debug1: Next authentication method: password
where 'numpty' is the remote machine.
I'm guessing the problem is that the usernames are different on both machines ('numpty' on remote, 'mythbox' on host), but how to resolve this?
I'm stumped.
Very grateful for any help. Thanks.