![](https://seccdn.libravatar.org/avatar/9c06031aaadda145089b2480338feb86.jpg?s=120&d=mm&r=g)
Dne úterý 30. listopadu 2021 13:29:50 CET, Adam Mizerski napsal(a):
W dniu 30.11.2021 o 11:04, Vojtěch Zeisek pisze:
I tried SSH tunnelling several times, but never made it to work, so might be time to start from scratch... I have in my office desktop running TW, at home notebook running TW, and in the office also Synology NAS running some (Debian- based?) Linux. The NAS has public as well as internal IP and I have fully admin control over it. I can SSH to the NAS and from it to the desktop. Fine. But I'd prefer direct connection (let's disregard VPN for a moment). I vaguely remember I'd have to open new SSH port on the NAS, but I'm not sure if I need there also extra SSH service...? And how I then tunnel from notebook to the desktop via NAS...?
You cannot have a "direct" connection (there's always be some kind of tunneling, whether it's ssh or vpn). But you can emulate one by using "ssh -J" or ProxyJump in .ssh/config.
In your case it will look like this: ssh -J nas_public_ip desktop_private_ip
or in .ssh/config Host desktop HostName desktop_private_ip ProxyJump nas_public_ip
This is perfect trick! Works fantastically! Thank You! -- Vojtěch Zeisek https://trapa.cz/ Komunita openSUSE GNU/Linuxu Community of the openSUSE GNU/Linux https://www.opensuse.org/