Guest User

Untitled

a guest
Feb 19th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. # How to copy SSH keys to another machine?
  2.  
  3. Public key authentication is generally safer than password-based and is way more convenient.
  4.  
  5. SSH offers a command to set it up, `ssh-copy-id` (part of the openssh client package) will copy your public key to the remote machine.
  6. Use it like this:
  7.  
  8. ```bash
  9. ssh-copy-id -i ~/.ssh/my_key.pub remote-machine
  10. ```
  11.  
  12. You’ll be prompted your password, and your public key will be appended to the remote machine’s `~/.ssh/authorized_keys` file.
  13.  
  14. Note: Remember to use `ssh-keygen` to first generate a pair of keys if you don't have any.
Add Comment
Please, Sign In to add comment