Skip to content
networkingprotocols

SFTP

sftpnetworkingprotocols
Plain English

SFTP moves files between computers over SSH, so everything is encrypted and it uses the same login as SSH. It is not FTP.

Technical Definition

SFTP is an SSH subsystem (sftp-server), not FTP over TLS (that is FTPS).

  • sftp user@host opens an interactive session: ls, get, put, cd, lcd.
  • scp now uses the SFTP protocol by default in OpenSSH 9.
  • Same keys, same port 22, same firewall rule as SSH.
  • Can be chrooted for upload-only users (ChrootDirectory, ForceCommand internal-sftp).

Source: sftp(1); CompTIA Network+ N10-009 Exam Objectives v4.0

SFTP in practice

$ sftp dev1@192.168.56.11
sftp> put report.txt
sftp> ls
sftp> bye
In the Wild

SFTP is the safe replacement for FTP and Telnet-era tools. Network+ N10-009 objective 1.4 lists it on port 22. BNLC lesson 6.6.