Server Fault is a question and answer site for system and network administrators. 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

Whenever I get a new laptop, I copy the public and private ssh keys from the older one. But since I sometimes hold on to the old laptops, I'll be logging into servers and such using the same dsa keypair from up to 3 different computers. Is there any harm in doing this? Or is it better to have a distinct public and private keys for each computer you own?

share|improve this question

migrated from Jan 30 '10 at 17:40

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

Your key identifies YOU, so it's semantically correct, to use the same key everywhere. However, using the same key on 3 different computer makes 3 times bigger the chance to the key get stolen.

share|improve this answer
Agreed. If you want to help your security, make sure to use a passphrase, and leverage ssh-agent on your behalf. – Matt Simmons Jan 30 '10 at 21:24

I typically create an ssh key for each machine I connect from. That key has a useful comment so that I can identify each one, such as "mike-phone" vs "mike-laptop". In this way, if I lose one of the devices, I can easily remove its public key from systems I connect to without affecting my connection from other machines I use.

From a sysadmin perspective, its much better to have multiple public/private key pairs when things go south, while its more of a pain up front.

share|improve this answer

I agree with Erenon: those keys identify the user not the machine, so it's the same (only stronger) as using username/password to access a site from many computers. I suggest anyway to use a USB key or an external repository to store your keys, so you can use them everywhere without worring too much about stealing issues.

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.