Internet Engineering Task Force (IETF)                         S. Tatham
Request for Comments: 8160                                         PuTTY
Category: Standards Track                                      D. Tucker
ISSN: 2070-1721                                                  OpenSSH
                                                              April 2017
        
Internet Engineering Task Force (IETF)                         S. Tatham
Request for Comments: 8160                                         PuTTY
Category: Standards Track                                      D. Tucker
ISSN: 2070-1721                                                  OpenSSH
                                                              April 2017
        

IUTF8 Terminal Mode in Secure Shell (SSH)

安全Shell(SSH)中的IUTF8终端模式

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.

本文档指定了Secure Shell终端模式编码中的新操作码。新的操作码描述了广泛使用的IUTF8终端模式位,这表明终端I/O使用UTF-8字符编码。

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 Section 2 of RFC 7841.

本文件是互联网工程任务组(IETF)的产品。它代表了IETF社区的共识。它已经接受了公众审查,并已被互联网工程指导小组(IESG)批准出版。有关互联网标准的更多信息,请参见RFC 7841第2节。

Information about the current status of this document, any errata, and how to provide feedback on it may be obtained at http://www.rfc-editor.org/info/rfc8160.

有关本文件当前状态、任何勘误表以及如何提供反馈的信息,请访问http://www.rfc-editor.org/info/rfc8160.

Copyright Notice

版权公告

Copyright (c) 2017 IETF Trust and the persons identified as the document authors. All rights reserved.

版权所有(c)2017 IETF信托基金和确定为文件作者的人员。版权所有。

This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) 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.

本文件受BCP 78和IETF信托有关IETF文件的法律规定的约束(http://trustee.ietf.org/license-info)自本文件出版之日起生效。请仔细阅读这些文件,因为它们描述了您对本文件的权利和限制。从本文件中提取的代码组件必须包括信托法律条款第4.e节中所述的简化BSD许可证文本,并提供简化BSD许可证中所述的无担保。

Table of Contents

目录

   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   2
   2.  Conventions Used in This Document . . . . . . . . . . . . . .   2
   3.  New IUTF8 Opcode for Terminal Mode Encoding . . . . . . . . .   2
   4.  IANA Considerations . . . . . . . . . . . . . . . . . . . . .   3
   5.  Security Considerations . . . . . . . . . . . . . . . . . . .   3
   6.  References  . . . . . . . . . . . . . . . . . . . . . . . . .   3
     6.1.  Normative References  . . . . . . . . . . . . . . . . . .   3
     6.2.  Informative References  . . . . . . . . . . . . . . . . .   3
   Acknowledgements  . . . . . . . . . . . . . . . . . . . . . . . .   4
   Authors' Addresses  . . . . . . . . . . . . . . . . . . . . . . .   4
        
   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   2
   2.  Conventions Used in This Document . . . . . . . . . . . . . .   2
   3.  New IUTF8 Opcode for Terminal Mode Encoding . . . . . . . . .   2
   4.  IANA Considerations . . . . . . . . . . . . . . . . . . . . .   3
   5.  Security Considerations . . . . . . . . . . . . . . . . . . .   3
   6.  References  . . . . . . . . . . . . . . . . . . . . . . . . .   3
     6.1.  Normative References  . . . . . . . . . . . . . . . . . .   3
     6.2.  Informative References  . . . . . . . . . . . . . . . . .   3
   Acknowledgements  . . . . . . . . . . . . . . . . . . . . . . . .   4
   Authors' Addresses  . . . . . . . . . . . . . . . . . . . . . . .   4
        
1. Introduction
1. 介绍

The Secure Shell (SSH) connection protocol [RFC4254] provides an encoding for terminal modes, used in the "pty-req" channel request type.

安全外壳(SSH)连接协议[RFC4254]为终端模式提供编码,用于“pty req”通道请求类型。

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 [RFC3629]. 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.

常用的终端模式是IUTF8,这表示终端驱动程序应假定终端I/O使用UTF-8字符编码[RFC3629]。这通常被服务器上内核的终端驱动程序用来决定在行编辑期间作为单个逻辑字符处理的输入字节数。

SSH does not currently provide an encoding for IUTF8. This document specifies one.

SSH当前没有为IUTF8提供编码。本文件规定了一个。

2. Conventions Used in This Document
2. 本文件中使用的公约

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].

本文件中的关键词“必须”、“不得”、“必需”、“应”、“不应”、“应”、“不应”、“建议”、“可”和“可选”应按照[RFC2119]中所述进行解释。

3. New IUTF8 Opcode for Terminal Mode Encoding
3. 用于终端模式编码的新IUTF8操作码

The opcode value 42 is defined for the IUTF8 terminal mode.

操作码值42是为IUTF8终端模式定义的。

As specified in Section 8 of [RFC4254], 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.

如[RFC4254]第8节所述,1到159范围内的所有操作码都有一个uint32参数;因此,IUTF8操作码后面跟着一个uint32参数。值0表示IUTF8模式已禁用,值1表示已启用。

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.

与所有其他编码的终端模式一样,如果客户机知道该模式的值,则应发送该模式的值,而服务器可能会忽略该值。

4. IANA Considerations
4. IANA考虑

This document augments the list of "Pseudo-Terminal Encoded Terminal Modes" defined in Section 8 of [RFC4254].

本文件扩充了[RFC4254]第8节中定义的“伪终端编码终端模式”列表。

IANA has added the following opcode to the "Pseudo-Terminal Encoded Terminal Modes" registry:

IANA已将以下操作码添加到“伪终端编码终端模式”注册表中:

   opcode  mnemonic       description
   ------  --------       -----------
   42      IUTF8          Terminal input and output is assumed to be
                           encoded in UTF-8.
        
   opcode  mnemonic       description
   ------  --------       -----------
   42      IUTF8          Terminal input and output is assumed to be
                           encoded in UTF-8.
        
5. Security Considerations
5. 安全考虑

The security considerations of [RFC4254] apply. This additional terminal mode encoding is believed to have no security implications differing from the existing set of encoded terminal modes.

[RFC4254]的安全注意事项适用。这种附加的终端模式编码被认为与现有的一组编码终端模式没有不同的安全含义。

Since the IUTF8 terminal mode is intended for use in conjunction with the UTF-8 character encoding, the security considerations of [RFC3629] 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 [UNICODE]).

由于IUTF8终端模式旨在与UTF-8字符编码一起使用,[RFC3629]的安全注意事项也适用于启用此模式的系统。特别地,将此位解释为启用UTF -8意识的行编辑行为的终端驱动程序应仔细考虑该行为将如何处理非法序列、超长编码和组合字符的冗余表示(参见[Unicode ])。

6. References
6. 工具书类
6.1. Normative References
6.1. 规范性引用文件

[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>.

[RFC2119]Bradner,S.,“RFC中用于表示需求水平的关键词”,BCP 14,RFC 2119,DOI 10.17487/RFC2119,1997年3月<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>.

[RFC3629]Yergeau,F.,“UTF-8,ISO 10646的转换格式”,STD 63,RFC 3629,DOI 10.17487/RFC3629,2003年11月<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>.

[RFC4254]Ylonen,T.和C.Lonvick,编辑,“安全外壳(SSH)连接协议”,RFC 4254,DOI 10.17487/RFC4254,2006年1月<http://www.rfc-editor.org/info/rfc4254>.

6.2. Informative References
6.2. 资料性引用

[UNICODE] The Unicode Consortium, "The Unicode Standard", <http://www.unicode.org/versions/latest/>.

[UNICODE]UNICODE联盟,“UNICODE标准”<http://www.unicode.org/versions/latest/>.

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.

作者感谢科林·沃森(Colin Watson)在2005年最初提出这种终端模式,以及大卫·马多尔(David Madore)和雅库布·杰伦(Jakub Jelen)先前的实施工作。

Authors' Addresses

作者地址

Simon Tatham PuTTY

西蒙·塔塔姆腻子

   Email: anakin@pobox.com
        
   Email: anakin@pobox.com
        

Darren Tucker OpenSSH

达伦·塔克

   Email: dtucker@openssh.com
        
   Email: dtucker@openssh.com