I want to create a folder in my home directory which name is .ssh. I can't create it with this name because it's showing:
cannot create directory ‘.ssh’: File exists
How should I proceed?
72 Answers
You can try to rename the exiting item and then create the directory again:
mv ~/.ssh ~/.ssh.bak
mkdir ~/.sshIn addition, usually the tools which use that directory will ask you to assign the following permissions to it:
chmod 700 ~/.sshThus the directory will be accessible only by the user that is owner of the directory.
2.ssh directory is reserved for ssh keys and configuration.
In case you want to generate your ssh key, execute this command
ssh-keygen
and follow the instructions.
1