Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  login

Feeling amorous, she looked under the sheets and cried, "Oh, no, it's Microsoft!"


devel / comp.security.ssh / Re: Tunnel from Remote Host to ProxyJump Host

SubjectAuthor
* Tunnel from Remote Host to ProxyJump HostRhongomiant
`- Re: Tunnel from Remote Host to ProxyJump HostJames H. Markowitz

1
Tunnel from Remote Host to ProxyJump Host
  comp.security.ssh
X-Received: by 2002:ac8:5a84:0:b0:3ef:3126:7dca with SMTP id c4-20020ac85a84000000b003ef31267dcamr4359199qtc.2.1682280023968;
Sun, 23 Apr 2023 13:00:23 -0700 (PDT)
X-Received: by 2002:aca:bd43:0:b0:38e:de2d:c4ae with SMTP id
n64-20020acabd43000000b0038ede2dc4aemr215032oif.3.1682280023617; Sun, 23 Apr
2023 13:00:23 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.security.ssh
Date: Sun, 23 Apr 2023 13:00:23 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=2001:470:5:b6d:4d6a:60e3:c237:c24c;
posting-account=bn7FQgoAAAAjsyPVXpY4wTze8daeJVGB
NNTP-Posting-Host: 2001:470:5:b6d:4d6a:60e3:c237:c24c
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <9a99d937-be93-4f0f-856c-9039ce9b38c3n@googlegroups.com>
Subject: Tunnel from Remote Host to ProxyJump Host
From: cmirchan...@gallifreyans.com (Rhongomiant)
Injection-Date: Sun, 23 Apr 2023 20:00:23 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Xref: rslight2 comp.security.ssh:297
 by: Rhongomiant - Sun, 23 Apr 2023 20:00 UTC

Is there a way to create a tunnel from a remote host to a ProxyJump host?

There are times when I need to connect to a remote host through one or more hosts and create a reverse dynamic tunnel. However, I don't want the reverse tunnel to come back to my system, but to one of the ProxyJump host.

I have a solution provided that the last ProxyJump host is where the reverse dynamic tunnel needs to terminate.

ssh -tt <Host A> ssh -tt -R12345 <Host B>

However, in the case where there are hosts A, B, C, and D and the reverse dynamic tunnel needs to terminate on host B, the following will work if host B supports ProxyJump.

ssh -tt <Host A> ssh -tt <Host B> ssh -J <Host C> -R12345 <Host D>

However, many of the systems we work on don't have a new enough ssh version for ProxyJump. I know ProxyJump was added in OpenSSH 7.3/7.3p1 (2016-08-01) and reverse dynamic forwarding was added in OpenSSH 7.6/7.6p1 (2017-10-03), so if it supports reverse dynamic forwarding then it supports ProxyJump, but anything we're connecting to supports reverse forwarding which was added in OpenSSH 2.5.1p1 (2001-02-19) and useful in many cases.

I'm wondering is there is a lesser known/obvious feature that lets us specify a tunnel with the host it should originate from.

I know ProxyJump uses the -W option and maybe that doesn't provide support for tunneling or tunneling beyond the next hop?

Thanks for any help.

Re: Tunnel from Remote Host to ProxyJump Host
  comp.security.ssh
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: noo...@nowhere.net (James H. Markowitz)
Newsgroups: comp.security.ssh
Subject: Re: Tunnel from Remote Host to ProxyJump Host
Date: Wed, 26 Apr 2023 14:38:20 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 72
Message-ID: <u2bd0s$1drq5$1@dont-email.me>
References: <9a99d937-be93-4f0f-856c-9039ce9b38c3n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 26 Apr 2023 14:38:20 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="fe520b969255e99e1b7fb5aa97e5e715";
logging-data="1503045"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19Espfl1eDHsA2pxE0n+6+tG68cLAchtG0="
User-Agent: Pan/0.149 (Bellevue; 4c157ba git@gitlab.gnome.org:GNOME/pan.git)
Cancel-Lock: sha1:oUUE/JATNwYqvoBu/XJyb+Pmy1A=
Xref: rslight2 comp.security.ssh:299
 by: James H. Markowitz - Wed, 26 Apr 2023 14:38 UTC

On Sun, 23 Apr 2023 13:00:23 -0700 (PDT), Rhongomiant wrote:

> Is there a way to create a tunnel from a remote host to a ProxyJump
> host?
>
> There are times when I need to connect to a remote host through one or
> more hosts and create a reverse dynamic tunnel. However, I don't want
> the reverse tunnel to come back to my system, but to one of the
> ProxyJump host.
>
> I have a solution provided that the last ProxyJump host is where the
> reverse dynamic tunnel needs to terminate.
>
> ssh -tt <Host A> ssh -tt -R12345 <Host B>
>
> However, in the case where there are hosts A, B, C, and D and the
> reverse dynamic tunnel needs to terminate on host B, the following will
> work if host B supports ProxyJump.
>
> ssh -tt <Host A> ssh -tt <Host B> ssh -J <Host C> -R12345 <Host D>
>
> However, many of the systems we work on don't have a new enough ssh
> version for ProxyJump. I know ProxyJump was added in OpenSSH 7.3/7.3p1
> (2016-08-01) and reverse dynamic forwarding was added in OpenSSH
> 7.6/7.6p1 (2017-10-03), so if it supports reverse dynamic forwarding
> then it supports ProxyJump, but anything we're connecting to supports
> reverse forwarding which was added in OpenSSH 2.5.1p1 (2001-02-19) and
> useful in many cases.
>
> I'm wondering is there is a lesser known/obvious feature that lets us
> specify a tunnel with the host it should originate from.
>
> I know ProxyJump uses the -W option and maybe that doesn't provide
> support for tunneling or tunneling beyond the next hop?
>
> Thanks for any help.

What follows may not address exactly what you want, but it may
help:

Setup:

Machine M1 is in the Internet.

Machine M2 is in the Internet.

M1 can get into M2 via SSH.

M2 can access M3 via SSH.

M3 is not directly accessible from M1.

M3 is listening for incoming SSH connections at port (say) 713.

In order to SSH into M3 from M1 we do the following on M1:

ssh -fngT -L 3022:M3:713 -C M2 ping -i 30 localhost > /dev/null 2>&1

ssh -p 3022 localhost

If in M1 we add to .ssh/config the entry

Host M3
HostName localhost
HostKeyAlias M3
User Username on M3
Port 3022

then we can get from M1 to M3 by means of

ssh M3

1
server_pubkey.txt

rocksolid light 0.9.1
clearnet tor