6

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

Sam
  • 61

2 Answers2

12

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

Hauke Laging
  • 90,279
  • 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 07 '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 08 '18 at 02:00
11

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.

A.B
  • 36,364
  • 2
  • 73
  • 118