From one day to another, our company server started to ask me for my SSH password.
First thing that I checked was to see if my key was inside .ssh/authorized_keys on the server. My key was inside, nothing changed. Also in /etc/ssh/sshd_config nothing has changed.
Then I tried to do this procedure on freshly installed Ubuntu16 server. After completing these 5 steps, new server asked me again for SSH password.
The ssh-copy-id command has finally accomplished keyless SSH login, but I have noticed that that .ssh/authorized_keys has three lines: one starting with ssh-dss and 2x starting with ssh-rsa
Now I remember that 5 steps procedure from the link above has worked in the past with only one key.
Has something changed recently? Why procedure from above does not work anymore?
Edit:
Since ssh-copy-id copies altogether 3 keys to .ssh/authorized_keys those keys can be found in following files:
~/.ssh/id_dsa
~/.ssh/sshkey.pub
~/.ssh/id_rsa.pub
so I deleted line by line from remote's .ssh/authorized_keys file
deleted ~/.ssh/id_dsa line - auto login succeeded
deleted ~/.ssh/id_rsa.pub line - auto login succeeded
deleted ~/.ssh/sshkey.pub line - auto login not succeeded - asked for password
Only content from ~/.ssh/sshkey.pub is necessary.
Why SSH is comparing sshkey.pub and not id_rsa.pub like in the example from online tutorial?