Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I recently installed ubuntu 10.04 and trying to connect to remote servers with SSH, which is failing to connect with public key.

I created the DSA keys, then did a ssh-copy-id to the remote server which created the .ssh/authorized_keys file, and permissions of 600.

I have an SSH agent running on Ubuntu which accepts the password, but some of the remote systems (F5 Big IP load balancers) still prompt me for password.

I have verified the sshd_config file on the remote systems to validate nothing is different on from one system to another.

The Debug output on the one that works is as follows:

debug1: Authentications that can continue: publickey,keyboard-interactive
debug1: Next authentication method: publickey
debug1: Offering public key: /home/me/.ssh/id_dsa 
debug1: Server accepts key: pkalg ssh-dss blen 433 
debug1: Authentication succeeded (publickey).
debug1: channel 0: new [client-session] 
debug1: Entering interactive session. 
debug1: Sending environment. 
debug1: Sending env LANG = en_US.UTF-8 

The debug output of the failed system is as follows:

debug1: Authentications that can continue: publickey,keyboard-interactive 
debug1: Next authentication method: publickey 
debug1: Offering public key: /home/me/.ssh/id_dsa 
debug1: Authentications that can continue: publickey,keyboard-interactive 
debug1: Trying private key: /home/me/.ssh/id_rsa 
debug1: Next authentication method: keyboard-interactive 
Password:

The authorized_keys file are identical on each system, with the same permissions, and the sshd_config file are identical, as well as versions of SSH.

share|improve this question
    
Maybe it's a typo, but "I created the dsa keys, then did a ssh-copy-id to the remote server" makes me wonder if you did a ssh-copy-id to each server. The lack of a message like "debug1: Server accepts key: pkalg ssh-dss blen 433" in the failure case makes me wonder if that server really does have your key. –  waltinator Jan 5 '12 at 20:03
add comment

1 Answer

The info you posted looks fine. Out of curiosity, why are you using dsa keys instead of rsa? Check the permissions and ownership on all files and directories (ie: ./.ssh/) Is the user account locked? (can you login with the password?) Failing that, check the server log file, which should tell you why it is refusing the public key (you may want to start the server in more verbose mode if it isn't immediately clear why) - comparing the one that works with the one that does not for clues.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.