Discussion:
Using -W with -L (Local Forwarding) and -D (Socks Forwarding)
(too old to reply)
Thomas Glanzmann
2016-07-31 11:36:54 UTC
Permalink
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-08-01 00:43:05 UTC
Permalink
On Sun, Jul 31, 2016 at 9:36 PM, Thomas Glanzmann <***@glanzmann.de> wrote:
[...]
Post by Thomas Glanzmann
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-08-01 06:05:30 UTC
Permalink
Hello Darren,
Post by Darren Tucker
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
https://bugzilla.mindrot.org/show_bug.cgi?id=2577
thank you, I'll install this version on my main workstation for the time
being.

Cheers,
Thomas

Loading...