Skip to content

Instantly share code, notes, and snippets.

@kepbod
Created October 12, 2016 15:56
Show Gist options
  • Save kepbod/ea377920da2483275e06e9139406b765 to your computer and use it in GitHub Desktop.
Save kepbod/ea377920da2483275e06e9139406b765 to your computer and use it in GitHub Desktop.
Remote Access to Jupiter Notebooks via SSH
IPYNB_PORT=1075 # same as in server config
alias sshpy="ssh -NL $IPYNB_PORT\:localhost:$IPYNB_PORT [email protected] &" # the server should be same with that runing notebook
IPYNB_PORT=1075 # any port you like
alias ipynb="nohup jupyter notebook --no-browser --port $IPYNB_PORT &"
@kepbod
Copy link
Author

kepbod commented Oct 12, 2016

First

Add codes in server_config.sh and local_config.sh to relavent .zshrc (or .bashrc) files, respectively.

Second

In remote server, run ipynb. And then, in local machine, run sshpy.

Last

See localhost:1075 in browser.

@tianxiongbb
Copy link

useful

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment