Connecting to OSC with SSH in a terminal

Optional self-study content for week 11

Published on

November 2, 2026

Page last modified

October 13, 2026



1 Introduction

This page shows you how to connect to OSC with the ssh command in a terminal on your own computer, rather than through the OnDemand web portal.

1.1 Setting up

You’ll need a terminal application on your own computer (see step 1 below). To avoid having to type your OSC password every time you connect, first do the no-password setup on the local VS Code page.

2 Basic SSH connection in a terminal

To connect to OSC or other remote computers without using a web portal like OnDemand, you can use SSH. You can do so via the ssh command, which works in Windows and Unix-based (Max/Linux) terminals alike.

  1. On your own computer, open a terminal application.

    • On a Mac, you should have an app called “Terminal” and potentially other options like “iTerm”: any of these fill work
    • On Windows 11+, this should be called the “Windows Terminal”
  2. Type the command ssh <user>@<host>, replacing:

    • <user> with your OSC username
    • <host> with the name of the computer/cluster you want to connect to:
      • pitzer.osc.edu to connect to the Pitzer cluster
      • cardinal.osc.edu to connect to the Cardinal cluster

    For example, if I (username jelmer) wanted to log in to the Pitzer cluster, I would use:

    ssh jelmer@pitzer.osc.edu
    The authenticity of host 'pitzer.osc.edu' can't be established.
    RSA key fingerprint is 2a:b6:f6:8d:9d:c2:f8:2b:8c:c5:03:06:a0:f8:59:12.
    Are you sure you want to continue connecting (yes/no)?
  3. If this is the first time you are connecting to Pitzer via SSH, you’ll encounter a message similar to the one above. While the phrase “The authenticity of host ‘pitzer.osc.edu’ can’t be established.” sounds ominous, you will always get this warning when you attempt to connect to a remote computer for the first time, and you should type yes to proceed (you then won’t see this message again).

  4. Assuming that you did the no-password setup on the local VS Code page, you should not be prompted for your password. (If you are asked for your password, then type it followed by Enter, and keep in mind that when you do so, no characters or even *s will appear on the screen!)

  5. Your shell will now connect to OSC, and you should see some welcome messages and the familiar file quota listing – and your prompt should indicate that you’re at OSC, e.g.:

    [jelmer@pitzer-login04 ~]$

3 Custom names for your SSH connections

3.1 Set up custom names

You can set up alternative names (“aliases”) for your SSH connections, such as shortening jelmer@pitzer.osc.edu to jp. This can be convenient when you use SSH a lot, especially when transferring files to and from OSC with SSH-based commands like scp and rsync (see this optional self-study page).

These two steps should both be done on your local machine:

  1. Create a file called ~/.ssh/config:

    touch ~/.ssh/config
  2. Open the file in a text editor and add your alias(es) in the following format:

    Host <arbitrary-alias-name>
       HostName <remote-address>
       User <user>

    For instance, my file contains the following so as to connect to Pizer with jp and to Cardinal with jc:

    Host jp
       HostName pitzer.osc.edu
       User jelmer
    
    Host jc
       HostName cardinal.osc.edu
       User jelmer

3.2 Connecting from now on

From now on, you just need to use your alias to log in:

ssh jp

And these shortcuts also work with remote transfer commands like scp and rsync! For example:

rsync ~/scripts op:/fs/scratch/PAS3493
Back to top