Ssh Use Locally Available Keys to Authorize Logins on a Remote Machine: Difference between revisions
Jump to navigation
Jump to search
(Created page with "=Internal= * OpenSSH Operations =Overview=") |
|||
Line 4: | Line 4: | ||
=Overview= | =Overview= | ||
ssh-copy-id is a script that uses ssh to log into a remote machine, either via login password or using previously configured identities. It then assembles a list of the identities that failed to log in and using ssh enables logins with those keys on the remote server. By default it adds the keys by appending them to the remote user's ~/.ssh/authorized_keys, creating the file and directory as necessary. | |||
ssh-copy-id -i <identity-file> <user>@<remote-host> | |||
Identity file should be the private key. | |||
If you have access to the remote host via a different identity, access can be set based on a public key alone: | |||
ssh-copy-id -f -i <public-key-file> <user>@<remote-host> |
Latest revision as of 15:45, 28 April 2020
Internal
Overview
ssh-copy-id is a script that uses ssh to log into a remote machine, either via login password or using previously configured identities. It then assembles a list of the identities that failed to log in and using ssh enables logins with those keys on the remote server. By default it adds the keys by appending them to the remote user's ~/.ssh/authorized_keys, creating the file and directory as necessary.
ssh-copy-id -i <identity-file> <user>@<remote-host>
Identity file should be the private key.
If you have access to the remote host via a different identity, access can be set based on a public key alone:
ssh-copy-id -f -i <public-key-file> <user>@<remote-host>