commands

ssh-copy-id — Install an authorized public key

Install public key on an authorized account using existing login access; -n previews on implementations supporting it. Verify the host first and keep a recovery path. Never send private key material. Use a fresh private workspace; live operations are VM-only.

Formal Syntax & Structure

linux syntaxlinux
ssh-copy-id [-i IDENTITY] [-n] USER@HOST

Parameters & Attributes

NameTypeDescription
USER@HOSToperandAuthorized account
-ioptionPublic key file
-noptionDry run

Return Value

exit status and output

Install public key on an authorized account using existing login access; -n previews on implementations supporting it. Verify the host first and keep a recovery path. Never send private key material.

Working Example

Example Snippetlinux
ssh-copy-id -n -i ./lab_ed25519.pub learner@lab-server.example
Linux Reference