tldr/pages/common/ssh-copy-id.md

16 lines
422 B
Markdown
Raw Normal View History

2016-01-02 00:19:38 +00:00
# ssh-copy-id
> Install your public key in a remote machine's authorized_keys.
2016-10-21 19:45:02 +01:00
- Copy your keys to the remote machine:
`ssh-copy-id {{username@remote_host}}`
- Copy the given public key to the remote:
2016-01-02 00:19:38 +00:00
`ssh-copy-id -i {{path/to/certificate}} {{username}}@{{remote_host}}`
- Copy the given public key to the remote with specific port:
2016-01-02 00:19:38 +00:00
`ssh-copy-id -i {{path/to/certificate}} -p {{port}} {{username}}@{{remote_host}}`