HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

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

Submitted by: @import:tldr-pages··
0
Viewed 0 times
commandssh-copy-idinstallkeyclipublicremoteyour

Problem

How to use the ssh-copy-id command: Install your public key in a remote machine's authorized_keys. More information: <https://manned.org/ssh-copy-id>.

Solution

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}}

Code Snippets

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}}

Context

tldr-pages: common/ssh-copy-id

Revisions (0)

No revisions yet.