Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

1 Answer 1

up vote 1 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=%USERPROFILE%

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.