The Linux Tool SSH-Copy-ID allows a password-less authentication for a SSH-connection.

It's part of the package openssh-client:

sudo apt install openssh-client

Firstly generate SSH-Keys on the machine that should later connect to another machine:


All prompts can be skipped!

Finally copy the created key to the target-machine (the machine, to which a password-less SSH-connection should later be established):

ssh-copy-id -i /path/to/public-keys <username>@<hostname-targetserver/ip>


ssh-copy-id -i /home/user/.ssh/ root@
  • linux/command-collection/ssh-copy-id.txt
  • Last modified: 2023/07/30 12:11
  • by Zyzonix