Dr Eberhard Lisse wrote:
>
> On 27/10/2020 12:28, Chris Green wrote:
> > Jan Novak wrote:
> [...]
> > So you need to set up reverse tunnel outgoing connections from your
> > Pi, this you have to do with access to it of course. Then, once that's
> > done you can access it using ssh from 'outside'.
> >
> > If you want to know more then just ask.
> >
>
> I might have use for something like this (for a host which I can access
> via AnyDesk, but not SSH, at the moment.
>
> Where can one read up on how to do this?
>
In various places, it's not really "all in one place".
If you look for 'ssh reverse tunnel' you will find how to do the ssh
bit. Basically it uses the -R option of ssh so that a 'remote' system
you have connected to from your Pi using ssh can connect back through
the same connection *to* the Pi.
The ssh man page explains it moderately well but you might want to try
searching for some examples as well, you do need a clear mind to set
it up right. :-)
My Beaglebone Black (the system like a Pi) is on a boat in France
behind a commercial WiFi system, so I run the following on it:-
ssh -nNT -R 51236:localhost:22 chris@
This connects port 22 (the sshd server port) on the Beaglebone to port
51236 on myhost. Then all you need to do is connect to port 51236 on
myhost and you actually connect to the Beaglebone. I.e. you just do
'ssh -p 51236 localhost' on myhost to connect through the reverse
tunnel. The 51236 is just a random port number, greater than 1024 so
that it can be used by a non-root process.
To make this more robust I use a litte utility called autossh on the
Beaglebone to make the outgoing connections, this restarts ssh if it
dies, etc. You can find out about that by searching too and it's
rather less confusing so I won't say any more here.
--
Chris Green
ยท
--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)
|