I am trying to get ssh public key authenitcation to work, but I'm always greeted with a password prompt. I did the following:
1.) Created a public/private key pair via
Code:
$ ssh-keygen -b 2048 -t dsa
2.) scp'd the id_dsa.pub file to the remote server and added it to the authorized_keys file via
Code:
$ cat id_dsa.pub >>authorized_keys
3.) added the private key to my ssh-agent via
In the sshd_conf file on the remote machine, PubkeyAuthentication is set to yes, so it should work. Logging in via password authentication also works fine. So what is the poblem?
PS: This is the ssh output with the -vvv option enabled (abridged):
Code:
(...)
debug2: service_accept: ssh-userauth
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug2: key: /home/lo/.ssh/id_dsa (0x8090518)
debug2: key: /home/lo/.ssh/identity ((nil))
debug2: key: /home/lo/.ssh/id_rsa ((nil))
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug3: start over, passed a different list publickey,password,keyboard-interactive
debug3: preferred publickey,keyboard-interactive,password
debug3: authmethod_lookup publickey
debug3: remaining preferred: keyboard-interactive,password
debug3: authmethod_is_enabled publickey
debug1: Next authentication method: publickey
debug1: Offering public key: /home/lo/.ssh/id_dsa
debug3: send_pubkey_test
debug2: we sent a publickey packet, wait for reply
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: Trying private key: /home/lo/.ssh/identity
debug3: no such identity: /home/lo/.ssh/identity
debug1: Trying private key: /home/lo/.ssh/id_rsa
debug3: no such identity: /home/lo/.ssh/id_rsa
debug2: we did not send a packet, disable method
debug3: authmethod_lookup keyboard-interactive
debug3: remaining preferred: password
debug3: authmethod_is_enabled keyboard-interactive
debug1: Next authentication method: keyboard-interactive
debug2: userauth_kbdint
debug2: we sent a keyboard-interactive packet, wait for reply
debug2: input_userauth_info_req
debug2: input_userauth_info_req: num_prompts 1
Password: