LOGBOOK

HELP

Quiz Entry - updated: 2026.07.14

How does sftp differ from scp?

Both run over SSH, but scp does one non-interactive copy, while sftp opens an interactive session where you browse and transfer files like an FTP prompt.

They share the same secure SSH foundation, so the difference is purely interaction style:

scp sftp
Mode One-shot, non-interactive Interactive session
Feels like cp a mini FTP shell
Best for Scripts, a single known transfer Exploring, grabbing several files, when you don't know the remote layout yet

You start a session and then run commands inside it:

sftp user@server
sftp> ls            # list the REMOTE directory
sftp> cd /var/log   # move around the remote side
sftp> get app.log   # download
sftp> put fix.conf  # upload
sftp> exit

The key convention: commands act on the remote side by default; prefix with l for the local side — lls, lcd, lpwd. So pwd shows where you are on the server, lpwd shows where you are on your own machine. Reach for sftp when you need to poke around interactively; reach for scp (or rsync) when you already know exactly what to copy.

Go deeper:

  • doc sftp(1) man page — the interactive secure file transfer program and its local (l-prefixed) commands.

From Quiz: LIOS / Archiving and Software Packages | Updated: Jul 14, 2026