Skip to content

Instantly share code, notes, and snippets.

@mattward
Last active November 16, 2022 10:01
Show Gist options
  • Save mattward/9e4a37611ab99ca76b38 to your computer and use it in GitHub Desktop.
Save mattward/9e4a37611ab99ca76b38 to your computer and use it in GitHub Desktop.
Template for SSH config: ~/.ssh/config
################################################################################
# File: SSH client configuration
# Author: Matt Ward
################################################################################
Host wopr
HostName wopr.example.com
IdentityFile ~/.ssh/id_wopr
User mward
# Virtual box machine 'ubuntu-vm' defined in /etc/hosts
Host ubuntu-vm
User matt
# Pattern match EC2 instances
Host ec2-*.eu-west-1.compute.amazonaws.com
User ubuntu
IdentityFile ~/dev/aws_keys/mward.pem
# Alias bitbucket.org to handy 'bb'
Host bb
HostName bitbucket.org
User git
IdentityFile ~/.ssh/id_bitbucket
# Matches any host
Host *
ServerAliveInterval 60
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment