$ curl cheat.sh/
 cheat:ssh-copy-id 
---
tags: [ ssh ]
---
# To copy your keys listed in `ssh-add -L` to a remote host:
ssh-copy-id <user>@<host>

# To copy the keys to a remote host on a non-standard port:
ssh-copy-id <user>@<host> -p 2222

# To copy one single public key to a remote host on a non-standard port:
ssh-copy-id -i ~/.ssh/a_public_key.pub "username@host -p 2222"

 tldr:ssh-copy-id 
# ssh-copy-id
# Install your public key in a remote machine's authorized_keys.
# More information: <https://manned.org/ssh-copy-id>.

# Copy your keys to the remote machine:
ssh-copy-id username@remote_host

# Copy the given public key to the remote:
ssh-copy-id -i path/to/certificate username@remote_host

# Copy the given public key to the remote with specific port:
ssh-copy-id -i path/to/certificate -p port username@remote_host

$
Follow @igor_chubin cheat.sh