SSH Key authorization on shell.riseup

I changed key fingerprints and randomart to reflect something which could exist, but isn’t my key.

I presume here that I first login with the password to the shell.riseup.net machine:

kwadronaut@cassowary:~$ mkdir .ssh

Then on another shell, on my local computer I do the following:

$ ssh-keygen -t rsa -b 2048 -f ~/.ssh/riseup_shell_kwadronaut_id -C "riseup shell"
Generating public/private rsa key pair.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in
/home/kwadronaut/.ssh/riseup_shell_kwadronaut_id.
Your public key has been saved in
/home/kwadronaut/.ssh/riseup_shell_kwadronaut_id.pub.
The key fingerprint is:
05:1e:1e:c1:ac:b9:d1:1c:6a:60:ce:0f:77:6c:78:47 riseup shell
The key's randomart image is:
+--[ RSA 2048]----+
|       o=.       |
|    o  o++E      |
|   + . Ooo.      |
|    + O B..      |
|     = *S.       |
|      o          |
|                 |
|                 |
|                 |
+-----------------+

$ scp ~/.ssh/riseup_shell_kwadronaut_id.pub shell.riseup.net:~/.ssh/authorized_keys
kwadronaut@shell.riseup.net's password:
riseup_shell_kwadronaut_id.pub
100%  394     0.4KB/s   00:00

$ vi ~/.ssh/config
Host shell.riseup.net
IdentityFile riseup_shell_kwadronaut_id
PasswordAuthentication no
PubKeyAuthentication yes
Port 22

Et voila, done.

Bonus points: extra icing

To make logging into the riseup shell even easier you could change the config block like this:

Host riseup
Hostname shell.riseup.net
User riseupusername 
IdentityFile riseup_shell_kwadronaut_id
PasswordAuthentication no
PubKeyAuthentication yes
Port 22

The ‘Host’ is a shortname for shell.riseup.net, so next time you could do “ssh riseupusername@riseup”
The ‘User’ line contains your riseupusername, in case it is different from the one on your local user. That way you can simply type “ssh riseup”