I have a Ubuntu virtual machine with ssh installed. (Ubuntu 12 with GUI)

  • I clone it and renew the clone IP address.

  • I want that the Master can have ssh to the clone without asking password.

  • I had set id_dsa.pub and authorized_keys in the clone machine.

However it still ask me password when I try to ssh from the master machine to the clone machine.

Can I have any suggestion? Thanks


Try to ssh with the -v flag and see what the identification error is.

ssh -v username@destinationIP

When you cloned the machine, the program may have regenerated the MAC address in the clone, so it's not recognized as the old one.

Also, I would advice to recreate the keys, not just copying them.

  • agreed. New IP and MAC would insist doing ssh-copy-id again. – Bhavin Doshi Jan 14 '14 at 10:29
  • Thank you Darent, however when I clone, I do not chose reinitialize MAC address option – Santosa Sandy Jan 14 '14 at 10:29
  • I'm not sure about this, but if both client and server keep the same MAC address, communication will be a mess even with the ssh-copy-id, because both devices will appear as the same in the virtual network. You should reinitialize it in one of the machines, and then setup the keys anew. – animaletdesequia Jan 14 '14 at 10:31
  • The key is used to do ssh to other machine (not the clone one) which in ssh access to another machine (not the clone one) case is working properly. I think twice to regenerate the key – Santosa Sandy Jan 14 '14 at 10:32
  • darent - I am following your advice to change the MAC of eth0. bkd.online - Now I had make different IP and MAC Address for both machine, can you explain more about the use of ssh-copy-id, please? – Santosa Sandy Jan 14 '14 at 10:50

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.