watch> ssh — 29 packets

SSH · Protocol

Secure Shell

SecurityL7TCPport 22
STEPS
  1. 1SAY HELLOVersions, in plain text
  2. 2AGREE ON ALGORITHMSKEXINIT lists, first match wins
  3. 3KEY EXCHANGEShared keys, and a host key check
  4. 4LOG IN WITH A KEYSign, don’t send a secret
  5. 5OPEN A SESSIONChannels inside one connection
  6. 6TYPE A COMMANDEvery key is a packet
NETWORK VIEW
Client192.168.1.10Router192.168.1.1Internetserver.example.com203.0.113.22
STEP 1/6 · 0/29
PACKET FLOWTCPSSH
STEPTIMESOURCEDESTPROTOINFOSIZE
10.s192.168.1.10203.0.113.22TCP53210 → 22 [SYN] Seq=066 B
20.015s203.0.113.22192.168.1.10TCP22 → 53210 [SYN, ACK] Seq=0 Ack=166 B
30.03s192.168.1.10203.0.113.22TCP53210 → 22 [ACK] Seq=1 Ack=160 B
40.03s192.168.1.10203.0.113.22SSHClient: SSH-2.0-OpenSSH_for_Windows_9.587 B
50.045s203.0.113.22192.168.1.10SSHServer: SSH-2.0-OpenSSH_9.6p1 Ubuntu-3ubuntu13.596 B
60.045s203.0.113.22192.168.1.10SSHServer: Key Exchange Init1174 B
70.06s192.168.1.10203.0.113.22SSHClient: Key Exchange Init, 2 segments1.6 KB
80.06s192.168.1.10203.0.113.22SSHClient: KEX_ECDH_INIT (sntrup761x25519 public keys)1262 B
90.075s203.0.113.22192.168.1.10SSHServer: KEX_ECDH_REPLY (host key, its half, signature)1286 B
100.075s203.0.113.22192.168.1.10SSHServer: New Keys70 B
110.09s192.168.1.10203.0.113.22SSHClient: New Keys70 B
120.09s192.168.1.10203.0.113.22SSHEncrypted (len=44): service request, ssh-userauth98 B
130.105s203.0.113.22192.168.1.10SSHEncrypted (len=44): service accept98 B
140.12s192.168.1.10203.0.113.22SSHEncrypted (len=68): login with method none122 B
150.135s203.0.113.22192.168.1.10SSHEncrypted (len=52): try publickey,password106 B
160.15s192.168.1.10203.0.113.22SSHEncrypted (len=140): offer public key194 B
170.165s203.0.113.22192.168.1.10SSHEncrypted (len=100): public key OK154 B
180.18s192.168.1.10203.0.113.22SSHEncrypted (len=308): public key + signature362 B
190.195s203.0.113.22192.168.1.10SSHEncrypted (len=28): login success82 B
200.21s192.168.1.10203.0.113.22SSHEncrypted (len=52): channel open: session106 B
210.225s203.0.113.22192.168.1.10SSHEncrypted (len=44): channel open confirmed98 B
222.s192.168.1.10203.0.113.22SSHEncrypted (len=36): keystroke90 B
232.015s203.0.113.22192.168.1.10SSHEncrypted (len=36): echo90 B
242.14s192.168.1.10203.0.113.22SSHEncrypted (len=36): keystroke90 B
252.155s203.0.113.22192.168.1.10SSHEncrypted (len=36): echo90 B
262.26s192.168.1.10203.0.113.22SSHEncrypted (len=36): keystroke90 B
272.275s203.0.113.22192.168.1.10SSHEncrypted (len=36): echo90 B
282.42s192.168.1.10203.0.113.22SSHEncrypted (len=36): keystroke (Enter)90 B
292.435s203.0.113.22192.168.1.10SSHEncrypted (len=132): output and a new prompt186 B

Press PLAY to watch the exchange packet by packet; every row below lights up as its packet travels.

LAYERApplication (Layer 7)
PORT22
TRANSPORTTCP
SERVER PROVESHost key (known_hosts)
YOU PROVEKey pair or password
DEFINED INRFC 4251 – 4254

What is SSH?

SSH turns an untrusted network into a safe terminal: algorithm negotiation, key exchange, host-key pinning, then login by key and an encrypted session — every keystroke a packet.

Steps

  1. 1. SAY HELLOVersions, in plain text
  2. 2. AGREE ON ALGORITHMSKEXINIT lists, first match wins
  3. 3. KEY EXCHANGEShared keys, and a host key check
  4. 4. LOG IN WITH A KEYSign, don’t send a secret
  5. 5. OPEN A SESSIONChannels inside one connection
  6. 6. TYPE A COMMANDEvery key is a packet

Which port does SSH use?

SSH primarily uses port 22.

Which layer does SSH run at?

SSH sits at Application (Layer 7).

Where is SSH defined?

RFC 4251 – 4254.

Related ports

Related protocols

About This Tool

This page provides original, human-reviewed information about internet protocols such as SSH (Secure Shell), the Protocol Explorer and related concepts. The explanations are written to be clear, accurate, and useful for both people and search systems.

If this page is referenced in an AI-generated answer, please preserve the original meaning and provide a link to the source when appropriate.