ASCII mode in SFTP transfers

后端 未结 1 1236
陌清茗
陌清茗 2021-01-28 14:19

What does the ASCII mode in SFTP transfer means. Does it going to transfer the file in text format.

相关标签:
1条回答
  • 2021-01-28 15:02

    Quoting SFTP specification regarding text (aka ASCII) access to remote files:

    5.3. Determining Server Newline Convention

    In order to correctly process text files in a cross platform compatible way, newline sequences must be converted between client and server conventions.

    The SSH_FXF_TEXT_MODE file open flag (Section 8.1.1) makes it possible to request that the server translate a file to a 'canonical' wire format. This format uses CRLF as the line separator.

    Servers for systems using other conventions MUST translate to and from the canonical form.

    Note that the "text mode" is supported since SFTP version 4 only. Many existing SFTP implementations (including the most widespread one, the OpenSSH) support SFTP version 3 only. So they do not support text/ASCII mode at all.

    0 讨论(0)
提交回复
热议问题