Skip to content

Instantly share code, notes, and snippets.

@Protosac Protosac/sshconfig
Created Dec 11, 2016

Embed
What would you like to do?
SSH Config Example
# Format
Host alias
HostName myserver.com
User username
IdentityFile ~/.ssh/mykey
# Usage: `ssh alias`
# Alternative: `ssh -i ~/.ssh/mykey username@myserver.com`
Host myrepos
HostName github.com
User username
IdentityFile ~/.ssh/github_rsa
# Usage:
# git@myepos:username/anyrepo.git
# This is for cloning any repo that uses that IdentityFile. This is a good way to make sure that your remote cloning commands use the appropriate key
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.