Skip to content

Latest commit

 

History

History
26 lines (20 loc) · 461 Bytes

ssh_bastion.md

File metadata and controls

26 lines (20 loc) · 461 Bytes

Set up ssh bastion host

Pre-requisites:

  • ssh-agent running

To run ssh-agent add eval "$(ssh-agent -s)" &> /dev/null to your shell script. (e.g.: ~/.zshrc)

~/.ssh/config:

# Bastion host
Host bastion
 Hostname XX.XXX.XX.XXX
 IdentityFile ~/.ssh/<keypair-file>
 User user
 ForwardAgent yes
 AddKeysToAgent yes

# Instance on private subnet
Host instance
 Hostname XX.XXX.XX.XXX
 User user
 ProxyJump bastion

Example of usage: ssh instance