01 / JUST GIVE ME THE ANSWER

The quick answer

The server verifies a signature made with the client's private key using a trusted public key. The private key is not sent to the server.

ssh -v user@server
02 / EXPLAIN IT PROPERLY

What's going on?

The server verifies a signature made with the client's private key using a trusted public key. The private key is not sent to the server.

Understanding the underlying mechanism makes troubleshooting much easier than memorising a command in isolation.

03 / UNDER THE BONNET

Dig a little deeper

Check file permissions, authorized_keys, sshd effective settings and client debug output. An agent can hold keys without exposing the private key to the remote host.

04 / TRY IT YOURSELF

Hands-on commands

Try these in a suitable test environment. Read each command before running it, especially if you have elevated privileges.

ssh -vv user@server
ssh-add -l
sudo sshd -T | grep -i pubkeyauthentication
05 / THE RABBIT HOLE

One more thing...

Trust the maths. Verify the configuration.

Explore another mystery ↗
← Back to the knowledge base