Skip to content
BENIBIX Learn

SSH File Transfer Protocol (SFTP)

Infrastructure🔑 SSH & Remote AccessFile Transfer

Also known as SFTP, sftp Command, Secure File Transfer

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

Think of it like

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

Example

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

Why it matters

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

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 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.
In the sftp lane, a session stays open. You list folders and move files, like a file manager.

Common mistake

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

Key takeaways

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

Learn it properly