Abu Abdallah Abu Abdallah - 4 years ago 182
Bash Question

Fedora 23 passwordless ssh key not working in automated host addition

I have installed Fedora 23 and have tried to do a passwordless login with:

# ssh-copy-id ~/.ssh/id_dsa.pub user@host

which successfully copies the key to the host machine and I have checked in the host machine in:

# tail -n10 ~/.ssh/authorized_keys

and my PC name exists as the last line but when trying to login:

# ssh user@host

I am asked for a password! I have tried to login to Ubuntu and CentOS and get the same result. I have done this previously with multiple linux distros including Fedora 21, CentOS and Ubuntu and it works just fine.

I need this to do finish the automated host addition script which adds a host and then logs in automatically (add_user_host):

ssh-copy-id ~/.ssh/id_dsa.pub $1@$2;
ssh $1@$2;

all you would do is run:

# add_user_host user host

Answer Source

Openssh-7.0 obsoleted DSA keys. To use them you need to specify PubkeyAcceptedKeyTypes +ssh-dss in your ssh_config (as mentioned in your linked thread) to make them working, or rather use other keys (RSA, ed25519).

This case has also its page on official webseite and part in release notes.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download