Apply for Free VPS

Copy files with scp, rsync and SFTP

Updated 27 Nov 2026 rsync ssh files

Move files to and from your server over SSH, including on custom ports.

Examples use the documentation address 203.0.113.10. Use the details on your server page. On a shared-IPv4 server, add -p PORT to ssh and -P PORT to scp.

scp: quick copies

Note the capital -P for the port:

scp report.pdf root@203.0.113.10:/root/
scp -r root@203.0.113.10:/var/www/site ./site-copy

rsync: repeatable and resumable

rsync -avz --progress ./site/ root@203.0.113.10:/var/www/site/

A trailing slash on the source copies its contents rather than the folder itself. Preview deletions before using --delete:

rsync -avzn --delete ./site/ root@203.0.113.10:/var/www/site/

Remove n to run it.

SFTP: graphical clients

In FileZilla, WinSCP or Cyberduck choose the SFTP protocol, the server address, the SSH port, your username and your private key.

Large transfers

Run them inside tmux so a dropped connection does not stop them. Verify important files:

sha256sum file.tar.gz

Was this helpful?

Report outdated or incorrect information