How to share your laptop (ipython/jupyter notebook) with a remote client

With port forwarding!

First, we run a notebook with no-browser option on local laptop

$ jupyter notebook --no-browser --port=8897

Second, we forward our local laptop port to the remote server. The format is -R [ip]:[remote_host_port]:[localhost or local ip]:[local_port] user@host:

$ ssh  -R [remote_static_ip_host_ip]:8897:localhost:8897 user@remote_static_ip_host

Third, on the client machine, which will use the resources we run SSH to forward remote server port to local with format -L [remote_host_port]:[localhost or local ip]:[local_port] user@host

$ ssh -L 8087:localhost:8897 ds@remote_static_ip_host

Vuala!

 

Kirill