Skip to content

Instantly share code, notes, and snippets.

@kjschiroo
Created May 20, 2016 18:50
Show Gist options
  • Save kjschiroo/2478204c0d1132f9aa4f8e8a6063418e to your computer and use it in GitHub Desktop.
Save kjschiroo/2478204c0d1132f9aa4f8e8a6063418e to your computer and use it in GitHub Desktop.
Start jupyter on remote server and start a tunnel to that server (@ UMN)
# start jupyter on remote server at umn
farpy()
{
ssh $1 "module load soft/python/anaconda;
cd ${1}_scratch/notebooks;
screen -S jupyter -d -m sh;
screen -S jupyter -X stuff \"jupyter notebook --no-browser --port=4258\n\"";
ssh -N -f -L localhost:8888:localhost:4258 $1;
xdg-open http://localhost:8888;
setterm -term linux -back red -clear;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment