= Copy ssh key to a remote server =
The ssh-copy-id
command installs ssh key on a server as an authorized key. It
allows for access provisioning without requiring a password for each subsequent
login.
How to use it
Once the key has been generated, you can use the ssh-copy-id
command to
install it on a server. Use the following command to authorize the key named
mykey
:
|
|
Only the public key is being copied. The private key should never be touched.
Once the key has been copied, it is the best to test it:
|
|
The login should now be completed without asking for a password.
MacOS
You will need to install this tool separately using for example Homebrew.
|
|
Alternatively you can install the tool using the following command:
|
|