0

At this time I have one Raspberry Pi B+ at home. Since I'm going to buy another one, I was wondering if it was safe to clone the SD card of the first Raspberry and put into the second one? For example: Are there any keys or files saved that should be unique to the device? (Except RSA keys for ssh, passwords)?

Something like this: Debian and Ubuntu Linux: Set openssh SeverKeyBits to 1024

1

i was wondering if it was safe to clone the sd card of the first raspberry and put into the second one

Yes.

are there any keys or files saved that should be unique to the device? (Except RSA keys for ssh, passwords)?

They don't need to be unique, no. I.e., you can clone the card and change or not change them afterward as you like. It is normal to use the same public key on multiple devices to save the hassle of keeping one for each. As for the sshd server private key, this is not really a big deal unless it is open to the internet beyond your LAN and you are worried about people cracking into one device then the other. However, the best protection against that is to prevent it from happening -- if they did it to one, simply having a different key probably won't stop them from using whatever technique they used a second time (which likely has nothing to do with the server keys).

An exception to that would be a static IP if you have one hardcoded and intend to plug in both pis on the network at the same time. Note also the ethernet MAC address will be different, although this should not have any consequences.

  • What about the ssh host keys, do i need to regenerate it? – Matteo Jan 4 '16 at 16:46
  • I've edited in some stuff about that. Again, you don't have to, although I guess it is pretty easy so you might as well. – goldilocks Jan 4 '16 at 16:48
  • You may find it convenient to give each a unique hostname. This is necessary if you are using zero-conf to avoid confusion. – Milliways Jan 4 '16 at 23:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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