Logging In

Last updated September 11, 2024

To log in to the Laguna login node (also known as the head node), you need to use a secure shell client and a public SSH key. The secure shell client is a small application that enables you to connect to a remote computer via SSH (Secure SHell), a cryptographic network protocol for securely operating network services.

0.0.1 Generate SSH keys

Generating a key pair provides you with two long string of characters: a public and a private key. You can place the public key on any server, and then unlock it by connecting to it with a client that already has the private key. When the two match up, the system unlocks without the need for a password. You can increase security even more by protecting the private key with a passphrase.

Once the keys have been generated, update your public SSH key in your Laguna user portal profile.

0.0.1.1 Create an RSA key pair

The first step is to create the key pair on your personal computer:

$ ssh-keygen -t rsa -b 4096

This command prompts you to designate a location for the keys to be saved:

Enter file in which to save the key (/home/user_id/.ssh/id_rsa):

You can press enter here, saving the file to the default directory (e.g., /home/user_id/.ssh/id_rsa on macOS or Linux or C:\Users\user_id\.ssh\id_rsa on Windows).

Next is the passphrase prompt:

Enter passphrase (empty for no passphrase):

Using a passphrase is optional. A passphrase provides added security, but keep in mind that you have to type it in each time you use the key pair.

There will be no visual feedback as you enter your password. This is a security feature designed to obscure your password and is expected.

The entire key generation process looks something like this:

$ ssh-keygen -t rsa -b 4096
Generating public/private rsa key pair.
Enter file in which to save the key (/home/user_id/.ssh/id_rsa): 
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved in /home/user_id/.ssh/id_rsa.
Your public key has been saved in /home/user_id/.ssh/id_rsa.pub.
The key fingerprint is:
4a:dd:0a:c6:35:4e:3f:ed:27:38:8c:74:44:4d:93:67 user_id@local
The key's randomart image is:
+--[ RSA 4096]----+
|          .oo.   |
|         .  o.E  |
|        + .  o   |
|     . = = .     |
|      = S = .    |
|     o + = +     |
|      . o + o .  |
|           . o   |
|                 |
+-----------------+

The public key is now located in /home/user_id/.ssh/id_rsa.pub. The private key (identification) is now located in /home/user_id/.ssh/id_rsa.

0.0.1.2 Add public key to user portal

Once the keys are generated, copy the public key.

Mac OS:

cat ~/.ssh/id_rsa.pub | pbcopy

Windows:

cat ~/.ssh/id_rsa.pub

Navigate to the user portal and select your username in the top right corner to display the drop down menu. Select User Profile:

On the next page, delete “None” and paste the public SSH key in the Public SSH Kay (Regional cluster users only) field. Select the Update SSH Key button to the right of the text field when you’re done.

You can now SSH into the login node.

→ SSH login: macOS and Linux  

macOS users can connect to Laguna using the Terminal application that is natively installed. Linux users can similarly use the natively installed terminal application that comes with their distribution of Linux (e.g., Terminal on Ubuntu).

To connect, open a new terminal window and enter:

ssh <username>@laguna.carc.usc.edu

Make sure to substitute the username as your own. After entering the command, you will be prompted to enter your passphrase if you chose to use one.

There will be no visual feedback as you enter your password. This is a security feature designed to obscure your password and is expected.

→ SSH login: Windows  

Windows users may need to download and install a third-party SSH client to connect to Laguna. A popular client is PuTTY, which is available through the developer’s website. Another popular option is MobaXterm, which also provides file transfer capabilities. It is also available through the developer’s website. On Windows 10, there is a natively available Windows Terminal that has a built-in SSH client.

Whichever option you choose, log in using your username and optional passphrase.

0.0.1.2.1 Windows Terminal

To connect using Windows Terminal, open a new terminal window and enter:

ssh <username>@laguna.carc.usc.edu

Make sure to substitute the username as your own. After entering the command, you will be prompted to enter your passphrase if you chose to use one.

There will be no visual feedback as you enter your password. This is a security feature designed to obscure your password and is expected.