Last active
February 16, 2017 12:12
-
-
Save Swarchal/dba8a84ce46f3b6e0dbbb79e4c316c5f to your computer and use it in GitHub Desktop.
start remote jupyter notebook server over ssh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# start a jupyter server running on a remote host | |
# and port-forward to local machine | |
remote_host=$1 | |
terminal=x-terminal-emulator | |
# start remote jupyter session on port:8889 | |
$terminal ssh $remote_host "ipython notebook --no-browser --port=8889" | |
# port-forwarding to localhost:8888 | |
ssh -N -f -L localhost:8888:localhost:8889 $remote_host | |
# open in default web-browser | |
xdg-open http://localhost:8888 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Remember to close port forwarding on remote host afterwards!!