Thomas Glanzmann
2016-Jul-31 11:36 UTC
Using -W with -L (Local Forwarding) and -D (Socks Forwarding)
Hello, I have in my ssh config: Match host 2.3.4.5 exec "~/bin/connect.sh" ProxyCommand ssh -D 1080 -L8080:1.2.3.4:8080 -p 443 bouncehost -W %h:%p ~/bin/connect.sh: #!/bin/bash if echo | nc -w 1 2.3.4.5 22 | grep -q SSH; then false else true fi So when I can't connect to the system directly it should go over a bounce host but at the same time use a portforwarding which is only available from the bouncehost but not the server itself. My problem is that -W clears all forwardings. Is there another trick or option for example with -L that allows me to forward stdin using a bounce host but let me specify additional forwardings? For now I just go back to use netcat which works fine. Cheers, Thomas
Darren Tucker
2016-Aug-01 00:43 UTC
Using -W with -L (Local Forwarding) and -D (Socks Forwarding)
On Sun, Jul 31, 2016 at 9:36 PM, Thomas Glanzmann <thomas at glanzmann.de> wrote: [...]> My problem is that -W clears all forwardings. > Is there another trick or option for example with -L that allows me to forward > stdin using a bounce host but let me specify additional forwardings?This was added in the about-to-be-released 7.3: ssh -W still sets ClearAllForwardings but in a way that can be overridden by explicit configuration: https://bugzilla.mindrot.org/show_bug.cgi?id=2577 -- Darren Tucker (dtucker at zip.com.au) GPG key 11EAA6FA / A86E 3E07 5B19 5880 E860 37F4 9357 ECEF 11EA A6FA (new) Good judgement comes with experience. Unfortunately, the experience usually comes from bad judgement.
Thomas Glanzmann
2016-Aug-01 06:05 UTC
Using -W with -L (Local Forwarding) and -D (Socks Forwarding)
Hello Darren, * Darren Tucker <dtucker at zip.com.au> [2016-08-01 02:48]:> This was added in the about-to-be-released 7.3: ssh -W still sets > ClearAllForwardings but in a way that can be overridden by explicit > configuration: > https://bugzilla.mindrot.org/show_bug.cgi?id=2577thank you, I'll install this version on my main workstation for the time being. Cheers, Thomas