RFC 8160
IUTF8 Terminal Mode in Secure Shell (SSH)
RFC 8160: IUTF8 Terminal Mode in Secure Shell (SSH) πβ¨
Okay bestie, let's get into it! π This RFC was written by Simon Tatham (PuTTY) and Darren Tucker (OpenSSH). It's a Standards Track document, published in April 2017. It doesn't obsolete or update any other RFCs, so it's a fresh start. π¦
The whole point is that it adds a brand new opcode for the widely used IUTF8 terminal mode, which tells the terminal that its I/O is UTF-8 encoded. Lowkey iconic π
1. Introduction πΈ
Okay so, the Secure Shell (SSH) connection protocol [RFC4254] has a way to encode terminal modes, and those get used in the "pty-req" channel request type. π
IUTF8 is a super common terminal mode. It basically says the terminal driver should assume that terminal I/O uses the UTF-8 character encoding [RFC3629]. The kernel's terminal driver on the server uses this to figure out how many bytes of input count as one logical character during line editing. It's giving "know your characters" energy π§
Here's the tea, though: SSH doesn't currently have an encoding for IUTF8. π This document fixes that by specifying one. π«Ά
2. Conventions Used in This Document π
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC2119]. Those are the official rules-words, so keep an eye out for them! π₯
3. New IUTF8 Opcode for Terminal Mode Encoding π¦
The opcode value 42 is defined for the IUTF8 terminal mode. π
As specified in Section 8 of [RFC4254], all opcodes in the range 1 to 159 have a single uint32 argument. So the IUTF8 opcode gets followed by one uint32 argument. π The value 0 means IUTF8 is disabled, and the value 1 means it's enabled. Simple and iconic β¨
As with all the other encoded terminal modes, the client SHOULD transmit a value for this mode if it knows about one, and the server MAY ignore it. π
4. IANA Considerations π
This document augments the list of "Pseudo-Terminal Encoded Terminal Modes" defined in Section 8 of [RFC4254]. π
IANA has added the following opcode to the "Pseudo-Terminal Encoded Terminal Modes" registry:
opcode mnemonic description
------ -------- -----------
42 IUTF8 Terminal input and output is assumed to be
encoded in UTF-8.
5. Security Considerations π
Okay, bestie, this one's serious, so read carefully! π¨
The security considerations of [RFC4254] apply. This extra terminal mode encoding is believed to have no security implications that differ from the existing set of encoded terminal modes. π«Ά
Since the IUTF8 terminal mode is meant to be used with the UTF-8 character encoding, the security considerations of [RFC3629] also apply to systems where this mode is enabled. π In particular, terminal drivers that read this bit as turning on UTF-8-aware line-editing behavior SHOULD carefully consider how that behavior will treat illegal sequences, overlong encodings, and redundant representations of composed characters (see [UNICODE]). Not me getting the Unicode drama in a security section π
6. References π
6.1. Normative References
- [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997, <http://www.rfc-editor.org/info/rfc2119>.
- [RFC3629] Yergeau, F., "UTF-8, a transformation format of ISO 10646", STD 63, RFC 3629, DOI 10.17487/RFC3629, November 2003, <http://www.rfc-editor.org/info/rfc3629>.
- [RFC4254] Ylonen, T. and C. Lonvick, Ed., "The Secure Shell (SSH) Connection Protocol", RFC 4254, DOI 10.17487/RFC4254, January 2006, <http://www.rfc-editor.org/info/rfc4254>.
6.2. Informative References
- [UNICODE] The Unicode Consortium, "The Unicode Standard", <http://www.unicode.org/versions/latest/>.
Acknowledgements π
The authors are so grateful to Colin Watson, who first suggested this terminal mode back in 2005. They also owe a big thank you to David Madore and Jakub Jelen for their earlier implementation work. Iconic squad goals ππ«Ά
Authors' Addresses π
Simon Tatham PuTTY
Email: anakin@pobox.com
Darren Tucker OpenSSH
Email: dtucker@openssh.com
π¦ where this page comes from
- ietf: rfc8160 2017-04
- π girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms