rclone
Command-line sync for scripts and scheduled jobs.
- Create a remote with your SSH key (replace the username and key path with yours):
rclone config create myfiles sftp host sftp.getsftp.com port 22 user sftpuser_acme-jane key_file ~/.ssh/id_ed25519 - Pin the server's host key: connect once with ssh-keyscan -p 22 sftp.getsftp.com, compare the fingerprint with the portal, save the line to a known_hosts file and set known_hosts_file in the remote.
- List your folders and copy files:
rclone lsd myfiles: rclone copy ./outgoing myfiles:/inbox/acme - In scheduled jobs, use rclone copy rather than rclone sync unless you mean to delete files on the server that are missing locally.
- rclone can also use FTPS: create an ftp remote with explicit_tls = true and port 21. FTPS needs a password, stored with rclone obscure.
File times and permissions
Files keep their upload time, so when rclone sees a different time it compares checksums, and the server reads each of those files to compute them. To skip that, add --size-only (compares sizes only). --checksum verifies the contents of every file, which reads every file on the server.
rclone copy --size-only ./outgoing myfiles:/inbox/acmeFiles keep the time they were uploaded, and the server has no Unix file permissions. Over SFTP, a client that sets a file's time or permissions after an upload gets a success reply and nothing changes; over FTPS the same holds for the time. Who can read or change files is set by your organization in the portal.
Verify the server on first connect: compare the host key fingerprint your client shows with the one in the portal under Get started, step Connect. If they differ, do not continue and contact [email protected].