Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

ssh-copy-id makes it easy to transfer a public key to a remote machine.

Is there any equivalent tool for moving a private key?


Don't do this! (see answer)

share|improve this question

migrated from Sep 27 '11 at 18:00

This question came from our site for professional and enthusiast programmers.

+1 for reminding me to use ssh-copy-id to copy a public key – rymo Oct 17 '11 at 1:57
up vote 6 down vote accepted

Good practice says that you shouldn't copy private keys from one machine to another. When you need access from a new client machine, create a new key on that machine, and set up the corresponding public key in your ~/.ssh/authorized_keys file on the server.

Doing this allows you to disable access from one client machine at a time, if you need to (suppose a laptop was stolen, for example).

share|improve this answer
ah okay, true :) – John Bachir Sep 27 '11 at 17:28

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.