I want to run a jupyter notebook from SSH to remote server node. Steps:
- ssh user@remote.server
- jupyter notebook --no-browser --port=8887
Steps on my computer:
- ssh -N -L localhost:8888:localhost:8887 user@remote.server
- run localhost:8888
This works fine. However I want to run this on node1 that is inside user@remote.server, because node1 contains a GPU.
Steps I have done are similar except for this: ssh -N -L localhost:8888:localhost:8887 user@remote.server "ssh node1"
But this does not work: "channel 2: open failed: connect failed: Connection refused"
Solution after several attempts, following the answer of @ajz34:
- On node1: jupyter notebook --no-browser --port=8886 --ip=127.0.0.1
- On server: ssh -N -L 8887:127.0.0.1:8886 node1
- On local: ssh -N -L 8888:127.0.0.1:8887 user@xxx.xxx.xxx.xxx