Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.