How to transfer binary to SFTP?

How to transfer binary to SFTP? Will it be the same as a regular file? Or is there some other process?

+6
source share
1 answer

The binary is a normal file.

You may be referring to text / ascii compared to the binary transfer mode known from the FTP protocol. FTP protocol works in text / ascii mode by default, so you usually need to make sure that the mode has been switched to binary so as not to damage the transferred binary files.

SFTP also supports the distinction between text / ascii and binary modes in its new versions. Despite the fact that contrary to FTP, binary mode is the default, and if necessary, you must explicitly force the use of text / ascii mode.

In addition, ascii / text mode is supported by SFTP version 4 and later. And many SFTP servers / clients (including the most common, OpenSSH) support only SFTP version 3. Therefore, they will not even allow you to use text / ascii mode.

+17
source

Source: https://habr.com/ru/post/1215974/


All Articles