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.
JupyterHub API token¶
SSH, local IDEs, and
AI agents on your own machine
authenticate to Purdue AF with a JupyterHub API token. To obtain one, open
https://cms.geddes.rcac.purdue.edu/hub/token
(or, in JupyterLab, go to File → Hub Control Panel and click the Token tab),
then click Request new API token and copy the token string.
Treat the token like a password
The token gives full control over your AF session — do not share it or commit it to a Git repository.
Instructions¶
-
Start an AF session in the normal way
In a web browser, log in to Purdue AF and start a session.
-
Obtain a JupyterHub API token — you will need it in the next step.
-
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
scp to and from this SSH server does not work — see
Uploading and downloading files for alternatives.