1

I originally had a DSA public key in my ~/.ssh directory on my server id_dsa.pub. The corresponding private key id_dsa is stored on my local machine.

I then generated an RSA key pair directly inside the ~/.ssh directory on my server which now contains id_dsa.pub, id_rsa.pub and id_rsa.

Shortly after, I found myself unable to execute any bash commands. Commands such as ls and pwd were returning command not found.

I then terminated the ssh session and tried to reconnect. However, now I am getting Permission denied (publickey). What happens when you have both rsa and dsa keys in ~/.ssh directory, do either keys work or does the rsa key supercede the dsa key?

migrated from security.stackexchange.com Mar 1 '15 at 22:03

This question came from our site for information security professionals.

  • 2
    Either key would work. Whatever problem you're having is unrelated to the keys. This is evident in that bash commands in your original session wouldn't care about the keys. Perhaps a disk failure on the server. – Gilles Mar 1 '15 at 15:58
  • Thanks. Quite a coincidence that both happened at the same time. My initial thought was that there was some kind of security mechanism that forced a logout, kind of like when you change a password on a website. – limbenjamin Mar 1 '15 at 17:48
  • Show the output of ssh -v server. Is your /home on the server mounted from elsewhere? – ott-- Mar 1 '15 at 19:23
  • pastebin.com/asgd1Z9q. nope /home is on the same HDD as the root – limbenjamin Mar 1 '15 at 19:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.