1
votes

After creating pair of keys and sending public key to server via ssh-copy-id i'm still not able to log in with no password

The output from ssh -v user@host

  • debug1: Found key in /home/pumba/.ssh/known_hosts:1
  • debug1: rekey after 134217728 blocks
  • debug1: SSH2_MSG_NEWKEYS sent
  • debug1: expecting SSH2_MSG_NEWKEYS
  • debug1: rekey after 134217728 blocks
  • debug1: SSH2_MSG_NEWKEYS received
  • debug1: SSH2_MSG_EXT_INFO received
  • debug1: kex_input_ext_info: server-sig-algs=
  • debug1: SSH2_MSG_SERVICE_ACCEPT received
  • debug1: Authentications that can continue: publickey,password
  • debug1: Next authentication method: publickey
  • debug1: Offering RSA public key: /home/pumba/.ssh/id_rsa
  • debug1: Authentications that can continue: publickey,password
  • debug1: Trying private key: /home/user/.ssh/id_dsa
  • debug1: Trying private key: /home/pumba/.ssh/id_ecdsa
  • debug1: Trying private key: /home/pumba/.ssh/id_ed25519
  • debug1: Next authentication method: password
1

1 Answers

1
votes

Debugging SSH Passwordless authentications:

Run in detailed debug mode -vvv

ssh -vvv user@host

Run with a specific key

ssh -i private_key user@host

Check File Permissions

~./ssh permissions should be 700

~./ssh should be owned by your account

~/.ssh/authorized_keys permissions should be 600

~/.ssh/authorized_keys should be owned by your account

Permissions in client:

/.ssh/config permissions should be 600

~/.ssh/id_* permissions should be 600

Check if your private key matches with public key

Local: ssh-keygen -y -f ~/.ssh/id_rsa

Server: cat ~/.ssh/authorized_keys