Permalink
Fetching contributors…
Cannot retrieve contributors at this time
32 lines (26 sloc) 1.3 KB
# Example ~/.ssh/config file to connect to an SSH server tunneled by sidedoor.
#
# Replace these placeholders below:
# - MY_HOSTNAME: hostname argument to match on the command-line, e.g.,
# if you want to access a server by running `ssh pi`,
# the hostname would be pi
# - TUNNEL_PORT: tunneled port on the "bastion" to connect to, e.g.,
# if you passed `-R 8022:localhost:22` to sidedoor,
# the tunnel port would be 8022
# - REMOTE_SERVER: SSH reverse proxy that sidedoor maintains a tunnel to
Host MY_HOSTNAME
# Access the SSH server through the SSH reverse proxy,
# with end-to-end SSH encryption. ProxyJump requires OpenSSH 9.3+.
HostName localhost
Port TUNNEL_PORT
ProxyJump REMOTE_SERVER
# For OpenSSH <9.3, comment out HostName, Port, ProxyJump above
# and instead use ProxyCommand. Functionally similar.
#ProxyCommand ssh -W localhost:TUNNEL_PORT REMOTE_SERVER
# For OpenSSH <5.4, comment out HostName, Port, ProxyJump above
# and instead use ProxyCommand with netcat. Functionally similar.
ssh REMOTE_SERVER exec nc localhost TUNNEL_PORT
# If authorized_keys is populated, log in as the sidedoor user.
User sidedoor
# Optionally, specify a different private key.
#IdentityFile