$
Apprendre Manuel Linux
fr
XP :0
Quête 142Key Master
+220 XP

SSH Key Authentication (ssh-keygen & ssh-copy-id)

Lancer le terminal interactif pour cette quête→Aucune installation requise • S'exécute dans le navigateur

Concept et aperçu

Password authentication on remote SSH servers is vulnerable to brute-force attacks and credential stuffing. Production infrastructure relies on asymmetric SSH keypair authentication.

- ssh-keygen -t ed25519: Generates a high-security Ed25519 public/private keypair (~/.ssh/id_ed25519 and ~/.ssh/id_ed25519.pub).
- ssh-copy-id deployer@192.168.1.50: Automatically appends your local public key to the remote user's ~/.ssh/authorized_keys file, enabling passwordless login.

Let's set up key-based authentication. Generate an Ed25519 SSH keypair by running ssh-keygen -t ed25519, then install your public key onto the remote host using ssh-copy-id deployer@192.168.1.50.

Référence de syntaxe des commandes

Command / SyntaxDescription
ssh-keygen -t ed25519Generate Ed25519 SSH cryptographic keypair
ssh-copy-id user@hostCopy public key to remote host authorized_keys

Objectifs de vérification

  • ○
    Generate SSH keypair with ssh-keygen
  • ○
    Install public key with ssh-copy-id

Prêt à terminer la Quête 142?