Skip to content

Instantly share code, notes, and snippets.

@oiotoxt
Forked from isutare412/config
Created May 11, 2021 03:11
Show Gist options
  • Save oiotoxt/6a18e8f8ad0b5ed396dee5b639955b91 to your computer and use it in GitHub Desktop.
Save oiotoxt/6a18e8f8ad0b5ed396dee5b639955b91 to your computer and use it in GitHub Desktop.
SSH config using proxy / jumbox / bastion
Host your-jumpbox
HostName xxx.xxx.xxx.xxx
User user1
IdentityFile ~/.ssh/private_key_for_jumpbox
Host endpoint1
HostName xxx.xxx.xxx.xxx
User user2
ProxyCommand ssh -q -W %h:%p your-jumpbox
Host endpoint2
HostName domain.to.endpoint2
Port 1234
User user3
IdentityFile ~/.ssh/private_key_for_endpoint2
ProxyCommand ssh -q -W %h:%p your-jumpbox
ServerAliveInterval 50 # Prevent server to drop user (AWS)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment