Glossary / S / Secure copy protocol (SCP)

Secure copy protocol (SCP)

Secure copy protocol (SCP) is a simple network protocol used to transfer files between hosts over the secure shell (SSH) protocol. SCP encrypts both authentication credentials and file contents to reduce the risk of interception or unauthorized access during transmission, and it supports basic file operations such as copying files from a local system to a remote server or retrieving files from a remote location to a local machine.

SCP is commonly used in file transfer workflows that require a straightforward, scriptable method for moving data, such as device or firmware updates. It is widely adopted in file transfer protocol (FTP) server environments where IT administrators need to automate secure transfers using command-line tools. While SCP supports fast, point-to-point file transfers, it does not include advanced features like transfer resume, file integrity checks or comprehensive logging. For these reasons, SCP is typically used in scenarios where simplicity and security outweigh the need for more robust transfer management.

How to use SCP syntax

SCP works from a command-line interface to move files safely between systems. Learning its syntax and basic parts will help your team handle file transfers more easily. 

Basic syntax

SCP’s syntax is familiar to SSH-based workflows. Common SCP commands you might use include:

  • Local to remote: scp [options] source_file user@remote_host:destination_path
  • Remote to local: scp [options] user@remote_host:source_file destination_path
  • Remote to remote: scp [options] user@remote_host1:source_file user@remote_host2:destination_path 

Key elements

Other SCP elements that are helpful to implement are:

  • scp: The command itself
  • [options]: Optional flags that modify the behavior of SCP, like -P for specifying a non-standard SSH port
  • source_file: The path to the file you want to transfer
  • user: The username on the remote system 
  • remote_host: The hostname or IP address of the remote server
  • destination_path: The location on the remote or local machine where you want to save the file

Important considerations when using SCP

When using SCP, your organization should account for several operational behaviors related to permissions, SSH, overwriting and non-standard SSH ports that can impact security and file management. 

Non-standard SSH port

SCP does not support non-SSH ports. All transfers must occur over port 22 unless the SSH configuration is modified to use an alternate secure port.

Overwriting

SCP can overwrite existing files without warning. Transfers should be tested in non-production environments to avoid accidental data loss.

Permissions

File permissions on the destination server must be set correctly before transfer. SCP does not manage permissions post-transfer, so misconfigured rights may block access or expose sensitive data.

SSH

Because SCP relies on SSH, proper key management and SSH hardening are necessary. Weak configurations can open vulnerabilities during authentication.

SCP features and benefits

SCP is a simple file transfer protocol that operates over SSH. It does not offer advanced features like some newer file transfer systems, but it does offer some advantages where speed and command-line use matter most. These include:

  • Consistent performance for single-session file transfers
  • Does not require separate installation on systems with SSH already enabled
  • Enablement of automated transfers through scripting and batch jobs
  • Supports both upload and download operations between local and remote hosts
  • Uses SSH for encrypted transport to protect data in transit

While SCP lacks advanced capabilities like error recovery or detailed audit trails, it remains a practical choice for controlled and secure point-to-point transfers.

Limitations with SCP

While SCP offers basic security and ease of use, it lacks several features expected in modern file transfer solutions that affect its suitability for complex or large-scale MFT needs.

These include:

  • Lack of integrity checks to verify transferred files
  • Limited logging, which makes auditing and troubleshooting difficult
  • Minimal error handling during network interruptions
  • No native support for transfer queuing
  • No support for resuming interrupted transfers

Due to these constraints, SCP is best suited for controlled environments with simple transfer requirements rather than enterprise-grade file transfer workflows.

Secure copy protocol FAQs

What is the difference between SCP and SFTP?

SCP and SFTP both transfer files using a secure SSH connection, but SFTP is a more full-featured protocol that provides a modern file transfer experience. 

SCP is a simple protocol primarily used to copy files with a single command. It is fast but does not support file browsing or resume functions, and it’s primarily used for single-file transfers such as firmware or device updates.

SFTP’s functionality lets users list files, delete data or rename items during the session. It can resume transfers that were interrupted, provide logging of all activity and allow encryption specification. SFTP is generally a more robust protocol for everyday use and is supported by most MFT systems.

How do you transfer files using SCP in Windows?

First, you will need to install an SSH package into Windows, then open your command line tool.

The basic command format is scp [options] source_file user@remote_host:destination_path (note that you will need to type the full path to the file). Check that SSH is turned on for the other machine and that its port 22 is open as well, then add the remote username and the IP or hostname of the other computer and start your transfer.

What is the difference between SCP and rsync (over SSH)?

SCP and rsync both rely on SSH to move files securely. SCP always sends the full file, even if the destination already has it. It works well for single transfers and is easy to use. However, it does not support efficient updates or repeated syncs.

Rsync works differently. It compares files and sends only the changed parts. This makes it more efficient for syncing directories or updating files between systems. It also offers additional options for compression, deletion and file comparison, which SCP does not support.

Strengthen SSH-based file operations

Explore more efficient ways to secure and manage your organization’s SSH file transfers.
Blog

SCP vs SFTP: Which is better?

Blog

Using 2FA with SSH SFTP/SCP

Blog

What is SCP?

Blog

Six common questions about encrypted file transfer

Start a 25-day free trial

Try Cerberus Enterprise Edition for free

  • 25-Day Free Trial
  • Installs in minutes
  • No credit card required