SFTP (SSH File Transfer Protocol)
SFTP, the SSH File Transfer Protocol, lets a client upload, download, rename, list and delete files on a remote server over an encrypted SSH connection, usually on TCP port 22. Despite the name it shares nothing with FTP, and it is a different thing from FTPS, which is the old FTP protocol wrapped in TLS. Banks, insurers and regulators still use SFTP to swap files with partners.
How it works
The client opens an SSH connection and authenticates, usually with an SSH key pair, sometimes with a password. It then starts the sftp subsystem on that connection and sends binary requests such as open, read, write and close. Commands and file data share the one encrypted connection.
FTPS works differently. It is FTP with TLS added (RFC 4217): a control connection on port 21, or 990 in implicit mode, plus separate data connections on other ports, with X.509 certificates instead of SSH keys. That is why FTPS needs a range of firewall ports opened and SFTP needs one.
Running SFTP yourself means an OpenSSH server, chroot directories per user, key rotation and cleanup jobs. AWS Transfer Family is the managed option: you create a Transfer Server (the endpoint) and Transfer Users with SSH public keys, and files land in S3 or EFS (Elastic File System). Each user can map to a different bucket and IAM role.
For example, one shared endpoint serves 10 tenants, each with its own bucket and a lifecycle rule that deletes files after 90 days. Partner Alice runs sftp alice@s-1234567890abcdef0.server.transfer.us-east-1.amazonaws.com, then put report.csv, and the file lands only in tenant A's bucket.
Endpoints are billed per hour, so at $0.30 an hour one endpoint is about $219 a month (730 hours), and one endpoint per tenant would be about $2,190.
Why it matters in production
SFTP outages and leaks are usually access problems: a partner's key expired or was replaced, a user can see another tenant's files, or old files were never deleted. Keep users, keys and retention rules in infrastructure as code such as Terraform, give each tenant its own storage and a least-privilege role, and log every login and transfer.
See also
On the One2N blog
References
