HeadlinesBriefing HeadlinesBriefing.com

EP228: How SSH Works - Byte Byte Go

ByteByteGo •
×

Secure shell (SSH) is a method to access a remote machine securely over an unsecured network. It starts with a TCP connection from the SSH client to the remote machine (SSH server). Both machines exchange SSH versions, negotiate crypto algorithms, and run a key exchange protocol.

The SSH server sends the public key and a signature, which the client verifies. That host key is checked against the known_hosts file. Both machines derive session keys separately and never share them over the network.

The SSH client then sends the public key for authentication. The SSH server matches it against authorized_keys, and the client signs the auth request with the private key, sending a digital signature to the server. The private key never leaves your machine.

The server verifies the signature with the client's public key, completing SSH authentication and opening the session for communication.

Source: ByteByteGo · Summarized by HeadlinesBriefing