Skip to content

Instantly share code, notes, and snippets.

@markhibberd
Last active August 29, 2015 14:03
Show Gist options
  • Save markhibberd/7012e53da5412c00097e to your computer and use it in GitHub Desktop.
Save markhibberd/7012e53da5412c00097e to your computer and use it in GitHub Desktop.
Host bastion
User <whatever if required>
IdentityFile <key for bastion host>
HostName <public ip / dns>
Host internal
User <username for internal machine>
IdentityFile <key for internal machine>
ProxyCommand ssh bastion nc <ip for internal machine (as seen by bastion)> 22
Host example
User mth
IdentityFile ~/.ssh/example_key
ProxyCommand ssh bastion nc 192.168.1.1 22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment