Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

.ssh directory not being created

Tags:

unix

ssh

cygwin

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?

like image 995
blue-sky Avatar asked Mar 03 '13 20:03

blue-sky


People also ask

Where is my .ssh directory?

To see your . ssh folder in the Finder, press Command+Shift+G, then enter ~/. ssh . Also!

How do I make .ssh folder visible?

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.

What is .ssh directory Linux?

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 .


1 Answers

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.

like image 116
mvp Avatar answered Sep 19 '22 18:09

mvp