Tips and cookbooks related to working on a remote server.
https://seanthegeek.net/234/graphical-linux-applications-bash-ubuntu-windows/
ssh -Y username@remote_server
e.g.
ssh -Y punetid@tigressdata.princeton.edu
- See this link.
- See this link.
ncdump -h xxxx.nc
ncview xxxx.nc
-
generate the keys (private + public)
ssh-keygen -t rsa
all use the defaults settings.
-
copy the public key to the remote server
ssh-copy-id username@remote_server
Save the ssh connection to avoid repeated authentifications. One example is here.
-
edit the ssh config file
vi ~/.ssh/config -
add the following lines to the config file and save.
Host tigressdata tg HostName tigressdata.princeton.edu User your_puID ControlMaster auto ControlPersist yes ControlPath ~/.ssh/%r@%h:%p ServerAliveInterval 120 ForwardX11 yes
-
Remote server terminal
jupyter notebook --no-browser --port=8899 --ip=127.0.0.1
port 8899 might be unavailable, in which case a different port # may be used.
In case you want to use Jupyter lab, you can run the following command instead:
jupyter lab --no-browser --port=8899 --ip=127.0.0.1
-
Local machine terminal
ssh -NL localhost:8899:localhost:8899 username@remote_server
use the assigned port number in step 1 to replace 8899 when applicable.
In case you are not allowed to log in the remote server (e.g. tigressdata.princeton.edu) directly from an outside network, a jump server (e.g. nobel.princeton.edu, or tigressgateway.princeton.edu) is needed if you do not want to use VPN:
ssh -N -J username@jump_server -L localhost:8899:localhost8899 username@remote_server
-
Local machine browser
http://localhost:8899
Or copy the full link (containing token info) seen in the remote server in step 1.
https://github.com/Resplandy/climate-hpc/blob/master/jupyterhub.md