RFC 4253 — SSH Transport Layer

The Secure Shell (SSH) Transport Layer Protocol — provides server authentication, confidentiality, and integrity for remote access. Foundation of SSH used for secure system administration.

Standards Track January 2006 ISO 27001

1. Introduction

▶

The SSH Transport Layer Protocol provides server host authentication, encryption, and integrity protection over an insecure network. It is the foundation for SSH — the most widely used protocol for secure remote system administration.

ISO 27001 Relevance: A.8.20 (Network Security) — encrypted remote access channel. A.8.5 (Secure Authentication) — host key verification and algorithm negotiation. A.8.2 (Privileged Access) — SSH is the primary protocol for administrative access to servers.

2. Protocol Layers

▶
  ┌──────────────────────────┐
  │  Connection Protocol     │  Channels, port forwarding
  │  (RFC 4254)              │
  ├──────────────────────────┤
  │  User Authentication     │  Password, publickey, keyboard-interactive
  │  (RFC 4252)              │
  ├──────────────────────────┤
  │  Transport Layer         │  Key exchange, encryption, integrity, compression
  │  (RFC 4253 — this doc)   │
  ├──────────────────────────┤
  │  TCP                     │  Port 22
  └──────────────────────────┘

3. Key Exchange

▶

SSH key exchange establishes shared secrets for encryption and integrity:

AlgorithmStatusISO A.8.24
curve25519-sha256RECOMMENDEDStrong — modern
ecdh-sha2-nistp256REQUIREDStrong
diffie-hellman-group16-sha512RECOMMENDEDStrong (4096-bit)
diffie-hellman-group14-sha256REQUIREDMinimum acceptable
diffie-hellman-group1-sha1HISTORICMUST NOT use

4. Host Key Verification

▶
  • First connection: Client verifies server's host key against known_hosts or out-of-band fingerprint
  • Trust-on-first-use (TOFU): Common but vulnerable to MITM on initial connection
  • Certificate-based: SSH certificates (ssh-keygen -s) provide CA-based host verification — RECOMMENDED for enterprise (A.8.24)
  • SSHFP DNS: Host key fingerprints published in DNS with DNSSEC validation (RFC 4255)

5. Encryption & MAC

▶
CipherStatusNotes
chacha20-poly1305@openssh.comRECOMMENDEDAEAD — no separate MAC needed
aes256-gcm@openssh.comRECOMMENDEDAEAD — AES-GCM
aes256-ctrREQUIREDNeeds separate MAC
aes128-cbcDEPRECATEDCBC mode vulnerable to plaintext recovery
3des-cbcHISTORICMUST NOT use

6. Security Considerations

▶
  • Disable password auth: Use public key or certificate authentication only (A.8.5)
  • Key rotation: Rotate host keys and user keys periodically
  • Bastion hosts: Use SSH jump hosts (ProxyJump) for defense-in-depth access to internal systems
  • Agent forwarding: Use with caution — compromised intermediate host can use forwarded agent
  • Logging: Log all SSH sessions including commands for audit trail (A.8.15)