How SFTP and FTP are Different Protocols

How SFTP and FTP Are Different Protocols SFTP (Secure File Transfer Protocol) and FTP (File Transfer Protocol) may both be used for file transfers, but they are fundamentally different protocols in their design, security mechanisms, and underlying technologies. 1. SFTP (Secure File Transfer Protocol): Not an Extension of FTP: SFTP is not related to FTP. It’s a completely different protocol […]

SFTP Public Key Authentication with id_ed25519

Question: I have a vendor that wants me to send text files to their SFTP server. They want me to use SFTP to send the files. I have other vendors to which I use SFTP to send files but they use a password for authentication. I use Chilkat libraries to do the SFTP to those vendors. This vendor has supplied […]

Set Default Permissions of SFTP Uploaded Files to 664

Question:  How can I set the default permissions of every file uploaded without the need to change the file permissions on the server after the upload?  I want all uploaded files to have permissions 664. Answer: On most servers, the default file permissions should already be 664. To explicitly set the permissions to be used for uploaded files, then the […]

Downloading Super-Huge Files via FTP, SFTP, Http, etc.

It seems that more and more nowadays, Chilkat has customers needing to download gigantic files (many Gigabytes) using various protocols such as SFTP, FTP, or HTTP. These downloads can take a long time, even with a very good transfer rate. The longer the download time, the higher the probability that something goes wrong: network congestion, connectivity issues, server problems, etc. […]

SSH Authentication Options in sshd_config

The /etc/ssh/sshd_config file has an entry called AuthenticationMethods. Typically you would enter either: to indicate which authentication method should be required. You can also enter: to indicate that either authentication method should be required. You can also enter: to indicate that both authentication methods should be required. If a server requires both publickey and password, then call AuthenticatePwPk. If a […]

Binary vs Text Transfers (SFTP / FTP)

This post clarifies the topic of binary vs. ascii uploads/downloads for SFTP (Secure File Transfer over SSH) and FTP. Binary mode transmits bytes exactly as-is.   Text mode (also known as “ascii” mode) can modify line endings (CR’s and LF’s) to the canonical convention used on the remote system.  For example, Linux systems typically use bare LF line-endings, whereas text […]

SSH/SFTP Error: Must first connect to the SSH server

The following error is explained in this post: ChilkatLog: DownloadFileByName: DllDate: Apr 25 2018 ChilkatVersion: 9.5.0.73 UnlockPrefix: * Architecture: Little Endian; 64-bit Language: Cocoa Objective-C VerboseLogging: 0 SftpVersion: 3 Component successfully unlocked using purchased unlock code. Must first connect to the SSH server. –DownloadFileByName –ChilkatLog The above error can happen after a long period of inactivity. Let’s say your application […]

C# SFTP Upload from Byte[]

This example demonstrates how to open a remote file on an SSH/SFTP server, write to the file, and then close it. This is analogous to opening a local file, writing to it, and closing it. The SFTP protocol (i.e. Secure File Transfer over SSH), follows the same concepts as typical file I/O programming — i.e. open a file, read, write, […]