ssh public key authentication
Mark Haney
mhaney at ercbroadband.org
Wed Jan 7 16:13:50 UTC 2009
Luca Ferrari wrote:
> Hi,
> I'd like a user to ssh another host (both ubuntu 8.1) without being prompted
> for a password, so I copied the rsa (and also dsa) public keys to the target
> host, added these keys to the authorized_keys file but when I do ssh I'm
> prompted for a password, and I don't understand why. Here's an excerpet of the
> debug messages of the ssh client:
>
> debug1: Next authentication method: publickey
> debug1: Trying private key: /var/backups/.ssh/identity
> debug3: no such identity: /var/backups/.ssh/identity
> debug1: Offering public key: /var/backups/.ssh/id_rsa
> debug3: send_pubkey_test
> debug2: we sent a publickey packet, wait for reply
> debug1: Authentications that can continue: publickey,password
> debug1: Offering public key: /var/backups/.ssh/id_dsa
> debug3: send_pubkey_test
> debug2: we sent a publickey packet, wait for reply
> debug1: Authentications that can continue: publickey,password
> debug2: we did not send a packet, disable method
> debug3: authmethod_lookup password
> debug3: remaining preferred: ,password
> debug3: authmethod_is_enabled password
>
>
> anyone has an idea of what the problem could be?
>
> Thanks,
> Luca
>
This bites me a lot. Check to make sure the ~/.ssh folder is set to 600
permissions, including all the files in it. If they /aren't/ set to
those permissions, it doesn't matter if the key is there, ssh won't
accept it.
That's almost always the problem I have, anyway.
--
Frustra laborant quotquot se calculationibus fatigant pro inventione
quadraturae circuli
Mark Haney
Sr. Systems Administrator
ERC Broadband
(828) 350-2415
Call (866) ERC-7110 for after hours support
More information about the ubuntu-users
mailing list