SSH-Copy-ID

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

Installation

It's part of the package openssh-client:

sudo apt install openssh-client

Setup

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

ssh-keygen

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>

Example:

ssh-copy-id -i /home/user/.ssh/id_rsa.pub root@10.0.1.230