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.

I am trying to setup git ssh client on my windows PC. I was logged in to the PC as a domain user and I installed git and set up the ssh client through the domain user account which I was logged in. My issue is when I generate the ssh key it creates in my private shared folder in the server instead of the default location locally.

Is there anyway I can set the default ssh key generation location in git?

share|improve this question
add comment

2 Answers

You can do that but this is an SSH configuration rather than a git one. Your personal configuration file is (on Windows it would be in your private shared folder\.ssh):

~/.ssh/config

Edit this file (and create it if it does not exist already) and set the following:

Host *
  IdentityFile /<drive letter>/<a path>/.ssh/<your_priv_key_name>

This two lines tell that for all hosts the identity file to use for SSH is in the location you specify. Of course, instead of * you can provide an IP address or hostname and set one identity file per host.

share|improve this answer
add comment
up vote 0 down vote accepted

You just need to map the domain user home directory locally.

share|improve this answer
add comment

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.