Skip to content

Instantly share code, notes, and snippets.

@vraravam
Last active January 2, 2026 11:24
Show Gist options
  • Select an option

  • Save vraravam/4c5bcca2016d5e19ae8a859e6cc2c59a to your computer and use it in GitHub Desktop.

Select an option

Save vraravam/4c5bcca2016d5e19ae8a859e6cc2c59a to your computer and use it in GitHub Desktop.
Template for configuring ssh
# file location: ${HOME}/.ssh/config
# Note: To generate new ssh key (replace placeholders with your values):
# ssh-keygen -t ed25519 -a 100 -b 4096 -f ${HOME}/.ssh/id_ed25519-tw -q -N '' -C "XXXX@tw.com"
# ssh-keygen -t rsa -a 100 -b 4096 -f ${HOME}/.ssh/id_rsa-YYYY -q -N '' -C "YYYYY@gmail.com"
# TODO: This can be removed if the 'pushInsteadOf' setting is removed from the dotfiles repo
Host github.com
IdentityFile ${HOME}/.ssh/YYYYYY
# Personal account (default config)
Host github-personal
HostName github.com
IdentityFile ${HOME}/.ssh/YYYYYY
# Work account
Host github-work
HostName github.com
IdentityFile ${HOME}/.ssh/XXXXXXXX
User git
Include ${HOME}/.ssh/global_config
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment