Scp Installation On A Debian, Ubuntu, Alpine, Arch, Kali, CentOS, Fedora And Raspbian

Scp Installation On A Debian, Ubuntu, Alpine, Arch, Kali, CentOS, Fedora And Raspbian

scp

Secure copy.
Copy files between hosts using Secure Copy Protocol over SSH.

Maintainer: Debian OpenSSH Maintainers



Section: net

Install scp

  • Debian apt-get install openssh-client Click to copy
  • Ubuntu apt-get install openssh-client Click to copy
  • Alpine OS apk add openssh-client Click to copy
  • Arch Linux pacman -S scp Click to copy
  • Kali Linux apt-get install openssh-client Click to copy
  • CentOS yum install openssh-clients Click to copy
  • Fedora dnf install openssh-clients Click to copy
  • Raspbian apt-get install openssh-client Click to copy

Secure copy. Copy files between hosts using Secure Copy Protocol over SSH.

How to use scp?

Below are few example commands for scp that you can use in the terminal.

Copy a local file to a remote host:
scp path/to/local_file remote_host:path/to/remote_fileClick to copy
Copy a file from a remote host to a local folder:
scp remote_host:path/to/remote_file path/to/local_dirClick to copy
Recursively copy the contents of a directory from a remote host to a local directory:
scp -r remote_host:path/to/remote_dir path/to/local_dirClick to copy
Copy a file between two remote hosts transferring through the local host:
scp -3 host1:path/to/remote_file host2:path/to/remote_dirClick to copy
Use a specific username when connecting to the remote host:
scp path/to/local_file [email protected]_host:path/to/remote_dirClick to copy
Use a specific ssh private key for authentication with the remote host:
scp -i ~/.ssh/private_key local_file remote_host:/path/remote_fileClick to copy
Installation of latest scp command is available for Debian, Ubuntu, Alpine, Arch, Kali, CentOS, Fedora and Raspbian. You can copy the command for your OS from above and paste it into your terminal. Once you run the command it will download the 2026 latest package from the repository and install it in your computer/server.