$
学ぶ Linux ハンドブック
ja
XP:0
クエスト 142Key Master
+220 XP

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

このクエストの対話型ターミナルを起動する→インストール不要 • ブラウザ上で完全動作

概念と概要

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.

コマンド構文リファレンス

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

検証目標

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

クエスト完了への準備はできましたか? 142?