1. Create a SSH Key-Pair

Open a terminal and start the interactive generation of a new SSH key-pair. Save the private key n the folder /tmp and name it using your firstname (without blanks). For example, if your name is Alice save the private key with the path /tmp/id_alice. You can do it like this (changing the key filename to match your own, of course):

ssh-keygen -f /tmp/id_alice

The program ssh-keygen will ask for a passphrase twice. Type a passphrase of your choice and remember it: you will have to type it quite often during the school. IMPORTANT: Do not leave the passphrase empty! If the generation is successful, you will see something like this:

ssh-keygen -f /tmp/id_alice
Generating public/private rsa key pair.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /tmp/id_alice
Your public key has been saved in /tmp/id_alice.pub
The key fingerprint is:
SHA256:RJz6ek6B7z4QbUAYT0E1lbdVftsrA1khs/KUEUGxu5A student@aspp
The key’s randomart image is:
+---[RSA 3072]----+
|    .==++ooX+. ..|
|    .o..o.. O o. |
|      .+.. * +  o|
|      ooo = =   +|
|      .+SE =   ..|
|      ..... o   .|
|       oo  . o . |
|      .oo     o  |
|       ++.       |
+----[SHA256]-----+

You will have two files, one for the private key /tmp/id_alice and one for the public key /tmp/id_alice.pub.

2. Save the Public Key into the System’s clipboard

While still in the terminal, let save the public key into the system's clipboard so that we can re-use it later on GitHub. Type the following, of course using your own name and do not forget the .pub extension:

xclip -selection c /tmp/id_alice.pub

The contents of that file are now in the clipboard.

3. Upload the Public Key to your GitHub account

  • Now you want to make your public key known to GitHub, so it can be used during the school for easy authentication on GitHub. Login to GitHub: https://github.com/login
  • After login, click on your avatar on the top right of the page and in the resulting menu select Settings:

  • This will bring you to https://github.com/settings/ssh/new . Here set the title to ASPP. Leave the Key type to the default Authentication key. Paste the public key you have saved in the system's clipboard into the Key field on this page by pressing Ctrl-V:

  • When you are done, press the Add SSH Key green button right below.

You can now verify that your key has been added on the same page https://github.com/settings/keys :

4. Store the SSH Key-Pair on the USB-Stick

Now insert your USB-stick and create on it a new folder named ssh (all lowercase). Move the two keys –the private key /tmp/id_alice and the public key /tmp/id_alice.pub, of course using your own name– to that folder on the USB-stick. Make sure that both keys are in the folder. Eject the USB-stick from the file manager.

5. ASPP Organization on GitHub

If you still haven't done so, accept the invitation to join the ASPP organization on GitHub. You can do that by:

6. Verify GitHub Authentication Using Your Public Key

To verify that eveything went well, attach the USB-stick again. A window should pop-up asking you to type the passphrase for your key.

Open a terminal and try the following:

ssh -T git@github.com

If after that you get something along these lines:

Hi Alice! You've successfully authenticated, but GitHub does not provide shell access

everything went well. If you instead get something like:

git@github.com: Permission denied (publickey)

something went wrong.