LAB: SSH to mantis without a password

Because you're a current CS student at Carleton, Mike Tie has ensured that you have an account on mantis. As a result, if you're on the Carleton network and you have a Unix terminal open, you can get a command prompt on mantis.mathcs.carleton.edu like so:

ssh YOUR_USER_NAME@mantis.mathcs.carleton.edu

(Note that if you're not on the Carleton network either in person or via the Carleton VPN, Carleton's network architecture will prevent you from reaching mantis at all.)

One of the many lovely applications of public-key cryptography is to enable you to set up a public/private key pair that will let you SSH to mantis from your own computer without typing your password.

The setup steps go roughly like this:

It gets a little more complicated if you want to have multiple key pairs for different servers (roughly, you have to edit the ~/.ssh/config file on your local machine), but it's pretty simple.

There are tons of tutorials online for how to do this, depending on your own operating system and the operating system of the computer you want to SSH into. For example, this DigitalOcean tutorial works well if your laptop's OS is Linux or macOS and the server runs Linux (like mantis) or macOS.

If your computer runs Windows, on the other hand, I haven't yet found a tutorial quite as good as the DigitalOcean one, but this one is pretty good.

Want to search for your own tutorial? Try "ssh-keygen Windows tutorial" or "ssh login without password instructions" or something like that.

What to do


Your Carleton user name, lower case:

Where does the private key live, exactly? What's its format?

Where does the public key live, exactly? What's its format?

Does this setup work with VS Code and its SSH extension?

Try to guess what is happening during the login process, based on what you know about public-key cryptography. (This is a very hard question at this stage of the class, but will be easier in a few days.)