Skip to content

Instantly share code, notes, and snippets.

@christopher-hopper
Created November 8, 2019 00:20
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save christopher-hopper/bb5c175f765c15183cb9caef7ca7ef1b to your computer and use it in GitHub Desktop.
Save christopher-hopper/bb5c175f765c15183cb9caef7ca7ef1b to your computer and use it in GitHub Desktop.
SSH config file

SSH Config

This is an example ~/.ssh/config file showing a common set-up with the following features:

  1. SSH Agent key forwarding into local virtual machines
  2. SSH Agent key forwarding into remote Acquia servers
  3. SSH alias for a personal bitbucket.org account (uses a different SSH key)
  4. Keychain Access configuration for macOS
# Local and guest hosts.
Host 127.0.0.1 localhost *.local
ForwardAgent yes
StrictHostKeyChecking no
UserKnownHostsFile /dev/null
# Acquia Cloud remote hosts.
Host *.hosting.acquia.com *.ssh.prod.acquia-sites.com
ForwardAgent yes
# Bitbucket.org.
Host personal-bitbucket
User git
HostName bitbucket.org
IdentityFile ~/.ssh/personal-bitbucket_rsa
IdentitiesOnly yes
# Other hosts not matched earlier.
# macOS keychain and ssh-agent config.
Host *
AddKeysToAgent yes
UseKeychain yes
UpdateHostKeys yes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment