Skip to content
Ameen Abozaid
Planned lessonJNR-048-L04

SSH and keys

  • Lesson 4 of 7
  • Junior
On This Lesson 4 topics

This lesson is planned. The outline below lists the topics it will cover. The full lesson has not been published yet.

In this lesson

log in to a server with a key instead of a password.

Planned topics

  • SSH opens an encrypted shell on a remote machine: ssh user@host.
  • A key pair has a private key (keep secret) and a public key (put on the server).
  • Create with ssh-keygen -t ed25519; copy with ssh-copy-id or by adding it to ~/.ssh/authorized_keys.
  • Never share or commit the private key; protect it with a passphrase.
  • Disable password login on servers once keys work.
Draft outline details

Demonstration

bash
ssh-keygen -t ed25519 -C "me@laptop"
ssh-copy-id deploy@203.0.113.10
ssh deploy@203.0.113.10

Check your understanding

Which key goes on the server?

Show answer

The public key.

Practice

Apply this lesson with the module's lab, exercises and quiz.

Lab and exercises Quiz

Marking a lesson complete is optional and you can undo it any time. Your progress stays in this browser.

Continue to next lesson

Type to search levels, phases, modules and lessons.