Created
November 28, 2014 18:43
-
-
Save tuxfight3r/593f35f297f8b619a470 to your computer and use it in GitHub Desktop.
openssh proxy tricks
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
METHOD 1: (with nc in localbox) | |
ssh -D 60002 mohan@10.1.1.20 | |
sftp -o 'ProxyCommand=nc -xlocalhost:60002 %h %p' USER@remotehost.com | |
METHOD 2: (with nc in remote box) | |
sftp -o 'ProxyCommand ssh -q -l mohan 10.1.1.20 nc remotehost.com 22' USER@remotehost.com | |
METHOD 3: (without nc at all) | |
ssh -L 60002:remotehost.com:22 mohan@10.1.1.20 | |
sftp -o Port=60002 USER@localhost | |
more: http://en.wikibooks.org/wiki/OpenSSH/Cookbook/Proxies_and_Jump_Hosts |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment