OpenSSH: Using a Bastion Host

Quick and dirty OpenSSH configlet here. If you have a set of hosts or devices that require you to first jump through a bastion host, the following will allow you to run a single ssh command:


Host *
ProxyCommand ssh -A <bastion_host> nc %h %p

Change the Host * line to best match the hostnames that require a bastion host.

2019-04-26 16:09:39

Comments

Add a Comment

Login or Register to post a Comment.

Homepage