Connecting to Linux via Jupyter Notebook on Windows Server - jamiefogel/Networks GitHub Wiki
Step 1: Set Up the SSH Tunnel with PuTTY
-
Open PuTTY and configure the connection to your Linux server.
- Under Session, enter the hostname or IP address of your Linux server and the port (usually 22).
-
Configure Port Forwarding in PuTTY:
- In PuTTY, go to Connection > SSH > Tunnels.
- Set up local port forwarding by entering a local port, such as
8888
, in the Source port field. - In the Destination field, enter the address and port of the Jupyter server on your Linux machine (e.g.,
localhost:8888
if you start Jupyter on that port). - Click Add to confirm the tunnel.
-
Start the SSH Connection:
- Go back to Session and click Open to initiate the SSH connection. This will forward traffic from
localhost:8888
on your Windows machine to the server’slocalhost:8888
.
- Go back to Session and click Open to initiate the SSH connection. This will forward traffic from
Note: I have saved this configuration in PuTTY as 10.1.1.226 - Jupyter Notebook so at this point we can just click on that. This will open a terminal and we enter out username and password.
Step 2: Start a Jupyter Notebook on the Linux Server (Optional for Spyder Kernel)
First activate our environment by entering in the PuTTY terminal
conda activate labor_gt
On the Linux server, you can start a Jupyter Notebook server to use as a remote kernel, which can be accessed through the SSH tunnel:
jupyter notebook
This will print a bunch of text in the terminal. Look for the text To access the server, open this file in a browser:. This will be followed by a few options. The one that has seemed to work is the one that begins with http://graphtool-prod:
. Copy this text and paste it as a url into a web browser and this should open our home folder in a Jupyter