Issue
Yesterday, I've change the hard disk of my laptop. I used it for configure many servers ( I remote them by ssh key).
I've copy id_dsa and id_dsa.pub from the old hard drive to a usb key.
After install my new Debian on my new hard drive, I've put them to /.ssh of my user and try to connect to my server but I had "Permission denied (publickey)".
I've search on the web, and try some solution like change permission with "chmod 600" but it don't works.
Would you have any idea for my problem please ?
Solution
I guess you updated your system and also the versions of openssh to 7.x. This version obsoleted DSA keys:
- Support for ssh-dss, ssh-dss-cert-* host and user keys is disabled by default at run-time. These may be re-enabled using the instructions at http://www.openssh.com/legacy.html
If you want to use them, you need to modify your ~/.ssh/config
:
PubkeyAcceptedKeyTypes=+ssh-dss
or you can specify the command directly on command line:
ssh -o PubkeyAcceptedKeyTypes=+ssh-dss your_server
Answered By - Jakuje