Matt Johnson
hello world
Easily Transfer Public Key to Another Machine
Posted Wed Nov 09 @ 08:37:00 PM PDT 2011
If you want to enable key based authentication to a (*nix) computer, instead of:
- copying your public key
- logging into the other machine
- pasting it into the "authorized_hosts" file
You can just use the ssh-copy-id command.
For example, if I want to move my public key over to machine1.example.com, I can just do this:
ssh-copy-id username@machine1.example.com
You will be prompted to login and your public key will be transferred to the host. After that, you can just login with your key.