Fact-checked by Grok 2 weeks ago

Secure Shell

Secure Shell (SSH) is a cryptographic protocol for secure remote and other services over an insecure , employing strong symmetric , public-key , and integrity protection to prevent , tampering, and certain replay attacks. Originally developed in 1995 by Tatu Ylönen, a researcher at , SSH emerged as a response to password-sniffing exploits on university , replacing vulnerable clear-text protocols such as , rlogin, and FTP with encrypted alternatives for remote command execution, file transfer via or , and port forwarding. Ylönen released the initial implementation as in July 1995, which rapidly gained adoption before he founded SSH Communications Security to commercialize it later that year. The SSH architecture comprises three layered protocols: a for , , and server authentication; an authentication layer supporting public-key, password, and host-based methods; and a layer enabling multiplexed channels for interactive sessions, forwarded s (including X11 ), and subsystem invocation. While SSH version 1 suffered from cryptographic weaknesses like the use of and vulnerability to insertion attacks, version 2—standardized by the IETF in RFCs 4251 through 4254—introduced Diffie-Hellman and mandatory checks, rendering it the secure baseline for modern deployments. , an open-source reimplementation derived from Ylönen's code, dominates usage across systems, embedded devices, and Windows via native integration since version 10.

Overview

Definition and Core Principles

The Secure Shell (SSH) protocol is a cryptographic network protocol designed for secure remote login and other network services, such as remote command execution and , over an insecure network like the public . It establishes a between an SSH client and an SSH , replacing insecure predecessors like , rlogin, rsh, and rexec, which transmitted data in and lacked mechanisms. The protocol suite, standardized in SSH-2 (as opposed to the earlier, vulnerable SSH-1), consists of three principal components: the for connection setup, , and ; the layer for user and host verification; and the connection layer for multiplexing secure channels. At its core, SSH prioritizes three security principles: , , and . Confidentiality is achieved through symmetric encryption algorithms (e.g., ) negotiated during , protecting data from on unsecured networks. is ensured via message authentication codes (MACs), such as HMAC-SHA256, appended to packets to detect tampering or replay attacks. occurs in two phases: server authentication, typically via using host keys (e.g., or Ed25519) to prevent man-in-the-middle attacks, and optional client authentication through methods like public-key, , or challenge-response, with public-key preferred for its resistance to offline brute-force attacks. These principles are enforced from the initial , where Diffie-Hellman or variants derive shared session keys, binding the entire session to a . SSH's design emphasizes in modern implementations, where ephemeral keys prevent compromise of long-term keys from exposing past sessions, and is applied before to reduce overhead without compromising . The supports extensibility through additional algorithms and features, but mandates rejection of weak ciphers or unauthenticated connections to maintain robustness against known cryptographic vulnerabilities. This layered approach ensures that even if one component fails, the overall channel remains protected, with from widespread deployment showing SSH's effectiveness in preventing unauthorized access in environments like systems and network appliances since its in 2006.

Primary Features and Advantages

Secure Shell (SSH) establishes encrypted connections for remote login and command execution, utilizing symmetric encryption algorithms such as with 128-bit or higher keys to protect data confidentiality against interception on untrusted networks. It incorporates message authentication codes (MACs), typically HMAC-SHA1 or stronger variants like HMAC-SHA2-256, to ensure and prevent tampering during transit. Key exchange employs methods like Diffie-Hellman or Diffie-Hellman (ECDH) to negotiate session keys securely without prior shared secrets, mitigating risks from passive eavesdropping. Authentication in SSH supports using algorithms like , , or Ed25519, alongside password-based and host-based methods, enabling strong mutual verification of client and server identities. The protocol's architecture allows of multiple logical channels over a single connection, facilitating concurrent sessions for access, , and forwarded ports without establishing separate connections. capabilities—local, remote, and dynamic ( proxy)—permit tunneling of arbitrary traffic, securing applications like X11 graphical sessions or database connections through firewalls. Compared to insecure predecessors like , rlogin, and , which transmit data and credentials in , SSH eliminates to sniffing and replay attacks, significantly reducing unauthorized risks in environments like the . Secure file transfer protocols and , built atop SSH, provide authenticated and encrypted alternatives to FTP, preventing data leakage during bulk transfers. Optional reduces requirements, beneficial for low-speed links, while the protocol's extensibility supports custom channels for vendor-specific extensions without compromising core . These features contribute to SSH's ubiquity in system administration, with implementations like powering secure remote management across systems since its initial release on April 5, 1999.

Historical Development

Origins and SSH-1 (1995–1998)

The Secure Shell (SSH) protocol originated in 1995 when Tatu Ylönen, a researcher at in , addressed vulnerabilities exposed by a password-sniffing attack on the university's network. This incident highlighted the insecurity of unencrypted remote access tools like , rlogin, rsh, and rexec, which transmitted credentials in and were susceptible to on unsecured networks. Ylönen designed SSH-1 as a to enable secure remote , command execution, and , incorporating strong and authentication mechanisms without relying on centralized key infrastructure. The protocol used for host authentication to prevent spoofing and man-in-the-middle attacks, with the server listening on port 22, and supported features like X11 forwarding and port tunneling. Ylönen released the initial implementation of SSH-1, including the ssh and slogin commands, as open-source software in July 1995, rapidly gaining traction due to its utility in securing network services over public internetworks. By late 1995, adoption surged to over 20,000 users across 50 countries, with Ylönen receiving approximately 150 support emails daily from institutions including universities and corporations. This growth prompted the formation of SSH Communications Security Corp on December 31, 1995, to manage development, provide commercial support, and address the protocol's increasing demand amid export restrictions on strong cryptography. An early specification for SSH-1 (version 1.3) was outlined in an IETF Internet Draft dated November 15, 1995, formalizing its architecture for encrypted sessions initiated by clients connecting to servers. From 1996 to 1998, SSH-1 saw viral expansion, with the user base doubling annually as early adopters included major entities like , , and , despite the company's initial financial strains from unfavorable contracts and leadership changes. The protocol's free versions culminated in SSH 1.2.12, after which commercialization introduced licensing restrictions, but SSH-1 remained the dominant implementation for secure remote access during this period, filling a critical gap in cryptographic tools for systems. Limitations in SSH-1, such as weaker support and vulnerability to certain attacks, began surfacing, influencing parallel efforts toward SSH-2, though SSH-1 continued in widespread use.

SSH-2 Standardization and Improvements (1996–2006)

SSH-2, developed by SSH Communications Security in 1996, represented a fundamental redesign of the protocol to rectify inherent vulnerabilities in SSH-1, including reliance on the insecure CRC-32 checksum for packet integrity, which permitted undetected insertion attacks, and a fixed RSA-based susceptible to chosen-plaintext attacks. The new version introduced a layered comprising , user , and connection protocols, enabling algorithmic negotiation for , symmetric , and message during session establishment. This modularity supported multiple cipher suites, such as for , and replaced CRC-32 with secure Message Codes (MACs) like HMAC-MD5 or HMAC-SHA1 to verify packet integrity and authenticity. Additional enhancements included Diffie-Hellman group exchange for in key agreement, preventing compromise of long-term keys from exposing past sessions, and binary packet sequencing with explicit lengths to mitigate length-field exploits present in SSH-1. was repositioned after to avoid exposing plaintext patterns, and the protocol supported of multiple logical channels over a single connection for concurrent sessions, such as shell access and . These changes rendered SSH-2 incompatible with SSH-1 while substantially elevating resistance to cryptanalytic attacks, with empirical testing confirming no practical breaks in properly implemented instances during the era. In February 1997, the (IETF) established the SECSH working group to formalize SSH-2 specifications, addressing proprietary extensions and ensuring open interoperability amid growing adoption. The group, chaired by figures including Tatu Ylönen, iterated through over 100 Internet Drafts from 1997 onward, incorporating feedback on security analyses and algorithm robustness, such as deprecating weaker options like IDEA cipher in favor of emerging standards. Standardization efforts concluded in 2006 with the release of core RFCs on January 20 (RFC 4251 for ) and February (RFCs 4252 for , 4253 for encryption and , and 4254 for connection multiplexing), designating SSH-2 as Proposed Standard status. The SECSH group disbanded shortly thereafter, having enabled widespread deployment; by then, commercial SSH-2 servers from SSH Communications Security had been available since circa 1996, with open-source integration in following in 2.6 on December 1, 1999. This timeline reflected a decade-long shift from fixes to a robust, evolvable framework grounded in cryptographic best practices.

Transitional Protocols and Forks (SSH-1.99, OSSH)

SSH-1.99 functioned as a server-side version string during to denote dual with both SSH-1 and SSH-2, enabling backward without requiring immediate upgrades across all systems. In the , clients typically propose "SSH-1.5-" or "SSH-2.0-", prompting servers to respond with "SSH-1.99-" if they support fallback to the vulnerable SSH-1 for clients, or "SSH-2.0-" for exclusive SSH-2 operation. This non-standard identifier, lacking a dedicated , arose organically during the mid-1990s transition to address incompatibility between the original SSH-1 (released 1995) and the redesigned SSH-2 (drafted from 1996), preventing widespread service disruptions in heterogeneous environments. Implementations like early releases incorporated this signaling to maintain connectivity with SSH-1-only peers while prioritizing SSH-2 for new sessions. OSSH, initiated by Björn Grönvall in early 1999, emerged as a direct of Tatu Ylönen's SSH 1.2.12—the final open-source release of the original SSH codebase before commercialization restricted further free redistribution. Grönvall's effort concentrated on stabilizing and patching bugs in the SSH-1 implementation, addressing accumulated issues in the aging protocol without introducing SSH-2 features. This provided a clean, libre foundation that developers rapidly extended into later that year, incorporating protocol version 2 compliance, enhanced cryptography, and cross-platform portability to supplant derivatives. OSSH's role underscored the challenges of forking amid licensing shifts, as Ylönen's subsequent SSH versions (post-1.2.12) imposed restrictive terms, prompting community-driven alternatives to preserve to secure remote access tools.

OpenSSH Dominance and Evolution (1999–Present)

OpenSSH emerged in 1999 when developers from the OpenBSD project undertook a reimplementation of the SSH protocol to resolve licensing ambiguities in prior versions and establish a maintainable, secure codebase under a BSD-style license. This effort addressed the commercial restrictions of Tatu Ylönen's original SSH software, which had transitioned to non-free licensing, prompting the creation of an independent fork free from patent and proprietary encumbrances. The initial OpenSSH release integrated into OpenBSD 2.6 in December 1999, marking the start of its development as a core component of the operating system. By the early 2000s, achieved dominance among SSH implementations due to its open-source nature, rigorous security auditing by the team, and seamless integration into systems including distributions, , and macOS. Internet scans of SSH servers consistently show powering the majority of deployments, far outpacing alternatives like Dropbear, with over 130,000 vulnerable instances identified in 2015-2016 analyses alone, underscoring its ubiquity. Its permissive licensing facilitated widespread adoption in enterprise and open-source environments, supplanting proprietary SSH variants and forks like OSSH, while 's "secure by default" philosophy—emphasizing code audits and minimalism—bolstered its reputation for reliability over less-vetted competitors. Evolution since 1999 has focused on protocol enhancements, cryptographic hardening, and feature expansions to counter emerging threats. Early versions prioritized full SSH-2 compliance, deprecating insecure SSH-1 elements by default in releases like OpenSSH 2.9 (2000), which introduced stronger key exchange methods. Subsequent milestones included version 4.3 (2006) adding Layer 2/3 VPN tunneling via tun interfaces for flexible network encapsulation; OpenSSH 6.5 (2013) disabling weak ciphers like CBC modes; and OpenSSH 7.0 (2016) removing support for obsolete DSA keys at runtime. Modern updates emphasize post-quantum readiness and efficiency, such as OpenSSH 8.2 (2020) integrating FIDO/U2F hardware authentication and OpenSSH 9.0 (2022) defaulting to stronger Ed25519 keys over RSA. Ongoing maintenance by a small OpenBSD-funded team ensures frequent security patches and protocol refinements, with releases addressing vulnerabilities like the 2024 regreSSHion flaw in older versions. 10.0 (April 2025) introduced protocol tweaks for better client and optimizations, followed by 10.2p1 (October 2025) with fixes for edge-case denial-of-service issues. This iterative approach, supported by minimal external , sustains its edge in security without bloating the codebase, distinguishing it from less-audited implementations.

Recent Releases and Updates (2020–2025)

8.2p1, released in February 2020, introduced support for /U2F security keys using public key authentication with ECDSA and Ed25519 variants, enabling hardware-backed authentication to mitigate risks associated with passwords. This update also deprecated the ssh-rsa signature algorithm with due to its cryptographic weaknesses, reflecting ongoing efforts to phase out insecure primitives. Subsequent releases in the 8.x series, such as 8.3p1 in April 2020 and 8.4p1 in September 2020, focused on security hardening, including fixes for potential information leaks in the provider and improvements to scp(1) for better handling of remote-to-local transfers. By 9.0p1, released on April 8, 2022, support for the Prime key exchange algorithm was added, providing a hybrid post-quantum secure option combined with X25519 to prepare for potential threats without relying solely on unproven lattice-based schemes. In July 2024, addressed CVE-2024-6387, known as regreSSHion, a critical signal handler in sshd(8) affecting glibc-based systems from versions 8.5p1 through 9.7p1, which could allow unauthenticated remote code execution with root privileges under rare conditions; mitigation involved updating to patched versions like 9.8p1. OpenSSH 10.0, released on April 9, 2025, included enhancements to key management and protocol robustness, though specific details emphasized continued deprecation of legacy ciphers and improved for concurrent sessions. Later in 2025, 9.9p2 on February 18 fixed multiple vulnerabilities, including CVE-2025-26465, a man-in-the-middle flaw in ssh(1)'s VerifyHostKeyDNS option affecting versions 6.8p1 to 9.9p1, and CVE-2025-26466, a denial-of-service issue in sshd(8). 10.1 followed on October 6, 2025, with key fixes and performance optimizations for and SSH-2.0 operations, while 10.2 on October 10 further refined these with additional bug resolutions.
VersionRelease DateKey Updates
8.2p1February 2020FIDO/U2F support; SHA-1 ssh-rsa deprecation.
9.0p1April 8, 2022NTRU Prime hybrid key exchange for quantum resistance.
9.8p1+July 2024Fix for regreSSHion (CVE-2024-6387) RCE vulnerability.
9.9p2February 18, 2025MitM (CVE-2025-26465) and DoS (CVE-2025-26466) fixes.
10.0April 9, 2025Key management enhancements; legacy cipher deprecations.
10.1October 6, 2025Security fixes and SFTP performance improvements.
10.2October 10, 2025Additional bug fixes and protocol refinements.

Technical Architecture

Protocol Components and Layers

The SSH protocol operates over , typically on port 22, and features a modular, layered designed to provide secure remote access and data transfer. This structure separates concerns into three interdependent components: the protocol, the user protocol, and the protocol. The establishes the foundational , upon which the authentication and connection layers build to enable user-specific access and multiplexed sessions. The transport layer protocol (defined in RFC 4253) handles initial connection setup, server authentication, key exchange, encryption, integrity protection, and optional compression. It begins with version exchange and algorithm negotiation, followed by Diffie-Hellman key exchange (or equivalent methods like elliptic curve variants in modern implementations) to derive session keys. Server authentication occurs via public host keys, typically RSA or ECDSA, to verify the server's identity and prevent man-in-the-middle attacks. Once established, all subsequent data is encrypted using negotiated symmetric ciphers (e.g., AES in GCM or CTR mode) and protected by message authentication codes (e.g., HMAC-SHA2). Binary packets form the core data unit, consisting of packet length, padding, payload, and MAC fields, with compression (e.g., zlib) applied optionally before encryption. This layer ensures confidentiality and integrity for the entire session but does not handle user identity. The user authentication protocol (RFC 4252) runs atop the after a is formed, focusing on verifying the client's identity to the server. It supports multiple authentication methods, requested sequentially until success or failure: public-key authentication using pre-shared keys, password-based (transmitted encrypted), host-based (for trusted hosts), or none (insecure, deprecated). The client initiates a service request for "ssh-userauth," followed by method-specific exchanges, with the server enforcing policies like maximum attempts to mitigate brute-force risks. This protocol binds user credentials to the encrypted without exposing them in plaintext. The connection protocol (RFC 4254) operates over the authenticated transport, multiplexing the secure tunnel into logical channels for diverse services. Channels support shell access, command execution ("exec"), subsystems (e.g., for file transfer per 4251 extension), and (local/dynamic/remote). Each channel is identified by local and remote IDs, with data flow controlled via window adjustments and packet types for opening, confirming, data transfer, and closing. This enables features like X11 forwarding or TCP/IP tunneling while maintaining isolation between channels. The protocol's extensibility allows custom channels via IETF-registered names.

Connection Negotiation and Handshake

The Secure Shell (SSH) version 2 establishes a secure through a multi-phase over a initiated by the client to the on port 22. This process ensures mutual agreement on cryptographic parameters, derivation of session keys, and authentication before any sensitive data exchange occurs. The commences immediately after the three-way , with the client and server exchanging identification strings in the format SSH-protoversion-softwareversion[SP]comments<CR><LF>. The protoversion must specify "2.0" for compatibility; the client sends first, and the responds within 60 seconds or terminates the if versions mismatch. These strings, limited to 255 characters excluding the , identify software versions (e.g., "SSH-2.0-OpenSSH_9.8") but convey no further details at this stage. Algorithm negotiation follows via the unencrypted SSH_MSG_KEXINIT messages sent independently by both parties. Each message lists supported options in preference order for key exchange methods (e.g., curve25519-sha256, diffie-hellman-group-exchange-sha256), server host key algorithms (e.g., ssh-ed25519, rsa-sha2-512), cipher suites (e.g., [email protected], [email protected]), message authentication codes (e.g., those implicit in AEAD ciphers), compression algorithms (typically "none"), and languages (often empty). The first mutually supported algorithm from the intersecting lists is selected; the negotiation cookie (random 16 bytes) and future extensions (e.g., RFC 8308 for explicit capability exchange) are also included, with failure to agree prompting disconnection. Key exchange then computes a using the selected method, such as elliptic-curve Diffie-Hellman (ECDH) or traditional Diffie-Hellman. The client initiates with SSH_MSG_KEX_ECDH_INIT (or equivalent, e.g., SSH_MSG_KEXDH_INIT for DH), providing its ephemeral public key Q_C. The server replies via SSH_MSG_KEXDH_REPLY (or SSH_MSG_KEX_ECDH_REPLY), supplying its ephemeral public key Q_S, the server's host public key K_S, and a signature over the exchange hash H using K_S. The hash H—the session identifier—is derived by hashing concatenated data: version strings, KEXINIT payloads, I_C (client public value), I_S (server public value), and K_S. The K emerges from the private keys and peer public values, enabling in ephemeral exchanges. Session keys and protection derive from K and H via the negotiated (e.g., SHA-256): initial IVs (V_C, V_S), keys (K_C, K_S), keys (H_C, H_S), and an inner for . The server authenticates via the signature on H, verified by the client against its known_hosts file or equivalent to detect man-in-the-middle attacks; client public keys remain unauthenticated here, deferred to the user . The handshake concludes with both sides sending SSH_MSG_NEWKEYS using residual plaintext or prior keys; receipt activates the new cipher, MAC, and compression for all subsequent traffic, establishing the protected transport layer. Rekeying repeats this process periodically (e.g., after 1 GB data or 1 hour) to limit key exposure. This sequence, defined in RFC 4253 (2006), underpins SSH-2's security, with modern implementations favoring quantum-resistant or high-strength primitives per updated IETF guidance.

Session Management and Multiplexing

The SSH Connection Protocol multiplexes multiple logical over a single encrypted connection provided by the underlying Protocol, enabling efficient handling of diverse services such as interactive login sessions, remote command execution, and without requiring separate connections for each. This occurs at the application level, where operate independently but share the secure tunnel's and cryptographic context, with flow control managed per to prevent . Each is identified by a unique 32-bit sender channel number allocated by the initiator, ensuring isolation of data streams despite the shared connection. To establish a , the client transmits an SSH_MSG_CHANNEL_OPEN message specifying the channel type (e.g., "session" for shell access or command execution, "direct-tcpip" for client-initiated ), the sender channel number, an initial receive window size (typically 1 MB or more for buffering ), and the maximum packet size (capped at 32,768 bytes by limits). The server responds with SSH_MSG_CHANNEL_OPEN_CONFIRMATION if successful, providing its own recipient channel number and echoing the window and packet parameters, or SSH_MSG_CHANNEL_OPEN_FAILURE with an (e.g., 2 for SSH_OPEN_ADMINISTRATIVELY_PROHIBITED) if denied. transfer on an open channel uses SSH_MSG_CHANNEL_DATA for standard input/output streams and SSH_MSG_CHANNEL_EXTENDED_DATA for auxiliary streams like stderr (identified by subtype 1), with recipients adjusting flow via SSH_MSG_CHANNEL_WINDOW_ADJUST to replenish the window as data is processed. Channels terminate gracefully with SSH_MSG_CHANNEL_EOF to signal , followed by SSH_MSG_CHANNEL_CLOSE to deallocate resources, though either party may force closure unilaterally. Channel-specific configuration occurs through SSH_MSG_CHANNEL_REQUEST messages, which allow requests like "pty-req" to allocate a pseudo-terminal with dimensions and modes (e.g., echoing enabled), "shell" to invoke an interactive , "exec" to run a single command, or "subsystem" for specialized services such as (invoking the "sftp" subsystem). These requests support a "want reply" flag; affirmative responses use SSH_MSG_CHANNEL_SUCCESS, while failures trigger SSH_MSG_CHANNEL_FAILURE, enabling reliable session setup. For instance, a remote execution session opens a "session" channel, followed by an "exec" request with the command string, stdin piped via data messages, and stdout/stderr multiplexed back over the same . In implementations like , protocol-level channel is augmented by connection-level via the ControlMaster directive in ssh_config, which establishes a persistent "master" process maintaining an idle connection and a Unix-domain control for subsequent client invocations to . When enabled (e.g., ControlMaster auto), the first connection creates the master; later sessions connect via the control path (default ~/.ssh/cm-%r@%h:%p), avoiding full handshakes and reducing by up to 90% for repeated accesses, as measured in benchmarks on high-latency networks. Idle masters can be configured to exit after a timeout (via ControlPersist), and explicit commands like ssh -O exit hostname terminate them, preventing resource leaks. This feature, introduced in 3.9 (March 2005), optimizes for scenarios like scripted remote operations but requires compatible server support and careful configuration to handle network interruptions, as control paths do not automatically recover from TCP drops.

Authentication and Key Management

Public-Key Authentication Mechanics

Public-key authentication in SSH, as defined in the protocol's authentication layer, relies on asymmetric to verify the client's of a private corresponding to a pre-authorized public without transmitting sensitive credentials over the network. The client generates a key pair using algorithms such as , , or ECDSA, retaining the private and installing the public on the in a file like ~/.ssh/authorized_keys for the target . This method, mandatory in SSH-2 implementations per RFC 4252, initiates after the establishes an encrypted channel and exchanges a unique session identifier during , which prevents replay attacks by binding to the specific session. The authentication process begins with the client sending an initial query message to probe support: a packet formatted as byte SSH_MSG_USERAUTH_REQUEST (), followed by the username string, service name (typically "ssh-connection"), the method string "publickey", a FALSE indicating query mode, the public key name (e.g., "ssh-rsa"), and the public key . The responds with SSH_MSG_USERAUTH_PK_OK (60) if the public key is acceptable for the user—echoing the algorithm and —or SSH_MSG_USERAUTH_FAILURE listing remaining methods. This query step allows the client to avoid signing unless necessary, conserving computational resources. Upon approval, the client constructs and sends the authentication request: byte SSH_MSG_USERAUTH_REQUEST, username, service, "publickey", boolean TRUE, algorithm name, public key blob, and a signature string produced by the private key. The signed data comprises the session identifier (concatenated as a string), the byte value of SSH_MSG_USERAUTH_REQUEST, the username, service name, "publickey", TRUE boolean (as a byte), algorithm name, and public key blob—ensuring the signature proves knowledge of the private key while tying it to the live session and proposed credentials. The signature format adheres to the algorithm's specification, such as for , and may include certificates if supported. The server verifies by first confirming the public key blob matches an entry authorized for the user in its key database, then using the public key to validate the against the constructed data string. Successful verification grants access, yielding SSH_MSG_USERAUTH_SUCCESS; failure prompts SSH_MSG_USERAUTH_FAILURE. This design ensures causal proof of identity through cryptographic possession rather than shared secrets, mitigating risks like sniffing, though it requires secure private key storage and protection against key compromise via server-side authorized_keys validation.

Password and Host-Based Methods

Password authentication in the SSH protocol, designated as the "password" method, involves the client transmitting the user's —encoded in ISO-10646 —within an encrypted SSH_MSG_USERAUTH_REQUEST message after the server issues an SSH_MSG_USERAUTH_REQUEST with the method name "password" and a FALSE indicating no change request. The server verifies the password against its backend, responding with SSH_MSG_USERAUTH_SUCCESS on success or SSH_MSG_USERAUTH_FAILURE on failure; if the password has expired, it may send SSH_MSG_USERAUTH_PASSWD_CHANGEREQ, prompting the client to submit old and new passwords in a subsequent request with TRUE. This method requires the underlying to provide , as unencrypted transmission would expose credentials; implementations must normalize passwords per 4013 to handle equivalences. Despite encryption during transit, password carries inherent risks, including vulnerability to online brute-force or dictionary attacks against the , where attackers exploit weak or reused passwords common in human-generated sets. Even with defenses like rate-limiting or tools such as Fail2Ban, it remains less secure than public-key methods, as compromised logs or could enable offline cracking if passwords are not salted and hashed robustly on the backend. All SSH implementations are required to support this method, but security guidance from designers emphasizes disabling it in favor of stronger alternatives unless necessary for . Host-based client , known as the "hostbased" , authenticates the by verifying the originating 's rather than individual credentials, using the client host's private to sign a request containing the server's host , the client's fully qualified , the client , and the name. The server checks that the provided host matches its known keys for the claimed , verifies the , confirms the client's aligns with the to prevent spoofing, and authorizes the from that via local policy (e.g., authorized_keys files prefixed with "from=" or system-wide equivalents). This assumes the client remains uncompromised and its private secure, with the ensuring the request originates from the legitimate . Host-based authentication is optional and discouraged for high-security environments due to its reliance on host , which can be undermined by spoofing, compromised client hosts exposing the private , or inadequate address , echoing vulnerabilities of pre-SSH protocols like RSH. Best practices recommend restricting it to controlled networks, combining it with additional checks, and often disabling it entirely in server configurations (e.g., via HostbasedAuthentication no in OpenSSH's sshd_config) to mitigate risks from untrusted clients. RFC 4252, published in 2006, formalized these methods within the SSH-2 framework to replace insecure predecessors while highlighting their limitations.

OpenSSH-Specific Key Handling and Best Practices

OpenSSH employs the ssh-keygen utility for generating, converting, and managing asymmetric key pairs used in public-key authentication, emphasizing secure formats and cryptographic primitives tailored to its implementation. As of OpenSSH version 9.8 (released October 2024), the preferred key type for new generations is Ed25519, which offers high security (equivalent to 128-bit symmetric strength) with compact 256-bit keys, resistance to certain side-channel attacks, and superior performance compared to larger RSA keys. Ed25519 was introduced in OpenSSH 6.5 (January 2014) and supersedes older types like DSA (deprecated since OpenSSH 7.0 in 2015 due to vulnerability to discrete logarithm attacks) and RSA with SHA-1 signatures (disabled by default in OpenSSH 8.8, March 2021, for weakness against collision attacks). For legacy compatibility, RSA keys should use at least 3072 bits with SHA-2 signatures (rsa-sha2-512), but Ed25519 remains optimal for most use cases. Key generation is performed via ssh-keygen -t ed25519 -C "user@host", producing a private key (e.g., id_ed25519) and public key (e.g., id_ed25519.pub). A strong is essential to encrypt the private key using a (KDF), preventing offline brute-force attacks if the file is compromised; defaults to 16 rounds of PBKDF2-HMAC-SHA512 in the legacy format but recommends the newer format (-o flag) since version 7.8 (August 2018), which employs KDF with configurable rounds (default 16, increasable via -a for added entropy resistance). Hardware-backed variants like ed25519-sk or ecdsa-sk (supported since 8.2, February 2020) integrate with security keys (e.g., FIDO2/), storing private keys off-system to mitigate theft risks. Private keys must be stored in ~/.ssh/ with permissions chmod 700 ~/.ssh for the and chmod 600 for the key (owner read/write only), as 's sshd enforces StrictModes yes (default since early versions) to reject keys with broader access, reducing exposure to local attackers. Public keys are appended to the server's ~/.ssh/authorized_keys (one per line, base64-encoded), with permissions ideally 600 to prevent tampering, though 644 is tolerated if not group- or world-writable; parses options in this file (e.g., from="192.0.2.0/24", command="restricted-shell", no-port-forwarding) to enforce granular restrictions like binding or command whitelisting. Best practices include periodic key rotation (e.g., annually or upon personnel changes) to limit breach impact, auditing authorized_keys for orphans via scripts or tools, and leveraging ssh-agent (ssh-add -t 3600 for timed loading) to cache decrypted keys without repeated passphrase entry, while avoiding permanent passphrase-less keys except for automated, firewalled systems. Backups of private keys should be encrypted and stored offline, never in shared repositories. For scaled environments, OpenSSH's built-in certificate authority support (ssh-keygen -s ca_key) enables short-lived signed certificates over individual keys, revocable via revoked_keys file, enhancing manageability without CA proliferation risks.

Cryptographic Primitives

Key Exchange Algorithms

The Secure Shell (SSH) protocol employs (KEX) algorithms during the handshake to generate a between client and server, enabling derivation of symmetric keys for and integrity without transmitting the secret directly. This process, initiated after version , typically incorporates ephemeral keys for (PFS), protecting past sessions if long-term keys are compromised. The algorithm selection occurs via the "kex_init" message, where both parties propose supported methods in order of preference, selecting the first mutual match. Early SSH-2 implementations, as defined in RFC 4253 (2006), required support for diffie-hellman-group1-sha1, utilizing a fixed 1024-bit prime modulus group with for key derivation; this method, while providing PFS, relies on parameters vulnerable to precomputation attacks like those demonstrated in the Logjam vulnerability (CVE-2015-4000), rendering it insecure against sufficiently resourced adversaries. Extensions in RFC 4419 (2006) introduced diffie-hellman-group-exchange-sha1, allowing dynamic group negotiation for larger sizes (e.g., 2048+ bits), but retention of SHA-1 hashing—now deprecated due to collision vulnerabilities—limits its viability. Similarly, diffie-hellman-group14-sha1 employs a predefined 2048-bit group from RFC 3526 but shares SHA-1 weaknesses, prompting deprecation in modern standards. To address SHA-1 flaws, updated methods like diffie-hellman-group14-sha256 and diffie-hellman-group16-sha512 pair classic Diffie-Hellman with SHA-256 or SHA-512 hashing, supporting 2048-bit and 8192-bit groups respectively for enhanced resistance to discrete logarithm attacks; the latter requires significant computational resources for the server, balancing security against performance. Elliptic curve variants, specified in RFC 5656 (2009), include ecdh-sha2-nistp256, ecdh-sha2-nistp384, and ecdh-sha2-nistp521, leveraging NIST P-curves for faster computation and smaller key sizes while maintaining comparable security levels to larger DH groups. However, these NIST curves have drawn criticism for non-constant-time implementations and perceived risks of deliberate weakening, as noted in cryptographic analyses favoring alternative curves. Post-quantum considerations and efficiency have elevated Curve-based methods: 8731 (2020) defines curve25519-sha256 (using X25519 for 128-bit security) and curve448-sha512 (X448 for 224-bit security), both offering resistance to timing attacks via Montgomery ladder computations and avoidance of cofactor issues in counterparts. 9142 (2022) explicitly recommends these alongside diffie-hellman-group16-sha512 as preferred for new deployments, explicitly deprecating all SHA-1-based KEX due to practical collision exploits and weak DH subgroups susceptible to number field sieve attacks. Implementations like (version 9.8, released September 2024) prioritize curve25519-sha256 by default, with configurable support for others via the KexAlgorithms directive, excluding legacy weak options unless explicitly enabled. The IANA registry maintains an exhaustive, standards-approved list of over 20 methods, updated periodically to reflect consensus on emerging threats.

Symmetric Ciphers and Message Authentication

In the SSH protocol, following and derivation of session keys, bulk data transmission employs a negotiated symmetric for confidentiality. The client and server agree on algorithms such as in CTR or GCM modes, or ChaCha20, with keys typically 128, 192, or 256 bits in depending on the . These ciphers operate in packet-based mode: each binary packet consists of a 4-byte , optional , the , and a MAC tag, with the , , and encrypted using the session encryption key and (IV). implementations support ciphers including aes128-ctr, aes192-ctr, aes256-ctr, [email protected], [email protected], and [email protected], with the latter two providing . Message authentication in SSH ensures and replay protection via a computed over the packet sequence number (to prevent reordering or duplication), unencrypted packet length, padding length, payload, and padding, using a separate MAC derived during . Traditional MAC algorithms include HMAC-SHA1, HMAC-SHA2-256, or UMAC, appended after the encrypted packet data; the MAC length matches the output size, such as 256 bits for HMAC-SHA2-256. This "encrypt-then-MAC" construction protects against tampering, as any alteration to the would invalidate the MAC upon decryption and at the receiver. Modern SSH favors with Associated Data (AEAD) modes like or AES-GCM, which integrate symmetric encryption and authentication into a single primitive, computing a over the and associated unencrypted data (e.g., sequence number and length). These eliminate separate MACs, reducing overhead and vulnerabilities in non-AEAD setups, such as padding oracle attacks; defaults to [email protected] for its resistance to timing attacks on software implementations without . uses a 256-bit key and 96-bit , generating a 128-bit Poly1305 , while AES-GCM leverages Galois/Counter Mode for parallelizable encryption. Older ciphers like 3DES-CBC or Blowfish-CBC, once common, are now deprecated in favor of AES-CTR or AEAD due to weaknesses such as small block sizes and vulnerability to attacks. Recommendations emphasize configuring servers to prioritize 256-bit keys for quantum resistance and disabling legacy options; for instance, AES-256-GCM offers high performance on hardware-accelerated systems, outperforming CTR modes by up to 20-30% in benchmarks.

Deprecations and Modern Recommendations (e.g., ed25519)

The (ssh-dss) public key algorithm has been deprecated due to its structural limitations, including maximum key sizes of 1024 bits and vulnerability to attacks from insufficient randomness in . version 7.0, released in August 2016, disabled ssh-dss support by default at runtime. DSA compilation support became optional starting in early 2024, with default runtime disabling in mid-2024 and complete removal planned for the first release of 2025. The ssh-rsa signature scheme, which pairs public keys with hashing, was deprecated in due to SHA-1's susceptibility to collision attacks demonstrated in 2017. A notice appeared in OpenSSH 8.3 released in October 2020, with ssh-rsa disabled by default in version 8.8 released on September 26, 2021. keys remain secure and supported when using stronger hashes such as SHA-256 (rsa-sha2-256) or SHA-512 (rsa-sha2-512), with recommendations for minimum moduli of 2048 bits and preferably 3072 bits or larger for new keys. Ed25519, an Edwards-curve Digital Signature Algorithm variant providing approximately 128 bits of security, is the preferred public key type for new SSH deployments owing to its resistance to side-channel attacks, smaller key sizes (256 bits), and faster signature generation and verification compared to RSA or ECDSA equivalents. OpenSSH added Ed25519 support in version 6.5 released in October 2014, and it has been the default for ssh-keygen since version 8.0 in 2019. For , RFC 9142 published in April 2022 updates SSH recommendations to deprecate all SHA-1-based methods (e.g., diffie-hellman-group1-sha1, diffie-hellman-group14-sha1) and requires at least 112-bit security strength, mandating diffie-hellman-group14-sha256 while strongly preferring curve25519-sha256 and similar methods. Implementations should configure servers to prioritize these, disabling legacy ciphers like 3DES- and CBC modes in favor of AEAD constructs such as [email protected] or AES-GCM.

Applications and Protocols

Remote Access and Command Execution

The Secure Shell (SSH) protocol supports secure remote access to a host system, enabling users to establish an interactive login session or execute individual commands over an encrypted connection, as defined in the SSH Connection Protocol (RFC 4254). This functionality builds upon the transport layer for encryption and the authentication layer for user verification, providing a replacement for insecure protocols like Telnet and rlogin by multiplexing multiple logical channels over a single TCP connection. Remote login typically begins with the client opening a session channel using the SSH_MSG_CHANNEL_OPEN message with type "session", specifying initial window size and packet limits. For an interactive shell, the client sends a SSH_MSG_CHANNEL_REQUEST with subtype "shell", prompting the server to invoke the user's default login shell (e.g., /bin/sh or /bin/bash on Unix-like systems). To emulate a terminal, the client may precede this with a "pty-req" request, specifying terminal type (e.g., "xterm"), dimensions, and modes for features like echoing and editing; the server allocates a pseudo-terminal (PTY) accordingly. Input, output, and error streams are then exchanged bidirectionally: standard input and output via SSH_MSG_CHANNEL_DATA messages, and standard error via SSH_MSG_CHANNEL_EXTENDED_DATA (type 1). The session supports dynamic adjustments, such as window resize signals via "window-change" requests and process signals (e.g., "INT" for interrupt) to propagate client-side events like Ctrl+C to the remote process. For non-interactive command execution, the client similarly opens a session but sends an "exec" request containing the command string as an argument (e.g., /bin/ls -l), directing the to run it directly without invoking a or allocating a PTY unless explicitly requested. The executes the command in the user's environment, streams output as described, and upon termination, reports the —a 32-bit unsigned —via an "exit-status" channel request, allowing the client to capture and propagate the result code. This mode avoids interpretation of metacharacters, reducing risks like globbing or variable expansion, and is suited for scripting and . The closes automatically after status reporting and any remaining data. In common implementations like , the ssh client command facilitates these operations: ssh user@host requests an interactive shell, while ssh user@host command performs remote execution, with options such as -t to force PTY allocation (e.g., for or requiring a ) and -o RemoteCommand=... for -driven commands. For instance:
bash
ssh [email protected] '[ps](/page/PS) aux | [grep](/page/Grep) sshd'
This executes the pipeline remotely, displays output locally, and returns the to the calling script. Servers enforce restrictions via , such as PermitRootLogin or AllowUsers, to control access.

Secure File Transfer (SCP, SFTP)

Secure Copy (SCP) and SSH File Transfer Protocol (SFTP) are protocols that leverage the (SSH) to enable encrypted file transfers between , inheriting SSH's mechanisms and cryptographic protections without requiring separate credentials or channels. SCP, implemented via the scp command in tools like , facilitates non-interactive copying of files or directories from a to a remote , or vice versa, using syntax analogous to the Unix cp command with SSH-specified endpoints (e.g., scp localfile user@remote:/path). It supports options for (-r), preservation of modification times and permissions (-p), and , but operates in a batch mode without built-in support for interactive directory browsing or partial transfers. In contemporary implementations (version 7.8 and later, released in 2018), the scp client performs data transfers via the protocol over an SSH connection, rather than a distinct RCP-like mechanism, ensuring compatibility with modern SSH servers while maintaining for legacy behaviors. This approach provides equivalent to interactive SSH sessions, including public-key or password authentication, but 's simplicity limits it to unidirectional transfers without features like resumption after interruption or remote file deletion. Performance-wise, can achieve higher throughput for large files due to minimized protocol overhead, though it lacks robustness against network disruptions compared to alternatives. SFTP, conversely, functions as a dedicated SSH subsystem invoked via the sftp command or client libraries, establishing an interactive session for comprehensive file operations over the SSH channel. Defined in IETF draft specifications (e.g., draft-ietf-secsh-filexfer-02, published around , with version 3 as the de facto standard in ), SFTP supports commands for listing directories (ls), changing directories (cd), uploading/downloading (put/get), renaming, deleting, and setting attributes like permissions and timestamps, mimicking FTP functionality but with all data and commands encrypted end-to-end. Unlike , SFTP enables resumable transfers, atomic operations (e.g., via RENAME to avoid partial writes), and server-initiated status reporting, making it suitable for scripted or graphical clients. servers expose SFTP by default upon subsystem request (sftp-server), with version negotiation ensuring interoperability, though many implementations cap support at v3 for stability. Key distinctions between and lie in their design paradigms: prioritizes minimalism for quick, fire-and-forget copies, potentially at the cost of error recovery and feature completeness, whereas emphasizes reliability and extensibility, supporting extensions like rename semantics and large file handling (up to 64-bit offsets in v3). Both protocols run on port 22 by default, sharing SSH's vulnerability profile (e.g., dependent on proper and cipher selection), but 's client-server request-response model allows finer-grained access controls, such as restricting operations via server-side (e.g., OpenSSH's ChrootDirectory or internal-sftp). For new deployments, is generally recommended over due to its superior functionality and ongoing , as 's original protocol has been supplanted in practice by -based implementations.

Tunneling, Port Forwarding, and Proxying

SSH tunneling, also known as , enables the encryption and secure transmission of traffic over an established SSH connection, as defined in the SSH Connection Protocol (RFC 4254, published January 2006). This feature allows clients to access services on remote networks that may be inaccessible directly due to firewalls or network restrictions, by routing traffic through the authenticated and encrypted SSH channel. The protocol supports three primary forwarding modes—local, remote, and dynamic—each initiated via specific channel requests: "forwarded-tcpip" for incoming local forwards on the server side and "tcpip-forward" for remote forwards on the client side. Local port forwarding binds a port on the SSH client machine, redirecting connections from that local port through the SSH server to a specified destination host and port on the remote side. For instance, the OpenSSH client command ssh -L 8080:remotehost:80 user@sshserver listens on localhost:8080 and forwards traffic to remotehost:80 via the SSH server, useful for securely accessing internal web services. Remote port forwarding operates inversely, binding a port on the SSH server and tunneling connections back to a host and port accessible from the client, invoked with ssh -R 8080:localhost:80 user@sshserver, which enables the server to forward its port 8080 to the client's localhost:80. Both modes require the SSH server configuration directive AllowTcpForwarding yes (default since OpenSSH 2.3.0 in 2000), and for remote forwards to accept external connections, GatewayPorts yes must be set, though this increases exposure risks. Dynamic port forwarding transforms the SSH client into a proxy server, listening on a local port (typically 1080) and dynamically resolving destination hosts based on client requests without pre-specifying targets, using the command ssh -D 1080 user@sshserver. This implements version 4 and 5 compatibility as per the protocol's application-level proxying support ( 4251, January 2006), allowing tools like web browsers or to route arbitrary traffic through the tunnel for anonymization or circumvention of restrictions. Proxying via dynamic forwarding is particularly valuable for pivoting in controlled environments but demands caution, as unrestricted access can enable unauthorized network traversal if the SSH account is compromised. Security considerations for SSH forwarding include restricting forwards to interfaces where possible to limit exposure (e.g., via GatewayPorts clientspecified), disabling forwarding entirely with AllowTcpForwarding no for non-essential servers, and auditing logs for unexpected requests, as forwards inherit the SSH session's but may bypass local firewalls on the intermediary host. Misconfigurations have facilitated attacks, such as lateral movement in breaches where attackers establish persistent tunnels post-compromise. Implementations like enforce these via sshd_config, recommending key-based over passwords to mitigate risks from weak credentials.

Integration with Other Services

OpenSSH, the most widely deployed SSH implementation, integrates with external authentication systems through the Pluggable Authentication Modules (PAM) framework, which allows configuration for protocols such as LDAP, , and to verify user credentials against remote directories or servers. This modularity enables SSH servers to delegate authentication decisions to enterprise identity providers without altering core SSH logic, supporting environments where local user accounts are insufficient. For integration, employs the Generic Security Services API (GSSAPI) to facilitate ticket-based , permitting (SSO) in Kerberos realms such as those managed by MIT Kerberos or trusts. This method transmits Kerberos credentials securely over SSH connections, avoiding prompts and enabling delegated authentication across trusted domains, as configured via options like GSSAPIAuthentication yes in sshd_config. SSH also supports certificate-based authentication through (PKI), where user or host keys are signed by a (CA) using tools like ssh-keygen -s, embedding validity periods, principals, and constraints to enforce short-lived access without manual key distribution. This integrates SSH with X.509-compatible PKI systems, allowing revocation via certificate lists and centralized , particularly in large-scale deployments where traditional public key pairs pose administrative burdens. versions since 5.4 (released January 2009) have included native support for these signed certificates, configurable via AuthorizedPrincipals files and TrustedUserCAKeys. Beyond , SSH provides a secure for systems like , where the protocol handles encrypted pushes, pulls, and clones to remote repositories without exposing credentials over unsecured channels. Platforms such as and rely on SSH for this , authenticating via public keys or certificates mapped to user accounts, with clients invoking SSH subprocesses for each operation as specified in repository URLs like ssh://[email protected]/repo.git. This usage, standardized in since its 2005 inception, avoids alternatives like by leveraging SSH's multiplexing for efficient, multiplexed connections in high-volume workflows.

Vulnerabilities and Security Analysis

Inherent Protocol Weaknesses (SSH-1 Man-in-the-Middle)

The SSH-1 protocol, introduced in 1995, contains an inherent vulnerability in its mechanism that enables man-in-the-middle (MITM) attacks, allowing an active adversary to impersonate the and compromise session and . During connection initiation, the transmits its public host key to the client in without prior , relying instead on optional verification or user acceptance of fingerprints. An attacker positioned between the client and can intercept this exchange, substitute their own public host key and a generated temporary key, and relay subsequent packets while decrypting and re-encrypting traffic using the compromised session keys derived from these falsified elements. This weakness stems from SSH-1's failure to bind the host key cryptographically to the session key generation process, permitting undetected key replacement without alerting the client unless strict host key checking is enforced—and even then, first-time connections or ignored warnings leave systems exposed. Tools like sshmitm, part of the dsniff suite released around 2000, exploit this by combining for interception and DNS manipulation to facilitate the relay, enabling the attacker to read, modify, or inject commands into the session indefinitely once established. The protocol's design assumption that users would manually verify host keys via trusted channels proved unreliable in practice, as administrative oversight or network reconfiguration often led to unchecked key acceptance. SSH-1's MITM susceptibility contributed to its rapid deprecation; by 1996, vulnerabilities including this one prompted the development of SSH-2, which mitigates the issue through Diffie-Hellman where the server's host key signs the exchanged parameters, ensuring any substitution would fail verification. Despite mitigations like enabling strict host key verification in clients, the protocol's core flaw persisted until widespread migration to SSH-2, with modern implementations disabling SSH-1 by default to prevent exploitation. Legacy systems retaining SSH-1 support remain at risk, particularly in environments with unswitched networks vulnerable to ARP-based interception.

Transport Layer Attacks (CBC Recovery, Terrapin CVE-2023-48795)

The recovery attack targets the SSH transport layer's use of Cipher Block Chaining () mode ciphers, exploiting the protocol's packet formatting and error handling to recover from . In this attack, a man-in-the-middle adversary injects malformed packets during an active session, observing the server's decryption errors or timing differences to iteratively guess and decrypt portions of the , potentially recovering up to bits per through repeated trials with a success probability around 2^{-14} per attempt, though practical implementations may enable broader recovery. Demonstrated in proof-of-concept exploits against versions prior to patches in 2008, the vulnerability stems from SSH's non-standard handling of in CBC-encrypted packets, where the server discards invalid without alerting the client, leaking via the MAC verification process. Affected ciphers include 3des-cbc and aes128-cbc, with impacts limited to active adversaries but enabling partial session data exposure, such as command fragments or credentials if unmitigated. Mitigation for CBC recovery involves disabling all CBC-mode ciphers in SSH configurations, favoring counter (CTR) or Galois/Counter Mode (GCM) alternatives like aes128-ctr or aes256-gcm, which resist such oracle-based attacks by design. OpenSSH addressed the issue in version 5.2 (released January 2009) by recommending cipher deprecation, and subsequent advisories from vendors like Red Hat enforced system-wide policies to block CBC usage. Despite patches, legacy systems or misconfigurations persisting into the 2010s continued to expose networks, underscoring the need for strict cipher whitelisting in sshd_config files. The Terrapin attack (CVE-2023-48795), disclosed in December 2023, is a prefix truncation vulnerability in the SSH , allowing a man-in-the-middle attacker to selectively delete initial handshake messages and forge responses, thereby bypassing integrity checks and downgrading connection . By exploiting the 's additive packet length encoding and lack of sequence number enforcement in certain encryption modes, the attack truncates prefixes from packets encrypted with or CBC-with-Encrypt-then-MAC (EtM) ciphers, enabling removal of or algorithm negotiation messages without detection. This can force clients to accept weaker algorithms, disable keystroke timing (potentially aiding brute-forcing), or retroactively alter perceived capabilities, though it requires active MitM positioning and does not decrypt past traffic. Terrapin affects OpenSSH versions before 9.6 (patched November 2023), as well as other implementations like those in libssh and PuTTY, with vulnerability depending on cipher support rather than core protocol versions. The attack's severity is rated medium (CVSS 5.9) due to its MitM prerequisite and inability to forge arbitrary data, but it undermines post-handshake protections in real-time sessions. Remediation requires updating software to versions enforcing strict key exchange (e.g., curve25519-sha256) and message sequence integrity, or disabling vulnerable ciphers via configuration directives like Ciphers [email protected]. Vendors including Red Hat and Palo Alto Networks issued guidance emphasizing cipher restrictions, with full protocol fixes in draft SSH extensions for enhanced sequencing.

Implementation Bugs (regreSSHion CVE-2024-6387, CVE-2025-26465/26466)

The regreSSHion vulnerability, designated CVE-2024-6387, is a critical remote code execution flaw in server implementations arising from a signal handler in the sshd process. This issue stems from unsafe usage of the and perror() functions within a signal handler invoked upon receiving SIGALRM during the server's pre-authentication phase, enabling an attacker to overwrite heap memory and execute arbitrary code as under specific timing conditions. Discovered by researchers and publicly disclosed on July 1, 2024, it primarily impacts glibc-based distributions due to the functions' non-async-signal-safe nature, though exploitation requires thousands of concurrent and is thus more feasible on systems with limited resources or under high load. Affected versions include prior to 4.4p1 (unless backported patches for CVE-2006-5051 and CVE-2008-4109 are applied) and versions from 8.5p1 through 9.7p1, where a partial introduced in 2006 regressed in 2020. 9.8p1, released July 1, 2024, resolves the issue by blocking SIGALRM signals during the vulnerable code path and adding further protections. CVE-2025-26465 represents a man-in-the-middle (MitM) vulnerability in OpenSSH clients when the VerifyHostKeyDNS option is enabled, allowing an attacker controlling a malicious DNS server or network path to impersonate legitimate hosts by forging DNS records that bypass host key verification. This flaw, identified by Qualys Threat Research Unit (TRU) and assigned on February 18, 2025, affects OpenSSH versions from 6.8p1 onward where the option is active, as the client fails to adequately validate DNSSEC signatures or fallback mechanisms against active adversaries. Exploitation requires the victim to connect to a targeted host while the attacker intercepts traffic and manipulates DNS responses, potentially enabling session hijacking or key exfiltration; however, it is confined to configurations explicitly enabling the feature, which is disabled by default in most distributions. Mitigation involves disabling VerifyHostKeyDNS or ensuring strict DNSSEC validation, with patches integrated into OpenSSH versions post-9.9p1. Complementing CVE-2025-26465, CVE-2025-26466 is a pre-authentication denial-of-service (DoS) vulnerability in both OpenSSH clients and servers, triggered by processing excessive SSH ping packets that allocate memory buffers for pong responses without bounds, leading to unbounded queue growth, memory exhaustion, and CPU saturation. Reported by Qualys TRU on February 18, 2025, it impacts versions 9.5p1 through 9.9p1, where each incoming ping from a single source consumes resources cumulatively, allowing a remote unauthenticated attacker to render the service unresponsive with minimal effort via repeated low-volume pings. The OpenSSH project notes that the PerSourcePenalties option can mitigate this by rate-limiting per-client attempts, and fixes in subsequent releases introduce queue limits and deallocation safeguards. Unlike regreSSHion's execution potential, these 2025 flaws emphasize availability disruptions but underscore persistent implementation risks in optional features and unhardened packet handling.

Suspected State Actor Exploits and Broader Risks

In March 2024, a backdoor was discovered in the data compression library (versions 5.6.0 and 5.6.1), which could have compromised servers integrating systemd-resolved for hostname resolution, potentially allowing remote code execution during SSH authentication. The insertion involved a long-term manipulation by a contributor using the pseudonym "Jia Tan," who was granted maintainer privileges after an unusually rapid two-year involvement, raising suspicions of nation-state coercion or infiltration, with experts attributing it to actors potentially backed by or due to the sophisticated social engineering and evasion tactics. Although detected before broad deployment—thwarting widespread exploitation—the incident highlighted vulnerabilities in open-source maintenance processes, as the backdoor evaded detection by altering SSH's build-time behavior to inject malicious code only in specific configurations. State-sponsored actors have also exploited implementation flaws in SSH-related software for targeted intrusions. For instance, in 2025, exploits of CVE-2025-32433 in the Erlang/OTP SSH daemon surged post-disclosure, enabling unauthenticated remote code execution with root privileges on affected systems, particularly in firewalls and , consistent with (APT) tactics for initial access and persistence. While not definitively attributed, the focus on high-value industrial targets aligns with nation-state operations, as evidenced by public proof-of-concept code and scanning activity shortly after patching guidance on April 16, 2025. Similarly, state-sponsored groups have routinely added unauthorized SSH keys to compromised network devices for re-entry, exploiting default configurations rather than zero-days, as observed in campaigns compromising U.S. providers since at least 2022. Broader risks stem from SSH's pervasive deployment as a default remote access mechanism in servers, routers, and devices, amplifying its appeal for state actors seeking stealthy persistence and lateral movement. APTs frequently leverage SSH for command-and-control via tunneling (e.g., T1572) and key-based to maintain without repeated exploits, evading detection in environments with management or SSH-1 support. Supply chain compromises like underscore systemic threats to open-source implementations, where maintainer trust can be weaponized, potentially enabling or disruption if undetected; demands rigorous code auditing, minimal privileged in builds, and alternatives like certificate-based to reduce risks.

Standards, Implementations, and Interoperability

Core RFCs and Protocol Specifications

The Secure Shell (SSH) version 2 , which superseded the insecure and non-standardized SSH-1, was formalized as a Proposed Standard by the (IETF) SECSH working group through four core RFCs published on January 2006. These documents collectively define the 's layered structure for secure remote login, command execution, and network services over untrusted networks, emphasizing , , server authentication, and optional client authentication. Unlike SSH-1, which originated as a without IETF and contained exploitable weaknesses such as weak CRC-32 checks, the SSH-2 specifications mandate stronger and modular design to mitigate man-in-the-middle and other attacks. RFC 4251 outlines the SSH protocol , describing its three primary layers: the for establishing secure channels via , , and message ; the layer for verifying user or host identities; and the layer for multiple logical channels over the secure . This supports extensibility through additional algorithms negotiated during session setup, while requiring implementations to handle packet framing, , and error handling uniformly. RFC 4253 details the protocol, which operates atop (typically on port 22) and handles initial key exchange using methods like Diffie-Hellman, followed by symmetric encryption (e.g., ) and message authentication codes (e.g., HMAC-SHA1). It specifies binary packet formats with padding for , rekeying intervals to limit key exposure (default every 1 GB of data or 1 hour), and protections against chosen-plaintext attacks via cipher modes like with integrity checks, though later analyses revealed vulnerabilities in certain configurations. RFC 4252 defines the authentication protocol, enabling methods such as (e.g., or ), password-based challenges, and host-based verification, with a modular "none," "publickey," "password," or "hostbased" selection process. It requires servers to prove possession of claimed public keys during transport negotiation and supports multi-factor sequencing, but implementations must guard against offline dictionary attacks on weak passwords. RFC 4254 specifies the connection protocol, which tunnels channels for interactive shells, remote command execution, subsystem invocation (e.g., ), and port forwarding, using channel numbers for and window adjustments for flow control. It supports agent forwarding for credential delegation and X11 forwarding with authentication cookies, ensuring all data flows through the encrypted transport while permitting pseudo-terminal allocation for terminal emulation.

Major Open-Source Implementations (OpenSSH, Dropbear)

, initiated by developers from the project in 1999, serves as the primary open-source implementation of the SSH protocol suite. It emerged in response to the original SSH software's shift to a proprietary license under Tatu Ylönen's company, prompting a clean-room reimplementation to ensure free availability and code quality. encompasses both client (ssh) and server (sshd) components, supporting SSH version 2 with features such as public-key and password authentication, / for secure file transfer, local/remote/dynamic , and key management via [ssh-agent](/page/Ssh-agent). Distributed under a BSD license, it undergoes rigorous auditing aligned with 's security-focused practices, including proactive vulnerability hunting and minimal privileged code. As the default in major systems—including kernels via distributions like and , , and macOS— handles billions of connections daily, with releases like version 9.8p1 in April 2025 addressing protocol compliance and cipher updates. Dropbear, developed by Matt Johnston and first released in April 2003, is a minimalist and client optimized for resource-limited platforms like embedded systems, routers, and devices. It implements only SSH-2, omitting SSH-1 to minimize code complexity and potential flaws, resulting in a server binary often under 110 KB and runtime memory usage below 2 MB. Core features include public-key (/ECDSA/Ed25519) and password , X11 forwarding, forwarding, and , leveraging LibTomCrypt for and incorporating select code from and for interoperability. Licensed under an MIT-style permissive agreement, Dropbear integrates seamlessly with and appears in firmware such as , , and recovery environments, where its small footprint—contrasting OpenSSH's larger ~1-2 MB binaries—enables deployment on devices with 4-16 MB flash. Maintenance emphasizes simplicity over breadth, with version 2025.88 (, 2025) incorporating fixes for recent protocol issues like , though it forgoes advanced capabilities like /GSSAPI or host certificates. Early releases faced issues such as a 2003 format-string in version 0.35, resolved promptly, underscoring the trade-off of its lean design against comprehensive auditing resources. In comparison, prioritizes feature completeness and broad compatibility for enterprise and desktop use, while Dropbear excels in constrained scenarios by sacrificing extras for efficiency; both adhere to core standards (e.g., RFC 4251-4254), ensuring client-server interoperability, though Dropbear requires host key format conversion (via dropbearconvert) for seamless OpenSSH key migration. Security-wise, benefits from OpenBSD's ecosystem-wide scrutiny, whereas Dropbear relies on community patches and its reduced surface area, with no major unpatched flaws in recent versions.

Commercial Variants and Compliance Issues

Commercial implementations of the Secure Shell (SSH) protocol provide enterprise-grade features such as graphical user interfaces, centralized management, enhanced auditing, and dedicated support, distinguishing them from open-source options like OpenSSH. SSH Communications Security's Tectia SSH suite includes client and server components optimized for high-security environments, supporting advanced tunneling, file transfer via SFTP/SCP, and integration with identity management systems. VanDyke Software offers VShell as a Windows-based SSH server and SecureCRT as a multi-protocol client, emphasizing secure remote administration, port forwarding, and compatibility with legacy systems. Bitvise provides SSH Server and SSH Client tailored for Windows, featuring virtual account support, two-factor authentication, and high-performance file transfers without requiring agent installation. These variants often incorporate proprietary enhancements, such as Bitvise's graphical server interface or Tectia's policy-based access controls, which facilitate deployment in large-scale networks but may introduce challenges if not aligned with standard specifications. For instance, non-standard extensions in commercial clients can lead to connection failures with -compliant servers unless adjustments are made. Compliance with regulatory standards represents a key differentiator for commercial SSH variants, particularly in sectors like and finance requiring certified . Many, including Tectia-integrated products, achieve validation, confirming that cryptographic modules meet U.S. federal security requirements for algorithms like and ECDSA while excluding non-approved options such as or weak Diffie-Hellman groups. VanDyke's offerings include validated modes that enforce TLS 1.2+ equivalents in SSH transport and restrict key exchanges to approved types, ensuring adherence to NIST SP 800-53 controls for key management and monitoring. However, FIPS compliance introduces operational constraints, including mandatory use of validated libraries that disable ciphers (e.g., 3DES) and require periodic rotation, potentially disrupting to older or non-compliant systems. In FIPS-enabled , SSH implementations limit host keys to ECDSA or variants meeting minimum strengths, as is deprecated, which can cause failures against peers using unsupported formats. vendors mitigate this through tools and support, but validation processes involve rigorous testing and recertification, increasing costs compared to unmodified open-source builds. Export regulations under frameworks like the further complicate global distribution, mandating licenses for in certain jurisdictions despite SSH's ubiquity.

Future Developments

Post-Quantum Cryptography Integration

The integration of into Secure Shell (SSH) focuses on enhancing the to resist threats, particularly , which could break classical Diffie-Hellman and Diffie-Hellman (ECDH) mechanisms used for session key derivation. This addresses "" risks, where adversaries store encrypted traffic for future decryption using quantum capabilities. Implementations typically employ approaches, combining post-quantum key encapsulation mechanisms (KEMs) with classical algorithms to maintain security against both classical and quantum attacks while allowing gradual adoption. IETF drafts standardize these hybrid key exchanges for the SSH transport protocol (RFC 4253), defining methods that pair NIST-approved ML-KEM variants (e.g., ML-KEM-768, ML-KEM-1024) with ECDH curves like NIST , , or Curve25519. For instance, draft-kampanakis-curdle-ssh-pq-ke-05 ( 2024) introduces new key exchange messages (SSH_MSG_KEX_HYBRID_INIT and SSH_MSG_KEX_HYBRID_REPLY) and method names such as mlkem768x25519-sha256, where the is derived as HASH(K_PQ || K_CL), with K_PQ from the post-quantum KEM and K_CL from classical ECDH. These proposals remain experimental, emphasizing and crypto-agility to avoid mandating pure post-quantum modes prematurely due to larger key sizes and performance overheads in algorithms like ML-KEM. OpenSSH, the dominant open-source SSH implementation, has supported hybrid post-quantum key agreement since version 9.0 (April 2022), initially with sntrup761x25519-sha512 (combining the lattice-based SNTRUP761 KEM with ). Version 10.0 (April 2025) added mlkem768x25519-sha256 (ML-KEM-768 with ) as the default , prioritizing NIST-standardized algorithms for against quantum threats while retaining classical fallbacks. This default enables protection in new connections without configuration changes, though host authentication and user signatures remain reliant on classical algorithms like Ed25519, with post-quantum signatures (e.g., ML-DSA) under evaluation for future inclusion. Other efforts include forks like Open Quantum Safe's liboqs-integrated OpenSSH, which prototypes broader quantum-resistant key exchanges and authentication using algorithms such as FrodoKEM and Picnic, though these remain non-default and research-oriented. Commercial providers, such as GitHub (adopting sntrup761x25519-sha512 for SSH access in September 2025) and SSH Communications Security (integrating PQC KEMs in NQX 3.1, July 2025), demonstrate practical deployment, often prioritizing hybrids for interoperability. Performance considerations, including increased computational costs (e.g., ML-KEM-768 requiring ~2-3x more CPU than ECDH), drive selective enablement, with vendors like Red Hat recommending hybrids in enterprise distributions such as RHEL 10 (May 2025).

Ongoing Drafts and Protocol Enhancements (e.g., Host Key Updates)

The SSH protocol continues to evolve through individual and drafts at the IETF, focusing on improving , extension negotiation, and resilience to emerging threats without altering core . These efforts address practical deployment challenges, such as key rotation in large-scale environments, by enabling automated updates during active sessions. A prominent ongoing draft is the host key update mechanism (draft-miller-sshm-hostkey-update-02), which standardizes an extension for servers to advertise additional host public keys post-authentication. After and user succeed, the server may send a "[email protected]" global request containing a list of extra host keys, each signed by an already-verified host key to ensure authenticity. Clients verify these signatures against their known_hosts file and, if valid, append the new keys for future connections, mitigating risks from deprecated algorithms like ssh-rsa without requiring client-side reconfiguration or connection interruptions. This , last revised on August 28, 2025, builds on OpenSSH's since 6.8 (released in 2014), formalizing it for broader interoperability and emphasizing security properties like resistance to man-in-the-middle injection of unverified keys. Complementing this, the extension information mechanism (draft-ssh-ext-info-04) enhances protocol extensibility by allowing clients and servers to exchange supported features—such as signature algorithms or methods—via an "ext-info" message immediately after key exchange completion. Sent in plaintext but after symmetric is established, this prevents attackers from forcing unsupported extensions or downgrades during the unauthenticated phase, a exploited in attacks like (CVE-2023-48795). The draft specifies that servers MUST ignore unknown extensions and clients SHOULD send them only if the server supports the feature, promoting ; it remains active as of 2025 without advancement. Other drafts target auxiliary protocols, such as the protocol (draft-ietf-sshm-ssh-agent-10), which refines forwarding and key handling to reduce and enhance for forwarded agents in multi-hop scenarios, including constraints on message sizes and error handling to prevent denial-of-service. These updates collectively aim to harden SSH against implementation inconsistencies and protocol gaps observed in recent audits, prioritizing while deprecating weak primitives like MD5-based signatures. Adoption in major implementations like lags behind draft finalization, with experimental support in versions post-9.0.

References

  1. [1]
    RFC 4251 - The Secure Shell (SSH) Protocol Architecture
    The Secure Shell (SSH) Protocol is a protocol for secure remote login and other secure network services over an insecure network.
  2. [2]
    RFC 4253 - The Secure Shell (SSH) Transport Layer Protocol
    RFC 4253 defines the SSH transport layer protocol for secure remote login, providing encryption, authentication, and integrity protection over insecure ...
  3. [3]
    SSH — Secure Login Connections over the Internet - USENIX
    Jan 10, 2003 · SSH was first published on the Internet in July 1995. Since then ... [13] Ylönen, Tatu. The SSH (Secure Shell) Remote Login Protocol ...
  4. [4]
    SSH History - Part 1
    Consequently, Ylönen founded SSH Communications Security Corp 31st of December in 1995. "First came the protocol, then the company. The rest is history.” “It ...
  5. [5]
    Tatu Ylönen - USENIX
    Ylönen invented the Secure Shell (SSH) protocol in 1995 and is founder and CEO of SSH Communications Security. OpenSSH is based on his free version of 1995.
  6. [6]
    RFC 4252 - The Secure Shell (SSH) Authentication Protocol
    This document describes the SSH authentication protocol framework and public key, password, and host-based client authentication methods.
  7. [7]
    RFC 4254 - The Secure Shell (SSH) Connection Protocol
    This document describes the SSH Connection Protocol. It provides interactive login sessions, remote execution of commands, forwarded TCP/IP connections, and ...
  8. [8]
    RFC 4344 - The Secure Shell (SSH) Transport Layer Encryption ...
    Dec 20, 2018 · This document describes new symmetric encryption methods for the Secure Shell (SSH) Transport Protocol and gives specific recommendations on how frequently SSH ...<|separator|>
  9. [9]
    OpenSSH
    OpenSSH is a connectivity tool for remote login using SSH, encrypting traffic to prevent attacks. It provides secure tunneling and authentication.Release Notes · Manual · Portable Release · FeaturesMissing: definition | Show results with:definition
  10. [10]
    SSH, The Secure Shell: The Definitive Guide, 2nd Edition - O'Reilly
    SSH1 and the SSH-1 protocol were developed in 1995 by Tatu Ylönen, a researcher at the Helsinki University of Technology in Finland.
  11. [11]
    draft-ylonen-ssh-protocol-00 - IETF Datatracker
    Ylonen [Page 1]. Internet-Draft SSH (Secure Shell) Remote Login Protocol 15 Nov 1995 o Client RSA-authenticates the server machine in the beginning of every ...Missing: development | Show results with:development
  12. [12]
    History of SSH protocol - OmniSecu.com
    Since the number of SSH protocol users rose to more than 20,000, in December 1995, Tatu Ylonen started a company to provide support for SSH. The name of the ...
  13. [13]
    SSH2 vs. SSH1 and why SSH versions still matter - TechTarget
    Jul 27, 2022 · The major differences between SSH1 and SSH2 fall into two main categories: technical and licensing. Technically, SSH2 uses different encryption ...
  14. [14]
    [PDF] arXiv:2312.12422v2 [cs.CR] 7 May 2024 - Terrapin Attack
    In February 1997, the IETF formed the SECSH working group to standardize SSHv2. After a decade, it published five core RFCs [29–33]. SSHv2 provides.
  15. [15]
    Secure Shell (secsh) - IETF Datatracker
    Final Charter for Working Group. The goal of the working group is to update and standardize the popular. SSH protocol. SSH provides support for secure ...Missing: 2 | Show results with:2
  16. [16]
    Project History - OpenSSH
    In 1999, some OpenBSD developers set to the task of freeing SSH ... With the OpenBSD 2.6 release out of the way, Markus Friedl decided to pursue SSH 2 protocol ...Missing: timeline | Show results with:timeline
  17. [17]
    SecSH Protocol Documents - VanDyke Software
    The core documents for SSH2 were published as RFCs in the first half of 2006 followed by the extension documents. The Secsh IETF working group closed shortly ...<|separator|>
  18. [18]
    SSH v1.99 VS v2.0 - Cisco Community
    Apr 4, 2012 · SSH version 1.99 is merely an indication that the server supports both SSH version 2 and SSH version 1. It's not really a version, as such, but an indication ...SSH v2 or SSH v1.99 - Cisco CommunitySSH resets to version 1.99 after reboot - Cisco CommunityMore results from community.cisco.comMissing: transitional | Show results with:transitional
  19. [19]
    Versions of SSH Protocol - OmniSecu.com
    SSH-2 has many significant improvements over SSH1. SSH-2 prevents many security vulnerabilities of SSH-1. SSH2 is a much more secure and efficient than SSH-1.
  20. [20]
    Release Notes - OpenSSH
    OpenSSH is a 100% complete SSH protocol 2.0 implementation and includes sftp client and server support. OpenSSH also includes transitional support for the ...
  21. [21]
    OpenSSH's Cinderella story - ZDNET
    Jul 9, 2000 · The initial version of OpenSSH was released in late 1999 and became a runaway success. According to a brief interview with OpenBSD project ...Missing: timeline | Show results with:timeline
  22. [22]
    [PDF] A Surfeit of SSH Cipher Suites - Jean Paul Degabriele
    Dropbear and OpenSSH implementations dominate in our scans. From our first scan, we found 130,980. OpenSSH servers that are still vulnerable to the CBC-mode-.
  23. [23]
    Some thoughts on OpenSSH versus SSH
    Apr 15, 2023 · ... OpenSSH is the dominant SSH implementation, it's not the only one. Or maybe it is, depending on your perspective, or at least the only SSH ...
  24. [24]
    OpenSSH 10.0 Released: New Protocol Changes and Key Security ...
    Apr 10, 2025 · The OpenSSH team has announced the release of OpenSSH 10.0, one of the most widely-used open-source tools in secure communications.<|separator|>
  25. [25]
    OpenSSH CVE-2024-6387 RCE Vulnerability: Risk & Mitigation
    Jul 22, 2025 · OpenSSH's implementation serves as a critical tool for secure communication. Its enterprise value lies in its scalability and the ability to ...
  26. [26]
    OpenSSH/OpenSSH versions Release Notes - Wikiversity
    OpenSSH 8.2 FEATURE: Add FIDO/U2F Support · OpenSSH 8.1, released in October 2019 · OpenSSH 8.0, released in April 2019 · OpenSSH 7.9, released in October 2018.
  27. [27]
    OpenSSH 9.0 was released
    Apr 8, 2022 · OpenSSH 9.0 was released on 2022-04-08. It is available from the mirrors listed at https://www.openssh.com/. OpenSSH is a 100% complete SSH ...
  28. [28]
    OpenSSH 9.0 Released With Hardening Against Future Quantum ...
    Apr 8, 2022 · OpenSSH 9.0 is available today as the latest version of this widely-used, open-source SSH implementation.<|separator|>
  29. [29]
    New OpenSSH Vulnerability Could Lead to RCE as Root on Linux ...
    Jul 1, 2024 · OpenSSH maintainers have released security updates to contain a critical security flaw that could result in unauthenticated remote code execution with root ...<|control11|><|separator|>
  30. [30]
    OpenSSH 10.0 released April 9, 2025 : r/linux - Reddit
    Apr 9, 2025 · OpenSSH 10.0 released April 9, 2025. Software Release.Missing: 2020-2025 | Show results with:2020-2025
  31. [31]
    Security - OpenSSH
    OpenSSH versions 5.6 and 5.7 are vulnerable to a potential leak of private key data described in the legacy-cert.adv advisory and the OpenSSH 5.8 release notes.
  32. [32]
    OpenSSH 10.1 Released with Key Security Fixes and Enhancements
    On October 6, 2025, OpenSSH 10.1 was released, delivering important updates to the open-source client and server for the SSH 2.0 and SFTP protocols.
  33. [33]
  34. [34]
  35. [35]
    RFC 8308 - Extension Negotiation in the Secure Shell (SSH) Protocol
    This memo updates RFCs 4251, 4252, 4253, and 4254 by defining a mechanism for Secure Shell (SSH) clients and servers to exchange information about supported ...
  36. [36]
  37. [37]
  38. [38]
    SSH Handshake Explained - Teleport
    Mar 31, 2022 · SSH handshake is a process in the SSH protocol responsible for negotiating initial trust factors for establishing a secure channel between an SSH client and ...
  39. [39]
  40. [40]
  41. [41]
    How To Reuse SSH Connection With Multiplexing To Speed Up
    Jan 16, 2025 · You can reuse the connection to the remote server using controlmaster directive. To enables the sharing of multiple sessions over a single network connection.
  42. [42]
  43. [43]
  44. [44]
  45. [45]
    Why is SSH password authentication a security risk? - Server Fault
    Nov 24, 2011 · There are pro's and con's for either pw or key-based authentication. In some cases, for example, key-based authentication is less secure ...Not using SSH Pubkey Authentication is really serious security flaw ...Is setting a very strong password enough to secure an SSH on port ...More results from serverfault.com
  46. [46]
    SSH Authentication with Username and Password - Orca Security
    This is susceptible to brute force attacks and could result in compromise assets. Moreover, people are naturally inclined to use personal information in their ...
  47. [47]
  48. [48]
  49. [49]
  50. [50]
    [PDF] Hostbased SSH - USENIX
    Hostbased does true authentication of the client, whereas SSH keys can only validate the client's hostname or IP address, which can be spoofed. In short, ...
  51. [51]
    Top 18 Tips to Secure SSH on Linux - Blumira
    Dec 23, 2022 · 1. Disable Root Login · 2. Disable SSH Protocol 1 · 3. Disable Host-Based Authentication · 4. Disable Empty Passwords · 5. Enable and Use Key-Based ...
  52. [52]
    Key-Based Authentication in OpenSSH for Windows - Microsoft Learn
    Oct 3, 2025 · This document provides an overview of how to use these tools on Windows to begin using key-based authentication with Secure Shell (SSH).
  53. [53]
    SSH Key Best Practices for 2025 - Using ed25519, key rotation, and ...
    Jan 3, 2025 · Generate an ed25519 SSH key using current best practices from 2025. Rotate your keys, assign a useful comment, and use SSH-Agent and Agent ...Missing: protocol | Show results with:protocol
  54. [54]
    OpenSSH - Security Assurance and Security Operations - Mozilla
    When SSH keys are necessary for automation between systems, it is reasonable to use passphrase-less keys. The recommended settings are identical to the user ...
  55. [55]
    How to Use ssh-keygen to Generate a New SSH Key?
    Only three key sizes are supported: 256, 384, and 521 (sic!) bits. We would recommend always using it with 521 bits, since the keys are still small and probably ...
  56. [56]
    Comparing SSH Keys: A Comprehensive Guide (RSA, DSA, ECDSA)
    Types of SSH Key Algorithms · RSA · DSA (Digital Signature Algorithm) · ECDSA (Elliptic Curve Digital Signature Algorithm).Comparing SSH keys (Step-by... · Types of SSH Key Algorithms
  57. [57]
    How to generate a secure and robust SSH key in 2024
    Apr 6, 2024 · To generate a robust SSH key, you have two main options: ED25519 and RSA. Both have their advantages, but ED25519 is generally recommended for its security and ...<|separator|>
  58. [58]
    OpenSSH 9.6p1: What is the best key type for the ssh-keygen ...
    Jul 4, 2024 · Specifies the type of key to create. The possible values are “dsa”, “ecdsa”, “ecdsa-sk”, “ed25519”, “ed25519-sk”, or “rsa”.
  59. [59]
    Using ssh-keygen and sharing for key-based authentication in Linux
    Sep 24, 2020 · Once you have generated the keys, they are stored in the /user/home/.ssh/ directory with the following permissions: Private key - 600; Public ...
  60. [60]
    How does chmod 600 to private ssh keys make them secure? What ...
    Oct 15, 2021 · The answer is chmod 600 on the key. You could chmod 700 on it to mark it executable, but it would not execute anything and it would be accepted by ssh.
  61. [61]
    Configuring Authorized Keys for OpenSSH
    Authorized keys specify which users are allowed to log into a server using public key authentication in SSH.
  62. [62]
    Non-corporate SSH Keys - Cloud Risks - Orca Security
    Use /etc/ssh/sshd_config to restrict SSH for certain users or user groups. Restrict permissions. Restrict file permissions of the authorized_keys file. Ideally, ...Missing: OpenSSH | Show results with:OpenSSH
  63. [63]
    SSH Key Management Overview & 10 Best Practices - BeyondTrust
    Nov 22, 2022 · 1. Discover all SSH Keys and Bring Under Active Management · 2. Change Default SSH Port · 3. Disable SSH Root Login · 4. Implement Two-Factor ...
  64. [64]
  65. [65]
  66. [66]
    RFC 9142: Key Exchange (KEX) Method Updates and ...
    This document updates the recommended set of key exchange methods for use in the Secure Shell (SSH) protocol to meet evolving needs for stronger security.
  67. [67]
    RFC 8731: Secure Shell (SSH) Key Exchange Method Using ...
    This document describes the specification for using Curve25519 and Curve448 key exchange methods in the Secure Shell (SSH) protocol.Table of Contents · Introduction · Key Exchange Methods · References
  68. [68]
    OpenSSH 6.2 release
    * ssh(1)/sshd(8): Added support for AES-GCM authenticated encryption in SSH protocol 2. The new cipher is available as aes128-gcm@openssh.com and aes256-gcm ...
  69. [69]
    OpenSSH crypto configuration - Ubuntu Server documentation
    Ciphers List of symmetric ciphers. Examples include aes256-ctr and chacha20-poly1305@openssh.com . MACs List of Message Authentication Code algorithms, used ...
  70. [70]
    draft-ietf-sshm-chacha20-poly1305-02 - Secure Shell (SSH ...
    Jul 23, 2025 · ChaCha20 is a stream cipher designed by Daniel Bernstein and described in [ChaCha], with some details inherited from [Salsa20].
  71. [71]
    OpenSSH default/preferred ciphers, hash, etc for SSH2
    Dec 19, 2012 · Answer valid in 2023: By default, OpenSSH uses the chacha20-poly1305@openssh.com cipher. Although, between machines with AES-NI support, you ...What does chacha20-poly1305@openssh.com mean for me?SSH Server Configuration Best Practices?More results from security.stackexchange.com
  72. [72]
    sshd_config - How to Configure the OpenSSH Server?
    Specifies the available Key Exchange algorithms. The KEX algorithms supported in OpenSSH 7.3 are: curve25519-sha256@libssh.org, diffie-hellman-group1-sha1, ...
  73. [73]
  74. [74]
    Benchmark SSH Ciphers - gbe0.com
    Apr 27, 2021 · In summary, the tests again show the AES GCM ciphers gave the best performance with the CTR ciphers just behind. Using AES GCM (128 or 256) ...
  75. [75]
    Why OpenSSH deprecated DSA keys
    Feb 4, 2016 · Starting with the 7.0 release of OpenSSH, support for ssh-dss keys has been disabled by default at runtime due to their inherit weakness.OpenSSH declares ssh-rsa deprecated. What do I do next?SSH Server Configuration Best Practices?More results from security.stackexchange.com
  76. [76]
    OpenSSH announces DSA-removal timeline - LWN.net
    Jan 11, 2024 · DSA will be optional in OpenSSH around 2024/03, disabled by default around 2024/06, and removed entirely after 2025/01/01.
  77. [77]
  78. [78]
    RSA keys are not deprecated; SHA-1 signature scheme is! - Ikarus.sg
    Jul 16, 2022 · The ssh-rsa signature scheme has been deprecated since OpenSSH 8.8 which was released in 2021-08-20 (release notes).<|separator|>
  79. [79]
    OpenSSH 8.3 released (and ssh-rsa deprecation notice) - LWN.net
    Perhaps this deprecation will help motivate such servers to move forward. Personally, I think ssh-ed25519 seems like a reasonable path forward.
  80. [80]
    OpenSSH 8.8 release notes
    Sep 26, 2021 · OpenSSH 8.8 was released on 2021-09-26. It is available from the mirrors listed at https://www.openssh.com/. OpenSSH is a 100% complete SSH ...<|control11|><|separator|>
  81. [81]
    Using Ed25519 for OpenSSH keys (instead of DSA/RSA/ECDSA)
    OpenSSH 6.5 added support for Ed25519 as a public key type. It is using an elliptic curve signature scheme, which offers better security than ECDSA and DSA.
  82. [82]
    It's 2023. You Should Be Using an Ed25519 SSH Key (And Other ...
    Sep 10, 2023 · The Ed25519 key is much shorter, so initially you might think it is less secure. But these keys use a totally different algorithm.
  83. [83]
    RFC 9142 - Key Exchange (KEX) Method Updates and ...
    This document updates the recommended set of key exchange methods for use in the Secure Shell (SSH) protocol to meet evolving needs for stronger security.
  84. [84]
    ssh(1) - OpenBSD manual pages
    ssh (SSH client) is a program for logging into a remote machine and for executing commands on a remote machine.
  85. [85]
  86. [86]
  87. [87]
  88. [88]
  89. [89]
  90. [90]
    Manual Pages - OpenSSH
    The connection layer multiplexes many different concurrent channels over the authenticated connection and allows tunneling of login sessions and TCP-forwarding.<|separator|>
  91. [91]
    scp(1): secure copy - Linux man page - Die.net
    scp copies files between hosts on a network. It uses ssh(1) for data transfer, and uses the same authentication and provides the same security as ssh(1).
  92. [92]
    SSH File Transfer Protocol (SFTP): Get SFTP client & server
    SFTP is a secure file transfer protocol running over SSH, using the same port. Many SSH clients and servers support SFTP, like Tectia SSH and OpenSSH.
  93. [93]
    scp(1) - Linux manual page - man7.org
    scp uses the SFTP protocol over a ssh(1) connection for data transfer, and uses the same authentication and provides the same security as a login session. scp ...<|separator|>
  94. [94]
    SCP vs SFTP: Key Comparisons & Choosing the Right Protocol
    SCP is generally faster but less secure and reliable, while SFTP is more secure, reliable, and has more functionality, but is slower.
  95. [95]
    SFTP Standards
    SFTP RFC specification was never finished and it's currently only available as RFC drafts. Many SFTP servers (such as OpenSSH) only supports SFTP v3.
  96. [96]
    What's the difference between SCP and SFTP? - Super User
    Apr 26, 2010 · SCP is for non-interactive file transfers, while SFTP is interactive, allowing remote file system operations. SCP is faster but non- ...FTPS versus SFTP versus SCPUsing sftp like scpMore results from superuser.com
  97. [97]
    SFTP: a More Secure Successor to SCP - Teleport
    Dec 30, 2022 · SFTP operates using a more traditional client-server model than SCP: a client make requests and a server handles it and sends back a response.SCP vulnerabilities · Introducing the SFTP protocol · How SFTP works
  98. [98]
  99. [99]
    SSH Port Forwarding: Local, Remote, and Dynamic Explained
    Jun 1, 2025 · Dynamic port forwarding creates a SOCKS proxy that routes network traffic through a secure SSH tunnel, effectively anonymizing your connection.
  100. [100]
    SSH Tunneling and Proxying | Baeldung on Linux
    Nov 9, 2022 · AllowTcpForwarding: Allows TCP port forwarding. The default, when omitted, is to allow. It enables single TCP port forwards and socks proxying ...<|separator|>
  101. [101]
    SSH Tunneling: Client Command & Server Configuration
    The LocalForward option in the OpenSSH client configuration file can be used to configure forwarding without having to specify it on command line. Remote ...<|separator|>
  102. [102]
    Chapter 1. Using secure communications between two systems with ...
    SSH (Secure Shell) is a protocol which provides secure communications between two systems using a client-server architecture and allows users to log in to ...
  103. [103]
    6 Network authentication with Kerberos - SUSE Documentation
    To configure SSH or LDAP with Kerberos authentication, proceed as outlined in Section 6.5.10, “Configuring SSH for Kerberos authentication” and Section 6.5.Missing: RADIUS | Show results with:RADIUS
  104. [104]
    Kerberos SSO for SSH Authentication - Insentra
    Sep 9, 2022 · Kerberos SSO for SSH uses GSSAPI authentication, where the client authenticates, and credentials are sent to the remote system for login. ...
  105. [105]
    14.3. Using OpenSSH Certificate Authentication | Deployment Guide
    OpenSSH certificates contain a public key, identity information, and validity constraints. They are signed with a standard SSH public key using the ssh-keygen ...
  106. [106]
    SSH with Public Key Infrastructure (PKI): Integration and Management
    Sep 8, 2024 · Integrating SSH with PKI uses digital certificates for authentication, enhancing security, centralized management, and scalability. PKI manages ...
  107. [107]
    Configuring Certificate Authentication for SSH on Cisco IOS XE ...
    Jul 17, 2025 · Certificate-based SSH authentication uses X.509v3, integrating with PKI. Both client and server must trust a common CA, and the same CA's  ...<|control11|><|separator|>
  108. [108]
    4.1 Git on the Server - The Protocols
    Git can use four distinct protocols to transfer data: Local, HTTP, Secure Shell (SSH) and Git. Here we'll discuss what they are and in what basic circumstances ...
  109. [109]
    Connecting to GitHub with SSH
    Connecting to GitHub with SSH. You can connect to GitHub using the Secure Shell Protocol (SSH), which provides a secure channel over an unsecured network.
  110. [110]
    1.1 Getting Started - About Version Control - Git
    We will begin by explaining some background on version control tools, then move on to how to get Git running on your system and finally how to get it set up to ...
  111. [111]
    [PDF] Conducting SSH Man in the Middle Attacks with sshmitm
    Jun 21, 2002 · The purpose of this paper is to raise awareness about a vulnerability in the key exchange phase of the SSH protocol.Missing: inherent | Show results with:inherent
  112. [112]
    VU#958563 - SSH CBC vulnerability
    Nov 24, 2008 · A vulnerability exists in SSH messages that employ CBC mode that may allow an attacker to recover plaintext from a block of ciphertext.
  113. [113]
    CVE-2008-5161 OpenSSH: Plaintext Recovery Attack against CBC ...
    OpenSSH has a security flaw which, if exploited, the attack can potentially allow an attacker to recover up to 32 bits of plaintext from an arbitrary block of ...
  114. [114]
    cbc.adv - OpenSSH
    The new component seems to be an attack that can recover 14 bits of plaintext with a success probability of 2^-14, though we suspect this underestimates the ...
  115. [115]
  116. [116]
    1.6.5 Ensure system wide crypto policy disables cbc for ssh - Tenable
    If exploited, this attack can potentially allow an attacker to recover up to 32 bits of plaintext from an arbitrary block of ciphertext from a connection ...
  117. [117]
  118. [118]
    Terrapin Attack
    The Terrapin attack is a prefix truncation attack on SSH that breaks its secure channel by removing messages during the handshake, downgrading security.
  119. [119]
  120. [120]
    SSH protocol flaw - Terrapin Attack CVE-2023-48795 - JFrog
    Dec 25, 2023 · The inherent flaw in the SSH protocol itself affects a wide range of SSH client and server implementations. Following our initial research ...
  121. [121]
    CVE-2023-48795 Impact of Terrapin SSH Attack
    Jan 8, 2024 · The Terrapin attack allows an attacker to downgrade connection security by forcing less secure client authentication algorithms when using ...
  122. [122]
    Threat Brief: CVE-2024-6387 OpenSSH RegreSSHion Vulnerability
    Jul 2, 2024 · This vulnerability impacts all OpenSSH server versions between 8.5p1-9.8p1, as well as versions earlier than 4.4p1, if they've not backport- ...Executive Summary · Details of the Vulnerability · Palo Alto Networks Product...
  123. [123]
  124. [124]
    Qualys TRU Discovers Two Vulnerabilities in OpenSSH: CVE-2025 ...
    Feb 19, 2025 · The first, tracked as CVE-2025-26465, allows an active machine-in-the-middle attack on the OpenSSH client when the VerifyHostKeyDNS option is ...
  125. [125]
  126. [126]
    CVE-2025-26466 Detail - NVD
    Feb 28, 2025 · A flaw was found in the OpenSSH package. For each ping packet the SSH server receives, a pong packet is allocated in a memory buffer and stored in a queue of ...
  127. [127]
    OpenSSH and XZ/liblzma: A Nation-State Attack Was Thwarted ...
    Apr 1, 2024 · The attack appears to have been targeted at subset of OpenSSH servers patched to integrate with systemd. Running SSH servers in containers is rare.
  128. [128]
    Linux backdoor was a long con, possibly with nation-state support ...
    or SSH — tool, which compresses and scrambles data sent over a connection.
  129. [129]
    XZ Backdoor: Lessons from the OpenSSH Supply Chain Exploit
    Apr 3, 2024 · Critical lessons from the XZ backdoor in OpenSSH, focusing on supply chain security vulnerabilities, detection difficulties, and prevention ...
  130. [130]
    Keys to the Kingdom: Erlang/OTP SSH Vulnerability Analysis and ...
    Aug 11, 2025 · This article presents our observations of exploit attempts targeting CVE-2025-32433. This vulnerability allows unauthenticated remote code ...
  131. [131]
    Erlang/OTP SSH Exploits Spiked After April Patch - BankInfoSecurity
    Aug 13, 2025 · "If your SSH daemon is running as root, the attacker has full access to your device," the academics warned in an April 16 disclosure. The Erlang ...
  132. [132]
    Countering Chinese State-Sponsored Actors Compromise of ... - CISA
    Sep 3, 2025 · The actors may add keys to existing SSH services to regain entry into network devices [T1098. 004 ].
  133. [133]
    SSH Vulnerabilities And How To Protect Against Them
    Jan 27, 2025 · SSH vulnerabilities are weaknesses in the SSH protocol or its configuration that attackers can use for unauthorized access, data breaches, ...What are SSH Vulnerabilities? · How to Identify SSH... · How to Avoid SSH...<|separator|>
  134. [134]
    [PDF] People's Republic of China State-Sponsored Cyber Actors Exploit ...
    Jun 7, 2022 · PRC state-sponsored cyber actors also utilized command line utility programs like. PuTTY Link (Plink) to establish SSH tunnels [T1572] between ...
  135. [135]
    What is the Secure Shell (SSH) Protocol? | SSH Academy
    The SSH protocol (also referred to as Secure Shell) is a method for secure remote login from one computer to another.
  136. [136]
    RFC 4252: The Secure Shell (SSH) Authentication Protocol
    This document describes the SSH authentication protocol framework and public key, password, and host-based client authentication methods.Missing: details | Show results with:details
  137. [137]
    RFC 4254: The Secure Shell (SSH) Connection Protocol
    This document describes the SSH Connection Protocol. It provides interactive login sessions, remote execution of commands, forwarded TCP/IP connections, and ...
  138. [138]
    What is OpenSSH? - SSH Communications Security
    OpenSSH is an open-source implementation of the SSH protocol. It is based on the free version by Tatu Ylonen and further developed by the OpenBSD.
  139. [139]
    dropbearkey man - Linux Command Library
    Dropbear was created by Matt Johnston in 2003 as a lightweight SSH server and client, specifically targeting embedded systems and environments with limited ...
  140. [140]
    Dropbear SSH
    Dropbear is a relatively small SSH server and client. It runs on a variety of unix platforms. Dropbear is open source software, distributed under a MIT-style ...Missing: history security
  141. [141]
    security/dropbear: SSH 2 server, designed to be usable in small ...
    Dropbear is an SSH 2 server, designed to be usable in small memory environments. It supports: Main features of SSH 2 protocol, Implements X11 forwarding.
  142. [142]
    mkj/dropbear: Dropbear SSH - GitHub
    Dropbear can do public key auth as a client. But you will have to convert OpenSSH style keys to Dropbear format, or use dropbearkey to create them. If you have ...
  143. [143]
    Dropbear (software) - Wikipedia
    Features. Dropbear implements the complete SSH version 2 protocol in both the client and the server. It does not support SSH version 1 backwards-compatibility ...
  144. [144]
    Full Disclosure: [0xbadc0ded #02] Dropbear SSH Server <= 0.34
    Aug 18, 2003 · ... Matt Johnston, the Dropbear developer, was notified of the problem. ... Timeline 2003/08/16 Notified Matt Johnston - The Dropbear developer ...Missing: history | Show results with:history
  145. [145]
    Are dropbear and OpenSSH host keys compatible?
    Jun 2, 2014 · The title basically says it all. But mind: host key, not the login key. And if they're not compatible out of the box, is there a way to convert between them?Missing: comparison | Show results with:comparison
  146. [146]
    Dropbear SSH, a lightweight alternative to OpenSSH - Hacker News
    Aug 15, 2018 · In comparison, dropbear doesn't really do anything that ssh doesn't, and lags in a bunch of esoteric features that "most" people don't use ...
  147. [147]
    What is SSH (Secure Shell)? | SSH Academy
    The SSH protocol uses encryption to secure the connection between a client and a server. All user authentication, commands, output, and file transfers are ...
  148. [148]
    Secure Shell Overview (SSH) - VanDyke Software
    Secure Shell client/server solutions provide command shell, file transfer, and data tunneling services for TCP/IP applications.
  149. [149]
    Bitvise SSH Server 6.xx Version History
    On initial installation, the SSH Server will now generate and employ an ECDSA/nistp256 host key, in addition to the previously standard 1024-bit DSA host key.Missing: variants Tectia
  150. [150]
    What is an SSH client? - SSH Communications Security
    Commercial clients: Tectia SSH is a commercially supported SSH client for enterprises, with 24x7 support. More information on Tectia SSH >. SSH is a leading ...Missing: variants | Show results with:variants
  151. [151]
    SSH implementation comparison
    Implementations ; SSH2, 2012-11-11, 1.17.0 ; SSHJ, 0.40.0 ; SwiftNIO SSH, 2020-04-14, 0.11.0 ; Tectia SSH, 1995-07, 6.6.6 ...
  152. [152]
    PrivX PAM Among the First to Achieve the US FIPS 140-3 Security ...
    Jun 27, 2025 · FIPS 140-3 certification ensures PrivX is secure, compliant with government requirements, and future-proof, opening new market opportunities.
  153. [153]
    NIST 800-53: The SSH Key Management Requirements
    NIST 800-53 requires proper management of SSH user keys, including valid authorization, periodic monitoring, and timely rotation of private keys.
  154. [154]
    FIPS standard - Axway Documentation Portal
    Mar 12, 2020 · The transport-level protocols subject to FIPS compliance are: TLS, SSH. The restrictions apply both in the configuration of these protocols and ...
  155. [155]
    SSH/SSHD failing in FIPS mode due to unsupported encryption key ...
    Jul 2, 2025 · The answer you are actually looking for is this: If you are connecting to hosts that are using FIPS mode, you can only use ecdsa or rsa keys.Missing: export controls<|separator|>
  156. [156]
    [PDF] FIPS 140-3 Cryptographic Module Validation Program Management ...
    Oct 16, 2025 · Information subject to the export control laws. This document, which includes any attachments and exhibits hereto, may contain information ...
  157. [157]
    Post-Quantum SSH - Microsoft Research
    Post-quantum SSH addresses SSH's vulnerability to quantum computers by replacing key exchange and signature algorithms, and using hybrid mode for security.
  158. [158]
    Post-Quantum Cryptography - OpenSSH
    OpenSSH uses post-quantum algorithms to protect against quantum computer attacks, preventing "store now, decrypt later" attacks, which are a risk with current  ...Missing: integration | Show results with:integration
  159. [159]
    PQ/T Hybrid Key Exchange in SSH
    **Summary of draft-kampanakis-curdle-ssh-pq-ke-05**
  160. [160]
    OpenSSH goes Post-Quantum, switches to qubit-busting crypto by ...
    Apr 11, 2022 · The new OpenSSH version supports all the cryptographic algorithms that it did before, so your existing installations won't break.
  161. [161]
    OpenSSH 10.0 Introduces Default Post-Quantum Key Exchange ...
    Aug 12, 2025 · OpenSSH has supported one post-quantum algorithm since 2022, and ... Additional updates include improvements in configuration matching, FIDO2 ...
  162. [162]
    Post-quantum cryptography in Red Hat Enterprise Linux 10
    May 20, 2025 · In this article, I outline the implementations of PQC available in Red Hat Enterprise Linux 10.0 at the time of its release, and how to use them.
  163. [163]
    open-quantum-safe/openssh - GitHub
    Fork of OpenSSH that includes prototype quantum-resistant key exchange and authentication in SSH based on liboqs. PROJECT INACTIVE. CONTRIBUTORS WANTED.Missing: OSSH | Show results with:OSSH
  164. [164]
    Post-quantum security for SSH access on GitHub
    Sep 15, 2025 · GitHub is introducing post-quantum secure key exchange methods for SSH access to better protect Git data in transit.
  165. [165]
    SSH Communications Security Launches Quantum-Resilient ...
    Jul 16, 2025 · The latest Post-Quantum Cryptography (PQC) key exchange algorithms are now available. New up to 100% faster high-performance encryption with the ...
  166. [166]
    draft-miller-sshm-hostkey-update-02 - Host key update mechanism ...
    Aug 28, 2025 · ... Draft Host key update mechanism for SSH August 2025 1.1. Requirements Language The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL ...
  167. [167]
    draft-ssh-ext-info-04 - IETF Datatracker
    This memo defines a mechanism for SSH clients and servers to exchange information about supported protocol extensions confidentially after completed key ...Missing: ongoing | Show results with:ongoing
  168. [168]
    SSH Agent Protocol - IETF
    This document describes a key agent protocol for use in the Secure Shell (SSH) protocol.Missing: ongoing | Show results with:ongoing