I recently cloned one Raspberry Pi onto another (by SD cloning). I am trying to access both Raspberry Pis with the default RealVNC service as two separate connections. Because the two Pis are currently identical, there is no way for RealVNC to tell the two devices apart (besides specifying a unique IP address each time for each Pi). How can I make the two Pis different enough from each other so RealVNC can set up each Pi as its own cloud connection?

Here is what I have tried based on the (very) few answers I could find online:

sudo vncserver-x11 -generatekeys force
sudo Xvnc -generatekeys force
sudo systemct1 restart vncserver-x11-serviced.service   (just to restart the VNC program)

Besides the configuration you have done for VNC and giving the cloned RasPi a new ip address you also need a new hostname and new keys for the ssh server are also a good idea.

To change the hostname just edit /etc/hostname and /etc/hosts and reboot.

Because all clones have the same ssh server key, you will get error messages and warnings from the ssh client of dubious server connections. To avoid this you have to generate new server keys with:

~$ sudo rm -v /etc/ssh/ssh_host_*
~$ sudo dpkg-reconfigure openssh-server
~$ sudo systemctl restart sshd.service
| improve this answer | |

The steps that you've taken so far look correct.

If you're using RealVNC cloud connectivity, then you'll also need to re-register the cloned device by choosing licensing from the VNC Server menu, and logging into your account again. That should add you a new cloud entry.

| improve this answer | |

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.