What are they?
A protocol is a set of rules two computers follow to talk. Both SCP and SFTP run over SSH. SSH is a secure tunnel between your computer and the server. Anything inside the tunnel is scrambled, so nobody can read it on the way.
- SCP stands for Secure Copy. It is like a courier: it picks up files and drops them off. That is all.
- SFTP stands for SSH File Transfer Protocol. It is like a full file clerk. It can list folders, rename files, delete files and carry on a stopped transfer.
SFTP is not the same as FTPS. FTPS is old FTP with a security layer added. SFTP is a different thing built on SSH.
Main differences
| Point | SCP | SFTP |
|---|---|---|
| Job | Copy files only | Copy, list, rename, delete |
| Resume a stopped transfer | No | Yes, in most programs |
| Ease of use | One command | Works with point-and-click programs |
| Speed | Often fast for simple copies | Good, a little more chatter |
| Port | 22 | 22 |
Examples
SCP copies a file with one command.
scp backup.zip user@server-address:/home/user/
This sends backup.zip from your computer to the server.
SFTP opens a session where you can type many commands.
sftp user@server-address
This logs you in. Then you can type ls to list files, put file.txt to upload and get file.txt to download.
Which should you use?
- Use SFTP if you like a program with windows, such as FileZilla or WinSCP.
- Use SFTP if you need to manage files, not only copy them.
- Use SCP for a quick one-off copy in a script.
The SCP protocol is old, and newer tools often use SFTP behind the scenes anyway. Ask Hostvento support whether SSH access is on your plan.
Quick recap
- Both are safe and use SSH.
- SCP just copies; SFTP manages files too.
- Both use port 22 by default.
- SFTP is the better choice for most people.