-
-
Save movii/ce59d482126fdc79b87e60ccf9f30f65 to your computer and use it in GitHub Desktop.
ssh jump host forwarding config
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
# | |
# see also: | |
# https://en.wikibooks.org/wiki/OpenSSH/Cookbook/Multiplexing | |
# http://blog.scottlowe.org/2015/12/11/using-ssh-multiplexing/ | |
# | |
# you may want to use connection multiplexing on the jumphost | |
Host jump-host | |
Hostname jump-host.example.com | |
ForwardAgent yes | |
ControlPath ~/.ssh/cm-%r@%h:%p | |
ControlMaster auto | |
ControlPersist 10m | |
# this can also be chained, i.e. local->target_host->target_host2->... | |
Host target-host | |
ProxyCommand ssh -W %h:%p jump-host | |
# one-liner: | |
# ssh -o ProxyCommand="ssh -W %h:%p proxy_host" target_host | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment