Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Using -W with -L (Local Forwarding) and -D (Socks Forwarding)

1 view
Skip to first unread message

Thomas Glanzmann

unread,
Jul 31, 2016, 7:42:51 AM7/31/16
to
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
_______________________________________________
openssh-unix-dev mailing list
openssh-...@mindrot.org
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev

Darren Tucker

unread,
Jul 31, 2016, 8:49:37 PM7/31/16
to
On Sun, Jul 31, 2016 at 9:36 PM, Thomas Glanzmann <tho...@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

unread,
Aug 1, 2016, 2:11:42 AM8/1/16
to
Hello Darren,

* Darren Tucker <dtu...@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=2577

thank you, I'll install this version on my main workstation for the time
being.

Cheers,
Thomas
0 new messages