4. Logging in to jetstream from your local terminal with a key file

Some of us have had problems with the web shell and getting into the Jetstream portal. These materials will show you how to log in using an SSH key through your local terminal.

4.1. Concerning Keys

Cryptographic keys are a convenient and secure way to authenticate without having to use passwords. They consist of a pair of files called the public and private keys: the public part can be shared with whoever you’d like to authenticate with (in our case, Jetstream!), and the private part is kept “secret” on your machine. Things that are encrypted with the public key can be be decrypted with the private key, but it is computationally intractable (ie, it would take on the order of thousands of years) to determine a private key from a public key. You can read more about it here.

The good news is that there is already a registered public key for our Jetstream account. However, to make use of it, you’ll need the private key. And so, we move on!

4.2. Getting the Private Key

The private key has been posted on slack in the #general channel. You can download it by visiting here, selecting Actions, and pressing download.

4.3. Getting your instance IP address

In order to connect to your instance, we need to know its IP address, its unique identifier on the internet. This is listed in your instance details, circled below:

stuff

Now, things diverge a little.

4.4. On MacOS/Linux

These systems have their own terminal by default. Find and open your terminal: on MacOS, you can search for Terminal in finder.

We’re going to assume that the key file ended up in your Downloads folder. In your terminal, run:

cd && mv ~/Downloads/angus_private_key .

This puts you and the file in your home folder. Now, we need to set its permissions more strictly:

chmod 600 angus_private_key

Finally, we can use the IP address from before, along with the common login name and the key, to log in we need to use the ssh command, provide the key file with the -i flag, and then our class name (login ID) and the IP address we got above for our instance. This will look something like this:

ssh -i angus_private_key YOUR_CLASS_NAME@YOUR_IP_ADDRESS

The authenticity of host 'YOUR_IP_ADDRESS (YOUR_IP_ADDRESS)' can't be established.
ECDSA key fingerprint is SHA256:jPDtbjMUp9c7FWAvaLLwR9vWVNTOyqikzcE3m0hglG0.
Are you sure you want to continue connecting (yes/no)? yes

You should now have access to atmosphere within your local terminal.

4.5. On Windows

For Windows, we first need to actually install a terminal.

4.5.1. Install mobaxterm

First, download mobaxterm home edition (portable) and run it.

4.5.2. Start a new session

foo

4.5.3. Fill in session settings

Fill in your “remote host,” which will be the IP address from earlier. Then select “specify username” and enter your class group name (e.g. dibbears).

foo

4.5.4. Specify the session key

Copy the downloaded private file onto your primary hard disk (generally C:) and the put in the full path to it.

foo

4.5.5. Click OK

Victory!

foo