How to modify ~/.ssh folder & files in windows?
This answer for Windows environment:
At the beginning, Windows didn't have .ssh
folder.
When your run command for creating a ssh key like this:
ssh-keygen -t rsa -b 4096 -C "[email protected]"
(must run your terminal as administrator).
Your is_rsa
and id_rsa.pub
files will be placed under C:\Users\your_username\
So, you need to create folder C:\Users\your_username\.ssh
yourself then copy the ssh files to there.
You also have to create file C:\Users\your_username.ssh\config and edit it for the first time.
Next ssh will be placed under the .ssh
folder automatically.
Note: ~/
is the same as C:\Users\your_username\
on Windows
I have created and regularly use a ".ssh" directory on Windows 7; as mentioned in the above comments, Windows Explorer doesn't support them, or more specifically, the error-checking in Windows Explorer does not allow you to give a file name that starts with a period. That same restriction does not exist in the command prompt or powershell.
Also, as mentioned above, it appears you have a file called ".ssh" in your home directory, which must be removed before you can create a folder named ".ssh".
Once such a folder exists, you can open it and change/create files in it using Windows Explorer; it just won't let you name a folder/file ".ssh" directly.
Gitbash should directly allow you to run "rm .ssh" and "mkdir .ssh", at which point everything else should work.