# SSH File Transfer Protocol (SFTP)

> A way to look at and move files on a server. It runs over SSH.

**Field:** Infrastructure  
**Category:** SSH & Remote Access  
**Also known as:** SFTP, sftp Command, Secure File Transfer

## Think of it like

Think of it like walking through a locked store room. You look around, take some boxes and leave some.

## Definition

SFTP is a way to move and manage files on a server over SSH. You log in once and get a session. Then you can list folders, upload, download, rename and delete. Many desktop apps use it to show the server's files like a normal folder. Despite the name, it is not FTP sent over a lock, it is its own protocol.

## Example

Jack opens his server in a file app that speaks SFTP. He drags the new website folder across with his mouse.

## Example code

```console
$ sftp jack@203.0.113.10
Connected to 203.0.113.10.
sftp> put index.html
Uploading index.html to /home/jack/index.html
```

Log in once, then upload a file inside the session.

## Why it matters

It gives a safe way to manage files for people who would rather drag than type.

## Common mistake

Opening plain FTP instead. FTP sends passwords in the clear, and SFTP does not.

## Three principles

- **A session.** Log in once, then many steps.
- **Over SSH.** Same port, same keys.
- **Not FTP.** A different, locked protocol.

## Related terms

- [scp](https://learn.benibix.com/term/infrastructure/scp)
- [rsync](https://learn.benibix.com/term/infrastructure/rsync)
- [Secure Shell (SSH)](https://learn.benibix.com/term/infrastructure/ssh)
- [SSH Server (sshd)](https://learn.benibix.com/term/infrastructure/ssh-server)

## Taught in

- [scp, SFTP and rsync](https://learn.benibix.com/learn/infrastructure-ssh/scp-sftp-and-rsync): SSH, 7/9

![Three lanes, each running from a laptop to a server through the same SSH tunnel. In the scp lane, one file is copied once. In the sftp lane, a session lists folders and uploads a file, like a file manager. In the rsync lane, a folder of ten files is checked and only the two changed files are sent.](https://learn.benibix.com/diagrams/inf3-file-transfer.svg)

---

Source: https://learn.benibix.com/term/infrastructure/sftp
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-17
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
