SSH bridge between two dynamic-ip pcs through third static-ip pc for jupyter notebook
Solution 1:
While it is doable to set up SSH with the jumper box (machine with static IP), I'd personally recommend to set up Zerotier on all three machines: then, one simple command will make the Jupyter-server-port available "locally" as each of the machines will have a "static" IP.
Before I learned about Zerotier, I was hosting exactly what were describing. Here are a few hassles that I am aware of.
- On the host for Jupyter Server, a cron-job needs to run first to make the port available to the jumper box;
- On the client machine, it is nevertheless needed to fetch the port from the jumper machine.
- If anything in between fails, chances are that the JupyterLab instance will stop working. It is yet another hassle to troubleshoot what went wrong.
With a Zerotier setup, only the #2 step is necessary, and the latency is comparable to jumping through multiple SSH tunnels (and reverse-tunnels).