3

I want to synchronise directories on the local host and a remote server via SFTP, using paramiko.sftp_file.SFTPFile.check() in Python to calculate MD5 checksums on the remote server.

According to http://docs.paramiko.org/en/2.1/api/sftp.html and https://stackoverflow.com/questions/30056566/how-to-perform-checksums-during-a-sftp-file-transfer-for-data-integrity, most SFTP server implementations (including OpenSSH, which I'm running by default) do not support the "check-file" extension.

My provider recommends vsftpd (see https://security.appspot.com/vsftpd.html) but its FAQ doesn't mention the "check-file" extension. Can anyone tell me whether vsftpd supports this, or otherwise recommend an SSH/SFTP implementation? I've tried Googling without success for this.

Thanks!

Huw Walters
  • 141
  • 1
  • 4

2 Answers2

4

Few servers that I know to support check-file SFTP extension are:


vsftpd is FTP(S) server, not SFTP server.

Martin Prikryl
  • 7,756
  • 2
  • 39
  • 73
-1

Why not transfer the files via rsync which already does this type of stuff internally and uses the SSH transport as well.

mdpc
  • 11,856
  • 28
  • 53
  • 67
  • A good suggestion, but I believe rsync copies modified files from a source to a target directory only (by checking timestamps). What I want is to copy files in either direction, if the checksum has changed since the last sync (each side maintains a list of files copied to the other side). – Huw Walters Jun 01 '17 at 21:23
  • Ahhh...I believe that it does do two-way sync. – mdpc Jun 01 '17 at 22:34
  • Not that I can see from its man page, unfortunately. Files are copied from a source dir to a target dir, no matter which was modified more recently. You can tell rsync not to overwrite more recent files, but that doesn't help if both files have been modified. The code I'm writing copies files if their checksums have changed since the last sync, in comparison with a cache file. – Huw Walters Jun 02 '17 at 21:23