01
SFTP and FTP: what is different
SFTP (SSH File Transfer Protocol) transfers files inside an SSH connection. For you, this means:
- nothing to install on the VPS: the OpenSSH server on Debian and Ubuntu provides SFTP in its default configuration;
- the same port and the same accounts as SSH: port 22, your user, your password or your key;
- everything is encrypted, login details and files alike.
Classic FTP is a different protocol: it requires installing an FTP server and opening several ports, and, without encryption, it sends the password in clear text over the network. On a VPS, SFTP is the better replacement. Do not confuse it with FTPS, which is encrypted FTP, not SSH.
If you have never connected to your VPS over SSH, read connecting to your VPS over SSH first: the login details and connection errors are the same.
02
Connect with FileZilla
FileZilla is a free client for Windows, macOS and Linux. Download the client (not FileZilla Server) from the project's official website.
Quick connect. The top bar has four fields:
- the host:
sftp://203.0.113.10, with your VPS's address. The sftp:// prefix forces SFTP;
- the user and the password: those of the account on the VPS;
- the port:
22, or the SSH port you have chosen.
On the first connection, FileZilla shows the server's key, unknown until then. Check its fingerprint as explained in the SSH connection guide, then accept it.
The Site Manager (File menu) saves the connection. Create a site, choose the SFTP - SSH File Transfer Protocol protocol, and enter the host, port and user. For key-based login, set the Logon Type to Key file and select your private key. FileZilla uses PuTTY's .ppk format; if it is given a key in OpenSSH format, it offers to convert it the first time. Keep the original key.
The window is split in two: your computer on the left, the VPS on the right. Drag a file from one side to the other to transfer it; the queue at the bottom shows progress and failures.
03
Connect with WinSCP
WinSCP is a free client for Windows. When it opens, the login window asks for:
- File protocol: SFTP;
- Hostname: the VPS's IP address;
- Port number:
22, or your SSH port;
- Username and Password: the account's login details.
Save keeps the site for next time. For a key, open Advanced, then the SSH, Authentication page, and select the file in Private key file. WinSCP also expects the .ppk format: if you choose an OpenSSH key, it offers to convert it.
Like FileZilla, WinSCP asks you to accept the server's key on the first connection, then shows two panels, your computer and the VPS. It can also open a remote file in an editor and send it back when you save, which is handy for tweaking a configuration file.
To create or convert a key, and to see why it beats a password, see creating an SSH key.
04
File permissions and large transfers
The owner. A file sent over SFTP belongs to the account you are logged in with. If you upload files as root that are meant for another user or a service, hand them over afterwards. For example, for a site served by Apache or Nginx on Debian and Ubuntu, whose user is called www-data:
sudo chown -R www-data:www-data /var/www/monsite
Permissions. The usual values are 644 for files (read and write for the owner, read for others) and 755 for folders. Avoid 777, which lets any program on the machine change your files. FileZilla and WinSCP let you change permissions by right-clicking the file.
Large files.
- check the free space before uploading, with
df -h on the VPS;
- bundle thousands of small files into an archive (
tar czf site.tar.gz monsite), then extract it on the VPS with tar xzf site.tar.gz: it is much faster than sending them one by one;
- if the connection drops, FileZilla offers to resume a file that is already there instead of overwriting it. By default, WinSCP sends files larger than 100 KB under a temporary name ending in
.filepart, and offers to resume the transfer on the next attempt.
05
On the command line: scp, sftp and rsync
On Mac, Linux and in PowerShell on Windows 10 and 11, scp and sftp come with the OpenSSH client.
scp archive.tar.gz root@203.0.113.10:/root/
scp -r monsite root@203.0.113.10:/var/www/
scp -P 2222 archive.tar.gz root@203.0.113.10:/root/
-r copies a whole folder. The port is given with -P, in uppercase, because -p is already used to keep dates and permissions. To copy the other way, swap the source and the destination.
sftp root@203.0.113.10 opens an interactive session: ls and cd on the server side, lcd on the computer side, put to upload, get to download, exit to quit. reput and reget resume an interrupted transfer.
rsync synchronizes a folder by sending only what has changed: ideal for updating a site or a backup. It must be installed on both sides (sudo apt install rsync on the VPS); it does not come with Windows.
rsync -avP monsite/ root@203.0.113.10:/var/www/monsite/
rsync -avP -e 'ssh -p 2222' monsite/ root@203.0.113.10:/var/www/monsite/
-a copies subfolders while keeping permissions and dates, -v gives details, -P shows progress and keeps partial files so the transfer can resume. The slash after monsite/ matters: it copies the folder's contents, without creating an extra monsite folder at the destination.
06
On CloudFive
On the Ryzen VPS, from €5.99 per month, SFTP works as soon as the VPS is delivered, with root access: nothing to install. NVMe storage handles uploads of many files well, and a snapshot taken from the customer area manager.cloudfive.fr before a big release lets you roll back.
Our VPS run on AMD Ryzen 9 9950X with DDR5 memory, or on Intel Xeon, as LXC containers or KVM virtual machines, with a dedicated IPv4 address and basic anti-DDoS protection included. The servers are in France, monthly with no commitment, with support in French 7 days a week. To put a website online on the VPS, follow hosting a website on a VPS, then the HTTPS certificate with Certbot.
07
Frequently asked questions
What is the difference between SFTP and FTP?
SFTP runs over SSH: it uses port 22 and the server's accounts, encrypts everything and needs nothing installed on a Linux VPS. FTP is a different protocol, which requires a separate FTP server and sends the password in clear text if it is not encrypted.
Which port do I use to connect over SFTP?
The same as for SSH: 22 by default, or the port you have chosen for the SSH server. In FileZilla, write the address as sftp://address to force SFTP.
Does FileZilla accept SSH keys in OpenSSH format?
FileZilla uses PuTTY's .ppk format. If you give it an OpenSSH key, it offers to convert it the first time; keep the original key for SSH. WinSCP does the same.
Why can my website not change the files I uploaded over SFTP?
The files belong to the account you were logged in with, often root. Hand them over to the web server's user, www-data on Debian and Ubuntu, with sudo chown -R www-data:www-data followed by the site's folder.
How do I send a very large file to a VPS?
Check the free space with df -h, then send it with FileZilla or WinSCP, which can resume an interrupted transfer, or with rsync -avP on the command line. For many small files, bundle them into a tar archive first.