To generate the .ssh
dir I use this command:
ssh-keygen
taken from this tutorial: http://ebiquity.umbc.edu/Tutorials/Hadoop/05%20-%20Setup%20SSHD.html
But the .ssh
directory is not created so when I use cd ~/.ssh
I get this error:
"no such file or directory"
Is there a step missing ? Should the .ssh
dir be created when I use the ssh-keygen
command?
To see your . ssh folder in the Finder, press Command+Shift+G, then enter ~/. ssh . Also!
If you need to see it in an Open file dialog, press cmd + Shift + G ` while the open dialog window is open. This will drop down a "Go to the folder" screen. Type in the hidden folder path you wish to navigate to and that folder will now display in the open dialog window.
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 .
I am assuming that you have enough permissions to create this directory.
To fix your problem, you can either ssh to some other location:
ssh [email protected]
and accept new key - it will create directory ~/.ssh
and known_hosts
underneath, or simply create it manually using
mkdir ~/.ssh chmod 700 ~/.ssh
Note that chmod 700
is an important step!
After that, ssh-keygen should work without complaints.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With