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@HOSTParameters & Attributes
| Name | Type | Description |
|---|---|---|
| USER@HOST | operand | Authorized account |
| -i | option | Public key file |
| -n | option | Dry 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