Skip to content

SSH with Keys

Making life easier


Intro

Now that you are logged in we can make it easier to login in the future. If you have not logged in before follow the previous guide on how to login.

You don't whisper a password through your letter box to get into your house, most people use a key. We will use the same thing for getting access to the student server.


Step 0

Login to the student server1. If you don't know how to do this go to the previous step.


Generating Keys

To generate keys we type the following on the command line on the student server and press Enter

ssh-keygen -t ed25519
  • ssh-keygen: This is the command we run to generate the key
  • -t: This is a flag we use to specifies the type of key to create
  • ed25519: This is the type of key we want to create

Once we run this command, it will ask use for some more input, like:

  • Where we want to save the file. For now, just press Enter to keep the default location
  • What passphrase we want on the key. This is a passphase you need to use every time you want to use the key. It is strongly reccomended to set this, but it is optional
eUser2@student:~# ssh-keygen -t ed25519
Generating public/private ed25519 key pair.
Enter file in which to save the key (/users/eUser2/.ssh/id_ed25519):
Enter passphrase (empty for no passphrase):

  1. You have to go to the student server so we only need one guide on how to generate and install keys. I know all the tools to do so are going to be the same for everyone and everything you need is installed.