Protocol ExplorerGuidesPricing

SSH Protocol: Key Exchange, Login and Channels

Secure Shell protects remote terminal and forwarding sessions over an encrypted transport. Key exchange, server identity and user authentication are distinct checks.

Updated · Editorial approach and simulation limits

Transport negotiation and server identity

An SSH client and server first exchange identification strings and negotiate algorithms for key exchange, encryption, integrity and compression. The key exchange establishes shared session keys and presents a server host key that the client can use to verify it reached the expected server.

A successful encrypted transport does not prove that the client trusted the host key. A changed or unknown host key should be checked against the operator’s trusted source instead of blindly accepted.

User authentication follows the transport setup

After transport protection is in place, the client authenticates a user using an enabled method such as a public key or password. Server host authentication and user authentication answer different questions: which server is this, and may this user log in?

A trace can show whether key exchange completed and whether the connection proceeds into authentication, but encrypted payloads hide later messages. Server logs are usually needed to distinguish a rejected key, account restriction or authorization rule.

Channels carry sessions and forwarding

SSH multiplexes logical channels over one protected connection. A channel can carry an interactive shell, an exec request, port forwarding or another subsystem. Multiple channels share the underlying transport, so a TCP connection is not equivalent to one terminal session.

SSH can protect application traffic forwarded through a channel, but the endpoints and configured forwarding rules still matter. Protocol Explorer presents the handshake as a teaching sequence, not a live login.

Explore SSH interactively

Follow the matching exchange packet by packet. The animation is a scripted teaching model with illustrative timing, not a capture of your network.

Open the SSH animation · Compare Free and Pro

Specification and source

For exact protocol requirements, consult the primary document: RFC 4251: The Secure Shell (SSH) Protocol Architecture. This page summarizes selected behavior and is not a substitute for the specification.

Related protocol lessons

Browse all security and access protocols · Separate authentication stages in a packet exchange