Skip to content

Instantly share code, notes, and snippets.

@andmax
Last active June 4, 2020 15:38
Show Gist options
  • Save andmax/2ba77d5884ee005b14f8bf6de815b603 to your computer and use it in GitHub Desktop.
Save andmax/2ba77d5884ee005b14f8bf6de815b603 to your computer and use it in GitHub Desktop.
Good ssh configuration tips on the ~/.ssh/config file
# Strict Host Key Checking avoids know_hosts nuisances
Host *
Compression Yes
ControlMaster auto
ControlPath /tmp/ssh-%r@%h:%p
ServerAliveInterval 60
StrictHostKeyChecking no
# Adding two names to the same host server
Host name1 name2
User andmax
Port <port other than 22>
Hostname <ip or address>
IdentityFile ~/.ssh/id_rsa
# Access target_name host going thru tunnel_host_name
Host target_name
HostName <ip or address>
User andmax
ProxyCommand ssh -aT <tunnel_host_name> nc %h %p
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment