Suppose we have three hosts:
miki- my computer behind a NAT
vps0- my VPS
mum- computer of my mother, behind a different NAT.
The task is to connect from my computer to my mum and keep X11 forwarding. Until now I used reverse tunneling like below:
# on mum's computer (at crontab on reboot): autossh -fN -M 3986 -R 1993:localhost:22 login@vps0 # when I want to connect to mum's computer miki$ ssh login@vps0 vps0$ ssh localhost -p 1993
Presented above approach, has a disadvantage that I can't use X11 forwarding (-X parameter) - I can't open windows remotely.
I am wondering if is it possible to connect directly to my mum's computer and keep X11 forwarding.
PS. I sow answers in topic: SSH tunnel through middleman server - how to connect in one step (using key pair)?. Unfortunately using that solutions causes that X11 forwarding doesn't work.