Beginner Package: openssh-client

sftp

Interactively browse and transfer files over SSH.

Syntax

sftp [options] user@host

Description

sftp opens an interactive file-transfer session over SSH with its own command set (ls, cd, get, put), giving a more exploratory alternative to scp when you need to browse a remote filesystem rather than copy a known path.

Examples

sftp alice@host
Open an interactive SFTP session
get remote-file.txt
(Inside sftp) download a file from the remote host
put local-file.txt
(Inside sftp) upload a file to the remote host

Applies to

Ubuntu Debian Linux Mint RHEL CentOS / Rocky / AlmaLinux Fedora Arch Linux openSUSE Alpine Linux