Created
November 18, 2016 00:18
-
-
Save hernandesbsousa/2a656ae61ddf181b1cf73a09db1e9bb4 to your computer and use it in GitHub Desktop.
Run command using bastion host through ssh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# run a command in a machine protected by a VPN | |
# through a publicly-accessible bastion host | |
# more info can be found on this great blog post | |
# http://blog.scottlowe.org/2015/11/21/using-ssh-bastion-host/ | |
ssh -o ProxyCommand='ssh user@bastion.public.host -W %h:%p -i ~/.ssh/mykey' \ | |
user@destination.internal.host -i ~/.ssh/mykey my_command |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment