How To Install Ssh-copy-id On Debian, Ubuntu, Alpine, Arch, Kali, CentOS, Fedora, Raspbian And MacOS?

How To Install Ssh-copy-id On Debian, Ubuntu, Alpine, Arch, Kali, CentOS, Fedora, Raspbian And MacOS?

ssh-copy-id

Install your public key in a remote machine’s authorized_keys.

Maintainer: Debian OpenSSH Maintainers



Section: net

Install ssh-copy-id

  • 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 ssh-copy-id Click to copy
  • Kali Linux apt-get install openssh-client Click to copy
  • CentOS yum install ssh-copy-id Click to copy
  • Fedora dnf install ssh-copy-id Click to copy
  • Raspbian apt-get install openssh-client Click to copy
  • macOS brew install ssh-copy-id Click to copy

Install your public key in a remote machine's authorized_keys.

How to use ssh-copy-id?

Below are few example commands for ssh-copy-id that you can use in the terminal.

Copy your keys to the remote machine:
ssh-copy-id [email protected]_hostClick to copy
Copy the given public key to the remote:
ssh-copy-id -i path/to/certificate [email protected]_hostClick to copy
Copy the given public key to the remote with specific port:
ssh-copy-id -i path/to/certificate -p port [email protected]_hostClick to copy
Installation of latest ssh-copy-id command is available for Debian, Ubuntu, Alpine, Arch, Kali, CentOS, Fedora, Raspbian and macOS. 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.