Published: 07.10.2026
SFTP and SCP are two ways to move files securely over SSH, the same encrypted connection used to log in to a server. Both need only SSH access, and both can use keys instead of passwords. This guide explains the differences, common clients, key login and the errors people meet most often. Cloud Drive supports SSH, SFTP and SCP, and a VPS with SSH access supports them as well.

SFTP and SCP in brief
- SFTP is an interactive file transfer protocol. It lets you browse folders, upload, download, rename and delete files within one session.
- SCP copies files with a single command, which suits scripts and quick copies. Recent OpenSSH releases carry scp over the SFTP protocol, so both reach the same files with the same security.
- Both use the SSH connection and the same login methods, including keys.
Clients you can use
On Windows, the OpenSSH client is often installed already and provides the sftp and scp commands in a terminal. macOS and Linux include the same commands. Graphical desktop clients also support SFTP, with a saved site list and drag-and-drop transfers. Choose the tool you are comfortable with, because the protocol and the server side stay the same.
Log in with a key
- Create a key pair on your computer with the ssh-keygen command and the ed25519 type, and protect the private key with a passphrase.
- Copy the public key to the server with ssh-copy-id, or add it by hand to the authorized keys file of the account if the tool is missing.
- Test the login with the ssh command, the user name and the host name from your connection details.
- Use sftp or scp with the same key. Never share the private key, and never paste it into a chat or e-mail.
If your Cloud Drive connection details allow key login, use it. Otherwise, follow the login method listed in the customer area and store the password in a password manager.
Common errors and what they mean
- Permission denied (publickey). The server does not accept your key. Check the user name, that the public key is in the right account, and the permissions of the .ssh folder.
- Connection refused or timeout. The address or port is wrong, or a firewall blocks the connection, including a cloud firewall rule.
- Host key verification failed. The server's fingerprint has changed, for example after an operating system reinstall. If the change is expected, remove the old entry with ssh-keygen and the R option followed by the host name, then connect again.
- Permission denied on a remote folder. Your account cannot write there. Check the folder ownership or the access level of your subaccount.
- No such file errors. Remote paths are case-sensitive on Linux. Use the exact spelling, and check the folder with ls before transferring.
Good habits
Use one key per computer or per automated job. Protect each private key with a passphrase, and store it only on machines you control. Once your keys work, disable password login on your servers. Keep an existing session open while you change SSH settings, so that you can correct a mistake. Remove keys from accounts that no longer need them.
Frequently asked questions
Which should I choose, SFTP or SCP? Use SFTP for browsing and interactive work, and SCP for quick one-line copies and scripts. Both use the same secure connection.
Is FTP the same as SFTP? No. FTP is a different protocol without the encryption that SSH provides. SFTP runs over SSH and encrypts the whole session.
Do I need a separate port for SFTP? No separate service is needed. Use the SSH port listed in your connection details, and add it to the command if it differs from the default.