rsh and RFC 4253) typically uses the Transmission Control Protocol (TCP) of TCP/IP, reserving port number 22 as a server listening port. This layer handles initial key exchange as well as server authentication, and sets up encryption, compression, and integrity verification. It exposes to the upper layer an interface for sending and receiving plaintext packets with a size of up to 32,768 bytes each, but more can be allowed by each implementation. The transport layer also arranges for key re-exchange, usually after 1 GB of data has been transferred or after one hour has passed, whichever occurs first.
The user authentication layer (RFC 4254) defines the concept of channels, channel requests, and global requests, which define the SSH services provided. A single SSH connection can be multiplexed into multiple logical channels simultaneously, each transferring data bidirectionally. Channel requests are used to relay out-of-band channel-specific data, such as the changed size of a terminal window or the exit code of a server-side process. Additionally, each channel performs its own flow control using the receive window size. The SSH client requests a server-side port to be forwarded using a global request. Standard channel types include:
- shell for terminal shells, SFTP and exec requests (including SCP transfers)
- direct-tcpip for client-to-server forwarded connections
- forwarded-tcpip for server-to-client forwarded connections
The SSHFP DNS record (RFC 4255) provides the public host key fingerprints in order to aid in verifying the authenticity of the host.
This open architecture provides considerable flexibility, allowing the use of SSH for a variety of purposes beyond a secure shell. The functionality of the transport layer alone is comparable to Transport Layer Security (TLS); the user-authentication layer is highly extensible with custom authentication methods; and the connection layer provides the ability to multiplex many secondary sessions into a single SSH connection, a feature comparable to BEEP and not available in TLS.
In 1998, a vulnerability was described in SSH 1.5 which allowed the unauthorized insertion of content into an encrypted SSH stream due to insufficient data integrity protection from CRC-32 used in this version of the protocol. A fix known as SSH Compensation Attack Detector was introduced into most implementations. Many of these updated implementations contained a new integer overflow vulnerability that allowed attackers to execute arbitrary code with the privileges of the SSH daemon, typically root.
In January 2001 a vulnerability was discovered that allows attackers to modify the last block of an IDEA-encrypted session. The same month, another vulnerability was discovered that allowed a malicious server to forward a client authentication to another server.
Since SSH-1 has inherent design flaws that make it vulnerable, it is now generally considered obsolete and should be avoided by explicitly disabling fallback to SSH-1. Most modern servers and clients support SSH-2.
CBC plaintext recoveryedit
In November 2008, a theoretical vulnerability was discovered for all versions of SSH which allowed recovery of up to 32 bits of plaintext from a block of ciphertext that was encrypted using what was then the standard default encryption mode, CBC. The most straightforward solution is to use CTR, counter mode, instead of CBC mode, since this renders SSH resistant to the attack.
Suspected decryption by NSAedit
On December 28, 2014 Der Spiegel published classified information leaked by whistleblower Edward Snowden which suggests that the National Security Agency may be able to decrypt some SSH traffic. The technical details associated with such a process were not disclosed. A 2017 analysis of the CIA hacking tools BothanSpy and Gyrfalcon suggested that the SSH protocol was not compromised.
RFC 4250 – The Secure Shell (SSH) Protocol Assigned Numbers
RFC 4253 – The Secure Shell (SSH) Transport Layer Protocol
RFC 4256 – Generic Message Exchange Authentication for the Secure Shell Protocol (SSH)
RFC 4345 – Improved Arcfour Modes for the Secure Shell (SSH) Transport Layer Protocol
The protocol specifications were later updated by the following publications:
- RFC 4462 – Generic Security Service Application Program Interface (GSS-API) Authentication and Key Exchange for the Secure Shell (SSH) Protocol (May 2006)
- RFC 5647 – AES Galois Counter Mode for the Secure Shell Transport Layer Protocol (August 2009)
- RFC 6239 – Suite B Cryptographic Suites for Secure Shell (SSH) (May 2011)
- RFC 7479 – Ed25519 SSHFP Resource Records (March 2015)
- RFC 8332 – Use of RSA Keys with SHA-256 and SHA-512 in the Secure Shell (SSH) Protocol (March 2018)
- T. Ylonen; C. Lonvick (January 2006). The Secure Shell (SSH) Protocol Architecture. IETF Trust. doi:10.17487/RFC4251. T. Ylonen; C. Lonvick (January 2006). The Secure Shell (SSH) Authentication Protocol. IETF Trust. doi:10.17487/RFC4252. "WinSCP home page". Archived from the original on 2014-02-17.
- ↑ Amies, A; Wu, C F; Wang, G C; Criveti, M (2012). "Networking on the cloud". IBM developerWorks. Archived from the original on 2013-06-14.
- ↑ Seggelmann, R.; Tuxen, M.; Rathgeb, E.P. (18–20 July 2012). SSH over SCTP — Optimizing a multi-channel protocol by adapting it to SCTP. 8th International Symposium on Communication Systems, Networks & Digital Signal Processing (CSNDSP). pp. 1–6. doi:10.1109/CSNDSP.2012.6292659. ISBN 978-1-4577-1473-3. S2CID 8415240.
- ↑ Tatu Ylönen. "SSH Port". Archived from the original on 2017-08-03.
- ↑ "libssh".
- ↑ Ylonen, T.; Lonvick, C. "Old Client, New Server". The Secure Shell (SSH) Transport Layer Protocol. IETF. sec. 5.1. doi:10.17487/RFC4253. "OSSH Information for VU#419241". CERT Coordination Center. 2006-02-15. Archived from the original on 2007-09-27. Either way ossh is old and obsolete and I don't recommend its use.
- ↑ Michel, François; Bonaventure, Olivier (2023-12-12). "Towards SSH3: how HTTP/3 improves secure shells". arXiv:2312.08396 [cs.NI].
- ↑ Flammarion, Paul; Hosono, George; Nguyen, Wilson; Bauman, Laura; Rebelsky, Daniel; Wan, Gerry; Adrian, David; Durumeric, Zakir (2026). "Hop: A Modern Transport and Remote Access Protocol". 35th USENIX Security Symposium (USENIX Security 26).
- ↑ RFC 8709.
- 1 2 Miller, D.; Valchev, P. (September 3, 2007). The use of UMAC in the SSH Transport Layer Protocol. IETF. I-D draft-miller-secsh-umac-00.
- ↑ Igoe, K.; Solinas, J. (August 2009). AES Galois Counter Mode for the Secure Shell Transport Layer Protocol. IETF. doi:10.17487/RFC5647. "Vulnerability Note VU#13877 - Weak CRC allows packet injection into SSH sessions encrypted with block ciphers". US CERT. Archived from the original on 2010-07-10.
- ↑ "Vulnerability Note VU#315308 - Weak CRC allows last block of IDEA-encrypted SSH packet to be changed without notice". US CERT. Archived from the original on 2010-07-11.
- 1 2 "Prying Eyes: Inside the NSA's War on Internet Security". Spiegel Online. December 28, 2014. Archived from the original on January 24, 2015.
- ↑ Jones, Connor (2023-12-20). "SSH shaken, not stirred by Terrapin downgrade vulnerability". The Register.
- 1 2 Tatu Ylönen (12 July 1995). "Announcement: Ssh (Secure Shell) Remote Login Program". comp.security.unix. Original announcement of Ssh
-
|