Skip to content

Matrix @ VT-Math

Background

We use Virginia Tech's computing facilities for our code developments in this course. The computing resources are: - VT Mathematics Department's server called "Matrix"

To access those resources, we use the Secure Shell (SSH) to log into remote computers hosted on VT's campus from a command line interface. Depending on your operating system the command line interface you use will be one of these programs: - on Windows: PowerShell - on macOS: Terminal - on Ubuntu Linux: Terminal

After logging into any of VT's computers, the terminal will be that of a Linux operating system, because all computing resources are running Linux.

Important

To access VT's computing resources, you either need to be on campus or you need to connect to campus via the VPN (aka. Pulse Secure / Ivanti).

Logging into Matrix

Steps:

  1. Open a command line program/terminal locally on your computer.
  2. If you are using Windows, open the PowerShell.
  3. If you are running MacOS, open the Terminal.
  4. If you are using Linux, open the Terminal.

  5. From your terminal, initiate to connect to the server (i.e., "ssh into the matrix"). Run the command: (where you replace <your_vt_pid> with your actual PID)

    ssh <your_vt_pid>@matrix.math.vt.edu
    

  6. If you are attempting to ssh into Matrix for the first time, you may need to accept the fingerprint. (type yes and hit Enter key)

  7. When asked for your password, you enter the password associated with your PID. Note that the cursor in the terminal will not move even though you are entering the password.

  8. If you managed to successfully ssh into Matrix for the first time, you need to change the one-time password: type `passwd`` after logging in, to provide a new password.

Outcome

When logging into Matrix via ssh successfully, you will see at the bottom of the command line a prompt like this

<your_vt_pid>@matrix:~$ _
Run the command to **P**resent the current **W**orking **D**irectory (pwd + Enter)
<your_vt_pid>@matrix:~$ pwd
/home/<your_vt_pid>
/home/<your_vt_pid> is your home directory on the server.

Transfer SSH public-key to Matrix

Requires the completion of the step: - Set up SSH keys on your computer

These steps need to be done only once on Matrix.

Steps:

  1. From your terminal, transfer the public SSH key file from your computer

    scp ~/.ssh/id_rsa.pub <your_vt_pid>@matrix.math.vt.edu:~
    

  2. Connect to Matrix:

    ssh <your_vt_pid>@matrix.math.vt.edu
    

  3. On Matrix, verify that the id_rsa.pub file was transferred successfully to Matrix by listing the files in the home directory, and then looking through the output.

    cd ~
    ls
    

  4. Create the directory .ssh

    mkdir -p .ssh
    
    Note: The use of the -p option is explained in the manual, run: man mkdir

  5. Copy the content of the transferred public SSH key to a list of authorized keys:

    cat ~/id_rsa.pub >> ~/.ssh/authorized_keys
    

  6. Finally, remove the transferred SSH key file from the home directory:

    rm ~/id_rsa.pub
    

  7. Check that the the id_rsa.pub file was removed with the ls command.

Outcome

The next time you log into Matrix, you will be asked for the passphrase of your SSH key (instead of your VT PID password).

When asked to "Enter passphrase for key", this is asking for the password that you invented when creating SSH keys!

Enter the password associated with your SSH key. Note that the cursor in the terminal will not move even though you are entering the password.