OpenSSH 7.0 and greater similarly disables the ssh-dss (DSA) public key algorithm. It too is weak and we recommend against its use. It can be re-enabled using the HostkeyAlgorithms configuration option:

ssh -oHostKeyAlgorithms=+ssh-dss user@127.0.0.1

or in the ~/.ssh/config file:

Host somehost.example.org
HostkeyAlgorithms ssh-dss

So OK, but how do I enable it?

Lets see. Clearly we need to edit the file '/etc/ssh/sshd_config'.
So after having created a backup of this file (and having me ending up locked out several times), I added two and tow together and tried this:

vi /etc/ssh/sshd_config

Here I added the line

HostkeyAlgorithms ssh-dss

Then restart the SSH daemon

/etc/init.d/SSH restart

But. It still doesn't work.

OK, but I still think this is the right way to go.

Restore the backuped file.
So we add two and three together which looks like this:

vi /etc/ssh/sshd_config

Now I add the line

PubkeyAcceptedKeyTypes ssh-dss

Then again:

/etc/init.d/SSH restart

Et voilà. It works.

So all you have to do is add the line

PubkeyAcceptedKeyTypes ssh-dss

to the file ' /etc/ssh/sshd_config' and then restart the SSH daemon using