thinQmaster Virtual testing partner Adaptive practice exams that find your weak spots and drill them. Every answer explained. From $69
Enroll

thinQmaster

Find your exam

Five questions free, before you decide.

Step 1 · choose a vendor

In one of our camps? Your practice exams come with the tuition — they are on your study page already.

Systems & Data Center · Intermediate

SSH Key-Based Authentication

Logging in to SSH servers with a public/private key pair instead of a password.

Definition

ssh-keygen creates a key pair (Ed25519 is preferred today), ssh-copy-id places the public key in the server's ~/.ssh/authorized_keys and the private key stays on the client. Setting PasswordAuthentication no then disables password logins.

Example

ssh-keygen -t ed25519 && ssh-copy-id admin@web01 enables key logins to web01.

Exam tip

The public key goes on the server in authorized_keys; the private key never leaves the client.

Related terms