Making data migration (Debian OS) from one server to another, is SFTP (Ftp with SSH) fully encrypted ? Data with file names ?


SFTP is not really FTP within SSH but it is completely within an established SSH session i.e. every information is encrypted.

  • 5
    …unless you tell SSH to establish a connection using the null cipher algorithm (which some clients and servers allow) but I don't want to nitpick. ;-] – David Foerster Apr 7 '18 at 22:17
  • 2
    ...which would still be an example of moderately effective security by obscurity: Very few attackers would bother targeting what they would assume to be an effectively encrypted connection. – rackandboneman Apr 8 '18 at 2:00

SFTP has no relation to FTP except its goal (file transfer).

SFTP uses ssh (let's stay fuzzy and not distinguish ssh the command or SSH the protocol) as backend for encryption: whatever goes through ssh will be encrypted. However the internal SFTP protocol is working, it's backed by SSH's encryption: everything is encrypted.

That said, you should consider alternate methods to migrate data from server to server, because SFTP might not preserve some properties and meta properties of the files you're transfering (symbolic links, hard link count... come to mind). One usual method is to use a pair of tar commands with ssh. For example this Q/A.

  • 10
    Alternately, rsync -e ssh "Migrating data sets from one point to another" is kind of what rsync's meant for. – Shadur Apr 7 '18 at 17:59
  • 4
    Of note: FTP with bolt-on TLS encryption is called FTPS, not SFTP. – rackandboneman Apr 7 '18 at 21:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.