Created
December 31, 2022 06:01
-
-
Save fanurs/d61dd969ddd307b2a9ef6a45a952d1cc to your computer and use it in GitHub Desktop.
ssh with jumphosts
This file contains hidden or 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
# SSH after version 7.5 provides ProxyJump (-J flag) | |
# name: your username in the remote server | |
# when using Windows PowerShell, you may need to replace "ssh" by "ssh.exe" | |
ssh -J name@intermediateserver name@remoteserver | |
# In the case of multiple intermediate hosts, simple join all of them with comma | |
ssh -J name@intermediate1,name@intermediate2,name@intermediate3 name@remoteserver | |
# SSH before version 7.5 would need to use ProxyCommand | |
ssh -o ProxyCommand="ssh -W %h:%p name@intermediateserver" name@remoteserver |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment