SSH and remote work

SSH lets you log in to another machine from your phone and run commands there as if you were sitting in front of it. The key pair is the part to get right, because the two halves have very different jobs.

4 questions 1 task Read the lesson

Questions

Each one is marked as you go, and the explanation arrives straight after, which is the part worth reading.

4 questions, marked as you go.

1 In a key pair, which file is the private key?
2 Why does the SSH server on Termux listen on port 8022 rather than 22?
3 What is the point of checking the host-key fingerprint the first time you connect?
4 What does ssh-keygen -A do?

Tasks

These need your own device. Run the command in Termux, then paste what it printed. The marking looks at what the output means, so spacing, version numbers and ordering do not matter. If you have not installed anything yet, the lesson covers the setup.

Generate a key pair and read the public half

This creates an ed25519 key pair and then prints the public key, which is the half you copy to a server. It writes to a demonstration filename and creates the key without a passphrase, so it never stops to ask you anything. The lesson covers protecting a key with a passphrase, which is what you want for a key you actually use.

Run this in Termux On your own device. Nothing on this page executes it. The command runs in your terminal, and this box only reads what you paste back.

mkdir -p ~/.ssh; rm -f ~/.ssh/learmux-demo ~/.ssh/learmux-demo.pub; ssh-keygen -t ed25519 -C "you@phone" -f ~/.ssh/learmux-demo -N ""; cat ~/.ssh/learmux-demo.pub
Marking your own work Both halves of this are checked in your browser, with no server involved, so nothing stops you from pasting output you did not run. The tasks are written so that the easiest way to pass one is to actually do it and read the result, which is the whole intention.

All sets Read the lesson