Skip to content

Instantly share code, notes, and snippets.

@gbraccialli
Created September 12, 2016 12:21
Show Gist options
  • Save gbraccialli/543d8db0de0dc91fdb1c9cc7e1478ec3 to your computer and use it in GitHub Desktop.
Save gbraccialli/543d8db0de0dc91fdb1c9cc7e1478ec3 to your computer and use it in GitHub Desktop.
cat >> ~/.ssh/config << EOF
# YOURDOMAIN Section
Host *.yourdomain
IdentityFile ~/.ssh/yourdomain.pem
CheckHostIP=no
StrictHostKeyChecking=no
User centos
UserKnownHostsFile=/dev/null
## Automatically restore a connection if reconnected within 5 minutes (in case the VPN drops)
TCPKeepAlive no
ServerAliveInterval 60
ServerAliveCountMax 5
## reuses the ssh connection making things much faster
ControlMaster auto
ControlPath /tmp/.ssh_%h_%p_%r
ControlPersist 600
# End of YOURDOMAIN
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment