ssh Notes

I had an odd problem using ssh that stumped me for a bit.
Using ssh -vvv user@host
Cutting out all the fluf we see that normally (when using a public key) we get something like the following
……………………
debug1: Next authentication method: publickey
debug1: Trying private key: /home/user/.ssh/identity
debug3: no such identity: /home/user/.ssh/identity
debug1: Trying private key: /home/user/.ssh/id_rsa
debug3: no such identity: /home/user/.ssh/id_rsa
debug1: Offering public key: /home/user/.ssh/id_dsa
debug3: send_pubkey_test
debug2: we sent a publickey packet, wait for reply
debug1: Server accepts key: pkalg ssh-dss blen 433
debug2: input_userauth_pk_ok:
debug3: sign_and_send_pubkey
debug1: read PEM private key done: type DSA
…………………..
I noticed that I had changed the perms on the users directory from
drwxr-xr-x 33 user user 2048 Aug 14 18:57 user
To
drwxrwxr-x 33 user user 2048 Aug 14 18:57 user
This meant that I lost access using public keys. The verbose output with this error is as follows.
………….
debug3: authmethod_is_enabled publickey
debug1: Next authentication method: publickey
debug1: Trying private key: /home/user/.ssh/identity
debug3: no such identity: /home/user/.ssh/identity
debug1: Trying private key: /home/user/.ssh/id_rsa
debug3: no such identity: /home/user/.ssh/id_rsa
debug1: Offering public key: /home/user/.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
debug2: we did not send a packet, disable method
debug3: authmethod_lookup keyboard-interactive
debug3: remaining preferred: password
debug3: authmethod_is_enabled keyboard-interactive
……………..
Removing group writable permissions from the users home directory solved the problem.

Leave a Reply

Your email address will not be published. Required fields are marked *