enter image description here

I installed openssh, but I can't find the .ssh directory. Could anyone be able to tell me where could I find this directory?

P.S. I installed Ubuntu 16.10 as a virtual machine.

  • 1
    The .ssh directory is not by default created below your home directory. When you call ssh somehost (replace 'somehost' by the name or IP of a host running sshd), the directory and the file .ssh/known_hosts will be created. Instead, you may create it with mkdir ~/.ssh. – ridgy Dec 9 '16 at 16:14
  • Try restarting the system, and if doesn't work remove with sudo apt remove then re-install – George Udosen Dec 9 '16 at 16:19
  • 1
    As you have openssh-server installed (and should be running) as well, you just may issue ssh localhost and reply yes when asked to continue connection. – ridgy Dec 9 '16 at 16:24

The file is not created by the installation, but upon the first use of ssh or ssh-keygen. If it is not there, there is nothing to worry about. You can simply create it using mkdir ~/.ssh/.

| improve this answer | |

Check here for the .ssh directory in here /home/your-username/.ssh.

Its hidden as a result of the dot(.) before the name.

So to find it do ls -a | grep .ssh in your current location as seen in the image. Also try using nautilus

| improve this answer | |
  • It doesn't work; watch the new picture in the question. – Sandra Ross Dec 9 '16 at 16:16
  • if that's the case remove and re-install again, seems odd. – George Udosen Dec 9 '16 at 16:23
  • The reason it didn't work in the picture is because grep .ssh is looking for some character followed by ssh. Try grep \.ssh – grantwparks Feb 26 '18 at 20:16
  • @grantwparks mine works with \.ssh or .ssh but best to use the `` character – George Udosen Feb 27 '18 at 7:29

Your Answer

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

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