Skip to content

Instantly share code, notes, and snippets.

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
@Mutabazi3

This comment has been minimized.

Copy link

@Mutabazi3 Mutabazi3 commented May 10, 2020

please can you explain it. Host alias is my local computer?

@RuoChen95

This comment has been minimized.

Copy link

@RuoChen95 RuoChen95 commented May 21, 2020

????

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.