SSH access to Purdue AF¶
Although the web-based JupyterLab interface is the recommended way to access Purdue AF, it is also possible to connect to your session from a terminal via SSH.
Note
SSH connects you to your running AF session, not to a separate login node — you must start the session in a web browser first. If you would rather work in a full local IDE, see Access via VSCode-based IDEs.
Instructions¶
-
Start an AF session in the normal way
In a web browser, log in to Purdue AF and start a session.
-
Obtain an authentication token
- Go to
File → Hub Control Panel. - Click the
Tokentab in the top left of the page. - Click
Request new API tokento obtain the token string — you will need it in the next step.
- Go to
-
Log in to your session from an external terminal
- If you are using a CERN or FNAL account, remember that your username must
include the
-cernor-fnalsuffix, respectively — see Login methods and usernames. - Instead of a password, paste the token obtained in the previous step.
- If you are using a CERN or FNAL account, remember that your username must
include the
-
(Optional) Set up an alias in
.bashrcBy adding the following line to
~/.bashrcor~/.bash_profileon your local machine, you can avoid copy-pasting the token every time. Note: you will need thesshpassutility installed on the local machine.Now simply running the
purdue-afcommand will immediately connect you to Purdue AF, provided that you have already started a session.
Caveats¶
Tip
If you encounter any formatting issues while working at Purdue AF via an SSH
connection (for example, broken lines in the Vim text editor), try running the
resize command.
No SFTP / scp support
At the moment, the SSH server at Purdue AF does not support the SFTP protocol,
which means that you cannot use scp commands to download and upload files
from your local machine.
Use the web interface to transfer files instead — see Uploading and downloading files:
- upload files by drag-and-dropping them into the Jupyter file browser, or via the "Upload" button at the top of the file browser window;
- download single files via the right-click menu;
- download a directory by right-clicking on it and selecting "Download as an Archive".