Skip to content

Instantly share code, notes, and snippets.

@jeanlouisferey
Last active March 20, 2018 17:32
Show Gist options
  • Save jeanlouisferey/8ce51112b1a2c397c1d12084218a0762 to your computer and use it in GitHub Desktop.
Save jeanlouisferey/8ce51112b1a2c397c1d12084218a0762 to your computer and use it in GitHub Desktop.
.ssh/config to connect a machine through a bastion
# .ssh/config file
# In this case, same user and same key on the two machines
Host bastion
Hostname bastion-ansible-01
User cloud
IdentityFile /home/admin/MaClefRsa
Host internetproxy-01
Hostname 192.168.1.89
User cloud
IdentityFile /home/admin/MaClefRsa
ProxyCommand ssh bastion -W %h:%p
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment