Create a file called ~/.ssh/config
SSH will look for the user’s ~/.ssh/config file. I have mine setup as:

Host            gitserv
    IdentityFile    ~/.ssh/id_rsa.github
    IdentitiesOnly yes # see NOTES below

Above can be used for both cloning/pushing git repository and logging in to the server.

gitserv : hostname which is  “” in below example

git clone

 pvt file to have access  rights of 600

How t to manage multiple ssh-keys and connect them to servers

Leave a Reply

Your email address will not be published.