Posted by

How to permanently add ssh keys in windows system

If you frequently use a git repository and find yourself typing "eval ssh-agent" and "ssh-add" every time you pull or push, you may be wondering if there is a way to avoid this step. Fortunately, there is a way to permanently add your ssh key to your system. To do this, you will need to create a config file in your ssh directory (which is typically located at C:/Users/YourUserName/.ssh). Then, open the config file in a text editor and add the following code:

Host bitbucket.org
IdentityFile /d/ssh/privatekey

Note that if you are using GitHub, the value for "Host" should be "github.com" and the value for "IdentityFile" should be the path to your private ssh key. Once you have saved the config file, you should be able to use git without having to enter the "eval ssh-agent" and "ssh-add" commands every time.