Enabling publickey authentication for server's sshd
        Posted  
        
            by aaron
        on Server Fault
        
        See other posts from Server Fault
        
            or by aaron
        
        
        
        Published on 2010-03-15T12:29:13Z
        Indexed on 
            2010/03/15
            12:29 UTC
        
        
        Read the original article
        Hit count: 577
        
I have two servers running RHEL 5. Both have nearly identical configurations. I have set up RSA Publickey authetication on both, and one works but the other does not:
[my_user@client] $ ssh my_user@server1
--- server1 MOTD Banner ---
[my_user@server1] $
and on the other server:
[my_user@client] $ ssh my_user@server2
my_user@server2's password:
--- server2 MOTD Banner ---
[my_user@server2] $
server2's /etc/ssh/sshd_config file snippet:
RSAAuthentication yes
PubkeyAuthentication yes
AuthorizedKeysFile        .ssh/authorized_keys
When I run ssh -vvv I get the following snippet:
debug3: authmethod_lookup publickey
debug3: remaining preferred: keyboard-interactive,password
debug3: authmethod_is_enabled publickey
debug3: Next authentication method: publickey
debug1: Offering public key: /home/my_user/.ssh/id_rsa
debug3: send_pubkey_test
debug2: we sent a publickey packet, wait for reply
debug1: Authentication that can continue: publickey,gssapi-with-mic,passowrd
debug1: Offering public key: /home/my_user/.ssh/id_dsa
debug3: send_pubkey_test
debug2: we sent a publickey packet, wait for reply
debug1: Authentication that can continue: publickey,gssapi-with-mic,passowrd
debug3: authmethod_lookup password
debug3: remaining preferred: ,password
debug3: authmethod_is_enabled password
debug1: Next authentication method: password
my_user@server2's password:
        © Server Fault or respective owner