Run this command on server
jupyter notebook --no-browser --ip <private ip> --port 8888
Access with http://<private ip>:8888
Run this command on server
jupyter notebook --no-browser --port 8888
Run this command from client
ssh 8080:localhost:8888 <username>@<private ip>
Then access through http://localhost:8080
Remember to add token to the url for the first time, token is printed to stdout when starting the server.
# generate keys
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout mykey.key -out mycert.pem
# run notebook with the keys for encryption
jupyter notebook --certfile=mycert.pem --keyfile mykey.key
The SSL option can also be used with the options in the previous 2 option.