Skip to content

Instantly share code, notes, and snippets.

@muhmi muhmi/ssh.config
Created Mar 27, 2015

What would you like to do?
Route SSH connections through a bastion host
Host bastion_ip
User ec2-user
HostName ##.##.##.##
ProxyCommand none
IdentityFile ~/.ssh/bastion_key.pem
BatchMode yes
PasswordAuthentication no
Host *
ServerAliveInterval 60
TCPKeepAlive yes
ProxyCommand ssh -q -A ec2-user@bastion_host -i ~/.ssh/bastion-key.pem nc %h %p
ControlMaster auto
ControlPath ~/.ssh/mux-%r@%h:%p
ControlPersist 8h
User ubuntu
StrictHostKeyChecking no
IdentityFile ~/.ssh/applicatio-server-key.pem
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.