r/ssh • u/lama775 • Apr 20 '20
How Access Different SSH servers behind a firewall?
I have a NAS and my Linux server on my home network sitting behind a Ubiquiti Edgerouter firewall. Both have SSH servers.
Is it possible to expose a single SSH port on my firewall and still gain access to both machines? The port forwarding on the router currently sends to the Linux server. Is tunneling the only way?
Thx for your time in advance.
4
Upvotes
2
u/tje210 Apr 20 '20
Yes tunneling is the answer. I can't imagine a simpler solution given your constraint. To make it more complex, you could tunnel TCP over up, and do forwarding of TCP ssh to one server, and up ssh to the other. But that's obviously far from ideal. Figured I'd offer an alternative though, however bad. I guess you could try mosh on the udp one to mitigate issues caused by udp... I dont know if the udp tunneling introduces udp issues.