Skip to content

Instantly share code, notes, and snippets.

@qnighy
Created May 14, 2022 08:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save qnighy/6dfaf1bd7082e34cde56dd64f11ffa3f to your computer and use it in GitHub Desktop.
Save qnighy/6dfaf1bd7082e34cde56dd64f11ffa3f to your computer and use it in GitHub Desktop.
Host example.com
Port 22
User qnighy
Host github.com
CheckHostIP no
Host *
# Share connections among processes
ControlMaster auto
ControlPath ~/.ssh/mux-%r@%h:%p
ControlPersist 10
# Agent forwarding: turn it off by default for safety
ForwardAgent no
# Keep-alive: prevent idle connection from being force-disconnected.
# Server keep-alive is more robust against firewalls.
TCPKeepAlive no
ServerAliveInterval 15
ServerAliveCountMax 3
# Identity: use only known private keys
GSSAPIAuthentication no
PasswordAuthentication no
PubkeyAuthentication yes
# Ask not to use additional keys provided from agents and keyrings.
IdentitiesOnly yes
# Server auth
# Fail if the IP address has been changed
CheckHostIP yes
# Store hostnames in cleartext for better maintenance
HashKnownHosts no
# Reject unknown host keys by default
StrictHostKeyChecking yes
UpdateHostKeys ask
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment