Connect to the Server
From a terminal on your computer:
sftp user@your_server_ipIf SSH listens on another port, use capital -P. To use a specific key, add -i:
sftp -P 2222 -i ~/.ssh/id_ed25519 user@your_server_ipAfter you log in, the prompt changes to sftp>. You are now working with two folders at once: the remote one on the server and the local one on your computer.
Move Around
| On the server | On your computer | What it does |
|---|---|---|
pwd | lpwd | Shows the current folder. |
ls | lls | Lists files. |
cd /var/www | lcd ~/Downloads | Changes folder. |
mkdir backups | lmkdir backups | Creates a folder. |
Commands that start with l act on the local side.
Upload and Download
| Command | What it does |
|---|---|
put index.html | Uploads a file from the local folder to the remote folder. |
put -r site | Uploads a folder and its contents. |
get error.log | Downloads a file from the remote folder to the local folder. |
get -r logs | Downloads a folder and its contents. |
reput big.iso / reget big.iso | Resumes an interrupted upload or download. |
Manage Files on the Server
rename old.txt new.txt: renames or moves a file.rm file.txt: deletes a file.rmdirdeletes an empty folder.chmod 644 file.php: changes permissions.df -h: shows free space on the server.bye: closes the session.exitandquitdo the same.
Graphical SFTP Clients
If you prefer drag and drop, FileZilla, WinSCP, and Cyberduck all speak SFTP. Choose SFTP as the protocol, enter the server address, port 22 (or your custom SSH port), user name, and either the password or your private key.
SFTP, FTP, and FTPS Compared
| SFTP | FTP | FTPS | |
|---|---|---|---|
| Encryption | Always, through SSH | None; passwords travel in plain text | TLS, when enabled |
| Port | 22, one connection | 21 plus separate data ports | 21 or 990 plus data ports |
| Login | Password or SSH key | Password | Password, optional certificate |
| Extra software on a Linux server | None | An FTP server | An FTP server with a certificate |
| Firewall setup | One port | Several ports | Several ports |
Despite the similar names, SFTP is not FTP over SSH and has nothing in common with FTPS: it is a separate protocol that happens to do the same job.
Give a User File Access Only
A user who should upload files but never run commands can be limited to SFTP. In /etc/ssh/sshd_config, a Match User block with ForceCommand internal-sftp and ChrootDirectory keeps that user inside one folder. The chroot folder must be owned by root and not writable by the user, with a writable subfolder inside for uploads.
For a single one-off copy, scp is quicker than opening an SFTP session.
Updated:
Linux VPS with Full Root Access
MUVCloud cloud servers run on KVM with Enterprise NVMe SSD storage and full root access, in Turkey, the Netherlands, and the USA.
More Guides
No Limits on Service or Support
You are not on your own as your projects grow. Our support engineers are ready 24/7, on several channels, whenever you need them.

- 100% customer satisfaction goal
- Our own hardware
- 24/7 ticket and email support
- 4 countries with locations