SSH#
A plain SSH connection is a text-based terminal session to a KLC node — the lightest-weight of the connection options, and the one that pairs most naturally with scripts, scheduled jobs, and version-controlled code.
Substitute any hostname from the list below for klc0305 in the examples on this page. See KLC Login Hostnames for how to pick a node.
klc0202.quest.northwestern.edu
klc0203.quest.northwestern.edu
klc0301.quest.northwestern.edu
klc0302.quest.northwestern.edu
klc0303.quest.northwestern.edu
klc0304.quest.northwestern.edu
klc0305.quest.northwestern.edu
klc0306.quest.northwestern.edu
klc0307.quest.northwestern.edu
klc0401.quest.northwestern.edu
klc0402.quest.northwestern.edu
klc0503.quest.northwestern.edu
Mac Instructions#
Mac computers come with the Terminal program already installed as a standard program.
To create a “plain” (not graphical) connection to a specific KLC node, open Terminal and type:
ssh your-netid@klc0305.quest.northwestern.edu
If you prefer a graphical (X11) interface, just add the -Y option:
ssh -Y your-netid@klc0305.quest.northwestern.edu
Occasionally you might receive an error that says something like “host key verification failed.” Most of the time, you can fix these problems by deleting your host key file and trying again:
rm ~/.ssh/known_hosts
Note
Depending on the version of your Mac, you might need to install the free XQuartz application before X11 forwarding will work.
Windows Instructions#
Windows 10 and later come with an SSH client built in, so there’s nothing to install for a plain-text connection. Open PowerShell and type:
ssh your-netid@klc0305.quest.northwestern.edu
Occasionally you might receive an error that says something like “host key verification failed.” Most of the time, you can fix these problems by deleting your host key file and trying again:
Remove-Item ~\.ssh\known_hosts
If you need a graphical interface on Windows, connect with KLC OnDemand or FastX. PowerShell’s built-in SSH client is for plain terminal sessions only.
Passwordless SSH Login#
Passwordless SSH login allows you to securely access remote servers without typing your password each time. It uses SSH key pairs (public/private keys) for authentication instead of passwords.
Benefits:
Convenience: No need to repeatedly enter passwords when logging in or running automated tasks.
Security: Stronger authentication using cryptographic keys, reducing the risk of brute-force attacks.
Automation: Essential for running scripts, transferring files, or syncing data across servers without manual intervention.
Faster access: Speeds up workflows for data analysis, code deployment, or managing remote jobs.
Text instructions:
Generate an SSH key pair.
Run the following command in the Terminal app on macOS or Command Prompt/PowerShell on Windows:
ssh-keygen -t rsa
After running this, two files are created in your
~/.sshdirectory:File
Description
id_rsaYour private key — keep this secure and never share it
id_rsa.pubYour public key — safe to share with servers
Copy the public key
id_rsa.pubto KLC.On macOS or Linux, run the following command in the Terminal:
ssh-copy-id your_netid@klc0305.quest.northwestern.eduTo add it manually (works for all OS):
On your local machine, open
id_rsa.pubin a text editor and copy its contents.Open an SSH session to KLC, and create the
.sshdirectory if it doesn’t exist:mkdir -p ~/.ssh
Then paste the contents of
id_rsa.pubinto the file:nano ~/.ssh/authorized_keys
Update permissions on KLC.
Open an SSH session to KLC and update permissions:
chmod 700 ~/.ssh chmod 600 ~/.ssh/authorized_keys
See Also#
VS Code with the Remote-SSH extension builds a full graphical editor on top of this same SSH connection.