Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

By default, my ssh looks for private key identities in /.ssh/ when I connect. However, this is not a valid place in a Windows system. How can I permanently change the default place that it looks for the private key identities, so I don't need to run ssh-add every time I want my keys?

Note: I got SSH when I installed mysysgit, the Windows version of Git (which comes with all the ssh executables in its /bin directory). I think it looks in this place because it expects me to use the MinGW git bash it comes with. However, I want to work from the cmd.exe prompt so I need it to look in a valid Windows folder.

share|improve this question
up vote 2 down vote accepted

ssh from OpenSSH normally uses ~/.ssh/, where ~ represents your home directory. To make it work on Windows, set the HOME environment variable apropriately.


set HOME=C:\Users\babonk
share|improve this answer
Thanks man, you rock! – babonk Aug 18 '11 at 5:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .