1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221
  
     | 
    
      <pre>Internet Engineering Task Force (IETF)                         S. Tatham
Request for Comments: 8160                                         PuTTY
Category: Standards Track                                      D. Tucker
ISSN: 2070-1721                                                  OpenSSH
                                                              April 2017
               <span class="h1">IUTF8 Terminal Mode in Secure Shell (SSH)</span>
Abstract
   This document specifies a new opcode in the Secure Shell terminal
   modes encoding.  The new opcode describes the widely used IUTF8
   terminal mode bit, which indicates that terminal I/O uses UTF-8
   character encoding.
Status of This Memo
   This is an Internet Standards Track document.
   This document is a product of the Internet Engineering Task Force
   (IETF).  It represents the consensus of the IETF community.  It has
   received public review and has been approved for publication by the
   Internet Engineering Steering Group (IESG).  Further information on
   Internet Standards is available in <a href="./rfc7841#section-2">Section 2 of RFC 7841</a>.
   Information about the current status of this document, any errata,
   and how to provide feedback on it may be obtained at
   <a href="http://www.rfc-editor.org/info/rfc8160">http://www.rfc-editor.org/info/rfc8160</a>.
Copyright Notice
   Copyright (c) 2017 IETF Trust and the persons identified as the
   document authors.  All rights reserved.
   This document is subject to <a href="https://www.rfc-editor.org/bcp/bcp78">BCP 78</a> and the IETF Trust's Legal
   Provisions Relating to IETF Documents
   (<a href="http://trustee.ietf.org/license-info">http://trustee.ietf.org/license-info</a>) in effect on the date of
   publication of this document.  Please review these documents
   carefully, as they describe your rights and restrictions with respect
   to this document.  Code Components extracted from this document must
   include Simplified BSD License text as described in Section 4.e of
   the Trust Legal Provisions and are provided without warranty as
   described in the Simplified BSD License.
<span class="grey">Tatham & Tucker              Standards Track                    [Page 1]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-2" ></span>
<span class="grey"><a href="./rfc8160">RFC 8160</a>               IUTF8 Terminal Mode in SSH             April 2017</span>
Table of Contents
   <a href="#section-1">1</a>.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   <a href="#page-2">2</a>
   <a href="#section-2">2</a>.  Conventions Used in This Document . . . . . . . . . . . . . .   <a href="#page-2">2</a>
   <a href="#section-3">3</a>.  New IUTF8 Opcode for Terminal Mode Encoding . . . . . . . . .   <a href="#page-2">2</a>
   <a href="#section-4">4</a>.  IANA Considerations . . . . . . . . . . . . . . . . . . . . .   <a href="#page-3">3</a>
   <a href="#section-5">5</a>.  Security Considerations . . . . . . . . . . . . . . . . . . .   <a href="#page-3">3</a>
   <a href="#section-6">6</a>.  References  . . . . . . . . . . . . . . . . . . . . . . . . .   <a href="#page-3">3</a>
     <a href="#section-6.1">6.1</a>.  Normative References  . . . . . . . . . . . . . . . . . .   <a href="#page-3">3</a>
     <a href="#section-6.2">6.2</a>.  Informative References  . . . . . . . . . . . . . . . . .   <a href="#page-3">3</a>
   Acknowledgements  . . . . . . . . . . . . . . . . . . . . . . . .   <a href="#page-4">4</a>
   Authors' Addresses  . . . . . . . . . . . . . . . . . . . . . . .   <a href="#page-4">4</a>
<span class="h2"><a class="selflink" id="section-1" href="#section-1">1</a>.  Introduction</span>
   The Secure Shell (SSH) connection protocol [<a href="./rfc4254" title=""The Secure Shell (SSH) Connection Protocol"">RFC4254</a>] provides an
   encoding for terminal modes, used in the "pty-req" channel request
   type.
   A commonly used terminal mode is IUTF8, which indicates that the
   terminal driver should assume that terminal I/O uses the UTF-8
   character encoding [<a href="./rfc3629" title=""UTF-8, a transformation format of ISO 10646"">RFC3629</a>].  This is typically used by the kernel's
   terminal driver on the server to decide how many bytes of input to
   treat as a single logical character during line editing.
   SSH does not currently provide an encoding for IUTF8.  This document
   specifies one.
<span class="h2"><a class="selflink" id="section-2" href="#section-2">2</a>.  Conventions Used in This Document</span>
   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 [<a href="./rfc2119" title=""Key words for use in RFCs to Indicate Requirement Levels"">RFC2119</a>].
<span class="h2"><a class="selflink" id="section-3" href="#section-3">3</a>.  New IUTF8 Opcode for Terminal Mode Encoding</span>
   The opcode value 42 is defined for the IUTF8 terminal mode.
   As specified in <a href="./rfc4254#section-8">Section 8 of [RFC4254]</a>, all opcodes in the range 1 to
   159 have a single uint32 argument; therefore, the IUTF8 opcode is
   followed by a single uint32 argument.  The value 0 indicates that the
   IUTF8 mode is disabled, and the value 1 indicates that it is enabled.
   As with all other encoded terminal modes, the client SHOULD transmit
   a value for this mode if it knows about one, and the server MAY
   ignore it.
<span class="grey">Tatham & Tucker              Standards Track                    [Page 2]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-3" ></span>
<span class="grey"><a href="./rfc8160">RFC 8160</a>               IUTF8 Terminal Mode in SSH             April 2017</span>
<span class="h2"><a class="selflink" id="section-4" href="#section-4">4</a>.  IANA Considerations</span>
   This document augments the list of "Pseudo-Terminal Encoded Terminal
   Modes" defined in <a href="./rfc4254#section-8">Section 8 of [RFC4254]</a>.
   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.
<span class="h2"><a class="selflink" id="section-5" href="#section-5">5</a>.  Security Considerations</span>
   The security considerations of [<a href="./rfc4254" title=""The Secure Shell (SSH) Connection Protocol"">RFC4254</a>] apply.  This additional
   terminal mode encoding is believed to have no security implications
   differing from the existing set of encoded terminal modes.
   Since the IUTF8 terminal mode is intended for use in conjunction with
   the UTF-8 character encoding, the security considerations of
   [<a href="./rfc3629" title=""UTF-8, a transformation format of ISO 10646"">RFC3629</a>] also apply to systems in which this mode is enabled.  In
   particular, terminal drivers that interpret this bit as enabling
   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 [<a href="#ref-UNICODE" title=""The Unicode Standard"">UNICODE</a>]).
<span class="h2"><a class="selflink" id="section-6" href="#section-6">6</a>.  References</span>
<span class="h3"><a class="selflink" id="section-6.1" href="#section-6.1">6.1</a>.  Normative References</span>
   [<a id="ref-RFC2119">RFC2119</a>]  Bradner, S., "Key words for use in RFCs to Indicate
              Requirement Levels", <a href="https://www.rfc-editor.org/bcp/bcp14">BCP 14</a>, <a href="./rfc2119">RFC 2119</a>,
              DOI 10.17487/RFC2119, March 1997,
              <<a href="http://www.rfc-editor.org/info/rfc2119">http://www.rfc-editor.org/info/rfc2119</a>>.
   [<a id="ref-RFC3629">RFC3629</a>]  Yergeau, F., "UTF-8, a transformation format of ISO
              10646", STD 63, <a href="./rfc3629">RFC 3629</a>, DOI 10.17487/RFC3629, November
              2003, <<a href="http://www.rfc-editor.org/info/rfc3629">http://www.rfc-editor.org/info/rfc3629</a>>.
   [<a id="ref-RFC4254">RFC4254</a>]  Ylonen, T. and C. Lonvick, Ed., "The Secure Shell (SSH)
              Connection Protocol", <a href="./rfc4254">RFC 4254</a>, DOI 10.17487/RFC4254,
              January 2006, <<a href="http://www.rfc-editor.org/info/rfc4254">http://www.rfc-editor.org/info/rfc4254</a>>.
<span class="h3"><a class="selflink" id="section-6.2" href="#section-6.2">6.2</a>.  Informative References</span>
   [<a id="ref-UNICODE">UNICODE</a>]  The Unicode Consortium, "The Unicode Standard",
              <<a href="http://www.unicode.org/versions/latest/">http://www.unicode.org/versions/latest/</a>>.
<span class="grey">Tatham & Tucker              Standards Track                    [Page 3]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-4" ></span>
<span class="grey"><a href="./rfc8160">RFC 8160</a>               IUTF8 Terminal Mode in SSH             April 2017</span>
Acknowledgements
   The authors are indebted to Colin Watson for originally suggesting
   this terminal mode in 2005, and David Madore and Jakub Jelen for
   prior implementation efforts.
Authors' Addresses
   Simon Tatham
   PuTTY
   Email: anakin@pobox.com
   Darren Tucker
   OpenSSH
   Email: dtucker@openssh.com
Tatham & Tucker              Standards Track                    [Page 4]
</pre>
 
     |