SSH Protocol Fundamentals and Security Model
You'll learn how SSH architecture protects remote connections through layered security mechanisms and multiple authentication options.
SSH (Secure Shell) is the secure successor to plaintext protocols like Telnet and rlogin. It's designed as a three-layered protocol stack that protects every aspect of remote communication.
SSH Architecture Layers
Transport Layer establishes the encrypted channel. When you connect, the client and server negotiate encryption algorithms, exchange keys using Diffie-Hellman, and verify the server's host key. This prevents eavesdropping and man-in-the-middle attacks. Think of it as building a private, sealed tunnel before sending any data.
Authentication Layer proves who you are. SSH supports multiple methods:
- Password authentication: convenient but vulnerable to brute force
- Public key authentication: cryptographic proof using key pairs (recommended)
- Host-based authentication: trusts entire machines
- Keyboard-interactive: supports multi-factor and custom challenges
The authentication layer runs inside the encrypted tunnel, so credentials never travel in plaintext.
Connection Layer multiplexes multiple logical channels over one SSH connection—simultaneous shell sessions, file transfers, and port forwards all share the same secure tunnel.
Security Properties
SSH provides the CIA triad for remote access:
- Confidentiality: All data encrypted with algorithms like AES or ChaCha20
- Integrity: Message Authentication Codes (MACs) detect tampering—even one altered bit fails verification
- Authentication: Both server and client prove identity before any sensitive data flows
This defense-in-depth approach means even if one mechanism weakens, others compensate. Public key authentication with strong host key verification provides mutual trust without ever transmitting secrets.
Key Takeaway: SSH's layered architecture—transport encryption, flexible authentication, and multiplexed connections—delivers comprehensive protection against eavesdropping, tampering, and impersonation for remote system administration.