Skip to content

Instantly share code, notes, and snippets.

@drconopoima
Last active May 22, 2021 22:57
Show Gist options
  • Save drconopoima/97f91f09fc9c31acc4a6671dcc248dab to your computer and use it in GitHub Desktop.
Save drconopoima/97f91f09fc9c31acc4a6671dcc248dab to your computer and use it in GitHub Desktop.
Host *
StrictHostKeyChecking no
LogLevel ERROR
ConnectTimeout 6
ServerAliveInterval 30
ServerAliveCountMax 10
ExitOnForwardFailure yes
Host github.com
User git
ProxyCommand nc %h %p
# Host cloud_vp?0* !cloud_vpn01 # Example pattern matching
# ProxyCommand ssh -q cloud_user@cloud_vpn01 -W %h:%p
# ghoti https://unix.stackexchange.com/q/471262
# ssh -o "ControlMaster=auto" -o "ControlPath=~/.ssh/cm_sockets/%r@%h:%p" -f [email protected] -L 2000:10.0.1.100:80 -N
# ssh -O check -o "ControlPath=~/.ssh/cm_sockets/%r@%h:%p" [email protected]
# ssh -O exit -o "ControlPath=~/.ssh/cm_sockets/%r@%h:%p" [email protected]
# Host cloud_server
# Hostname 10.0.1.100
# User ubuntu
# ExitOnForwardFailure yes
# LocalForward 12345 cloud_server:12345
# RequestTTY no
# TCPKeepAlive yes
# Compression yes
# ControlPath=~/.ssh/cm_sockets/%r@%h:%p # %r refers to the remote login name, %h refers to the target host name, and %p refers to the destination port.
# ControlMaster auto
# ControlPersist 8h
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment