Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

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

I recently got a new laptop for work, and I was wondering whether it'd be good practice to keep using the same RSA keypair as I'm using on my old work laptop. I'd really like to not have to create another keypair to keep track of.

Is this, generally speaking, an acceptable practice? Since the keypair does have a passphrase, it should be fairly secure, as long as my physical machines are secure, right?

share|improve this question
Related: What's the common pragmatic strategy for managing key pairs? security.SE/10963 – n611x007 Aug 4 '15 at 11:59
up vote 3 down vote accepted

Yes, it is safe as long as it is in safe hands i.e. physical machines are secure. Of course, if an attacker gets access and is able to ssh into one machine, he can then get the key from that machine, and use the key for other computers as well. See this for more information.

share|improve this answer
Only the machine holding the private key needs to be secure. – psusi Dec 27 '11 at 15:36

To be a little more clear from the other answers here and other places: the "safety" is only as secure as the security of the private key. If someone can get access to your private key(s), it could possibly be emailed or copied to a USB device. Then the copied private key could be used by another person.

As long as the private key is in a secure system, then there is no problem having it go to multiple machines.

But one thing I will say: do not copy a private key to a remote system. Try to rely on the SSH agent (ssh-agent or pageant) and agent forwarding. If you do have a private key on a remote system, make sure that it is not the same key used to access the system.

share|improve this answer

For user-keys - yes, if you use a secure passphrase and you did create the key on a system without ssh security flaws.

For server-keys: no.

share|improve this answer

I'd say it's a good habit to have different keys for different groups, for instance: work, home, open_source_project.

The more keys you add, the more complex it is to manage them.

share|improve this answer

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.