I somehow managed to delete all the files in "/etc/ssh/" folder, I know I'm missing at least "/etc/ssh/ssh_config" and maybething else. Therefor I'm not able to connect to my PI through putty anymore.

I was manage to create new

/etc/ssh/ssh_host_rsa_key /etc/ssh/ssh_host_dsa_key /etc/ssh/ssh_host_ecdsa_key

Keys, can anyone provide me default config files that belong there?

Reinstalling ssh from command line didn't create then new ones automatically for me.

1 Answer 1


Try to purge your installation first:

sudo apt-get purge ssh

And then reinstall, it should recreate configuration files.

  • Unfortunately purge and then reinstallation didn't work, it still didn't create the new config files. I am able to connect to machine through ftp (I have vftps setup) but when I connect with xming I get connection refused, I'm pretty sure because the conf on my raspberry is missing... is there anyway to download the default conf files from the repo? I imagine they should be generic, at least in the beginning.
    – Badr Hari
    Feb 18, 2014 at 11:27
  • Is it possible for you to provide me ssh_config and sshd_config files (I believe they are the 2 needed besides keys), it would save me a lot of time compared to reinstalling everything.
    – Badr Hari
    Feb 18, 2014 at 15:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.