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.
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
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?
ssh-copy-id copies altogether 3 keys to
.ssh/authorized_keys those keys can be found in following files:
so I deleted line by line from remote's
~/.ssh/id_dsa line - auto login succeeded
~/.ssh/id_rsa.pub line - auto login succeeded
~/.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?