Skip to content

Instantly share code, notes, and snippets.

@zevolution
Last active August 4, 2022 17:29
Show Gist options
  • Save zevolution/91c4b686c2e576bc04bcd33605003b8f to your computer and use it in GitHub Desktop.
Save zevolution/91c4b686c2e576bc04bcd33605003b8f to your computer and use it in GitHub Desktop.
Using a non-default key name id_rsa to SSH

SSH Config

First you need create a config file as ~/.ssh/config, then inside add code below:

# Structure example with Github
Host github.com
#        UseKeyChain yes //Additional property
#        AddKeysToAgent yes //Additional property
	IdentityFile ~/.ssh/id_rsa.github
	User git
# Structure example with VSTS
Host visualstudio.com
	IdentityFile ~/.ssh/id_rsa.vsts
	User git
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment