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:
- Open a command line program/terminal locally on your computer.
- If you are using Windows, open the PowerShell.
- If you are running MacOS, open the Terminal.
-
If you are using Linux, open the Terminal.
-
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 -
If you are attempting to ssh into Matrix for the first time, you may need to accept the fingerprint. (type
yesand hit Enter key) -
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.
-
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:~$ _
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:
-
From your terminal, transfer the public SSH key file from your computer
scp ~/.ssh/id_rsa.pub <your_vt_pid>@matrix.math.vt.edu:~ -
Connect to Matrix:
ssh <your_vt_pid>@matrix.math.vt.edu -
On Matrix, verify that the
id_rsa.pubfile was transferred successfully to Matrix by listing the files in the home directory, and then looking through the output.cd ~ ls -
Create the directory
.sshNote: The use of themkdir -p .ssh-poption is explained in the manual, run:man mkdir -
Copy the content of the transferred public SSH key to a list of authorized keys:
cat ~/id_rsa.pub >> ~/.ssh/authorized_keys -
Finally, remove the transferred SSH key file from the home directory:
rm ~/id_rsa.pub -
Check that the the
id_rsa.pubfile was removed with thelscommand.
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.