How does SSH key authentication work and why is a key pair needed?

The client keeps a private key and proves possession by signing authentication data. The server checks the signature against an authorized public key; the private key is never sent.

Короткий ответ

Что ответить на собеседовании

The client keeps a private key and proves possession by signing authentication data. The server checks the signature against an authorized public key; the private key is never sent.

Подробный разбор

Ответ с пояснениями

The client keeps a private key and proves possession by signing authentication data. The server checks the signature against an authorized public key; the private key is never sent.

The public key may be installed for an account on the server, while the matching private key stays on the client or in an agent. A passphrase protects the private key at rest but is not transmitted as the account password. Server host-key verification is a separate step that helps prevent connecting to an impostor. SSH session encryption uses negotiated session keys; user key authentication is not simply encrypting every command with the user's public key.

ИИ-помощник для собеседований

Хочешь уверенно проходить собеседования?

Попробуй ИИ-помощник для собеседований: слышит вас и собеседника, анализирует экран, подсказывает ответы в реальном времени, работает без VPN и не попадает в захват экрана.

Подробнее