ASCII Mode in SFTP? (Secure File Transfer over SSH)

SFTP is not in any way related to FTP. FTP is the “File Transfer Protocol” whereas SFTP is a subsystem of the SSH protocol. SFTP is a protocol for file transfer over SSH. (Not to be confused with “FTPS”, which is the FTP protocol over SSL/TLS.)

Most people familiar with FTP know about transfer modes: binary and ASCII. A file uploaded to an FTP server may be transferred in ASCII mode such that line-endings are automatically converted (by the FTP server) to the appropriate convention used on the remote server (typically CRLF vs bare-LF). With SFTP, there is no such thing as a “transfer mode”. In a nutshell, data is written byte-for-byte with no modification.

The Chilkat SFTP component’s WriteFileText method may be called to write text data to an open remote file. You’ll need to make sure the text you are writing already has line endings in the format desired.

Tags :