SSH issue - can't get password less login to work

Hello,
I can't seem to get the password less login to work on one of my SLES 11 servers. My ssh agent lets me login to all my other servers, which are Solaris 10, RHEL 5, and SLES 11 servers. Some servers mount my home directory and others don't.

The server that I'm having an issue with doesn't mount my home directory. I can log in with my password. My agent on a Solaris 10 server is working with the other servers. Usually if the agent is not working it will ask for my passphrase, which leads me to believe it is a configuration issue.

I have copied my pub key over and put in authorized_keys file.

Any ideas?

sshd is very finicky about what permissions your ~/.ssh/ folder and your ~/ folder should have. Make sure your home folder isn't world-readable.

Corona688,
Thanks for replying. I looked at ~/.ssh and it indead had world right set. So I set it to 700. My home directory is 750.

I can still only login to the server with my password.

What does ssh -v -v show on login?

This my output.

bitlord@Solaris-server
< ssh -v Suse-server
Sun_SSH_1.1.4, SSH protocols 1.5/2.0, OpenSSL 0x0090704f
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Rhosts Authentication disabled, originating port will not be trusted.
debug1: ssh_connect: needpriv 0
debug1: Connecting to Suse-server [xxx.xxx.xxx.62] port 22.
debug1: Connection established.
debug1: identity file /home/bitlord/.ssh/identity type -1
debug1: identity file /home/bitlord/.ssh/id_rsa type 1
debug1: identity file /home/bitlord/.ssh/id_dsa type -1
debug1: Logging to host: Suse-server
debug1: Local user: bitlord Remote user: bitlord
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.1
debug1: match: OpenSSH_5.1 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-Sun_SSH_1.1.4
debug1: use_engine is 'yes'
debug1: pkcs11 engine initialized, now setting it as default for RSA, DSA, and symmetric ciphers
debug1: pkcs11 engine initialization complete
debug1:  Failed to acquire GSS-API credentials for any mechanisms (No  credentials were supplied, or the credentials were unavailable or  inaccessible
Unknown code 0
)
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-sha1 none
debug1: kex: client->server aes128-ctr hmac-sha1 none
debug1: Peer sent proposed langtags, ctos: 
debug1: Peer sent proposed langtags, stoc: 
debug1: We proposed langtags, ctos: en-US
debug1: We proposed langtags, stoc: en-US
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: dh_gen_key: priv key bits set: 168/320
debug1: bits set: 1059/2048
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Host 'Suse-server' is known and matches the RSA host key.
debug1: Found key in /home/bitlord/.ssh/known_hosts:125
debug1: bits set: 1021/2048
debug1: ssh_rsa_verify: signature correct
debug1: newkeys: mode 1
debug1: set_newkeys: setting new keys for 'out' mode
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: newkeys: mode 0
debug1: set_newkeys: setting new keys for 'in' mode
debug1: SSH2_MSG_NEWKEYS received
debug1: done: ssh_kex2.
debug1: send SSH2_MSG_SERVICE_REQUEST
debug1: got SSH2_MSG_SERVICE_ACCEPT
debug1: Authentications that can continue: publickey,keyboard-interactive
debug1: Next authentication method: publickey
debug1: Offering agent key: /home/bitlord/.ssh/id_rsa
debug1: Authentications that can continue: publickey,keyboard-interactive
debug1: Trying private key: /home/bitlord/.ssh/identity
debug1: Trying public key: /home/bitlord/.ssh/id_rsa
debug1: Authentications that can continue: publickey,keyboard-interactive
debug1: Trying private key: /home/bitlord/.ssh/id_dsa
debug1: Next authentication method: keyboard-interactive
Password: 
debug1: Authentication succeeded (keyboard-interactive)
debug1: channel 0: new [client-session]
debug1: send channel open 0
debug1: Entering interactive session.
debug1: ssh_session2_setup: id 0
debug1: channel request 0: env
debug1: channel request 0: pty-req
debug1: channel request 0: shell
debug1: fd 4 setting TCP_NODELAY
debug1: channel 0: open confirm rwindow 0 rmax 32768
Last login: Thu Apr  4 17:35:14 2013 from Solaris-server

---------- Post updated at 02:24 PM ---------- Previous update was at 02:11 PM ----------

I have compared the above output to the same output from a successful key exchange and the change happens after this point.

debug1: Offering agent key: /home/bitlord/.ssh/id_rsa

The public key is in ~/.ssh/authorized_keys on the remote box? - just checking; you
should too.

grep -i (remote node that does not work) authorized_keys

As an aside - you could never have logged in via any keys with your original permissions.

Thank you everyone for all your help. I now know why the keys was not working.

It was my fault. Basically there was a typo, I had autherized_keys instead of authorized_keys. I copied autherized_keys to authorized_keys and now everything works.

1 Like