In order to get an identical setup between machines with identical hardware, I cloned the drive from one onto the other, then did the ip and hostname configuration to differentiate the two Linux machines. Everything seems to work fine except for scp. (NFS and even ssh between the machines work fine)

Looking at the results of scp -v, it seems to authenticates correctly, but then it copies 0 bytes. Is there any way to fix this? Would generating new ssh keys for the machine work? If so, how do I do that? (Machine level keys, not user level keys)

link|improve this question
1  
Can you add the output of scp -v so we can potentially see where it's failing? – Dave K May 15 '09 at 18:00
can you paste in the scp -v results? Purge anything sensitive (hostnames or ips)... – Tim Howland May 15 '09 at 18:00
1  
Are you SURE ssh is connecting you to the OTHER machine, and not just back to itself? Does it work both ways? – Brent May 15 '09 at 18:15
I'm sure ssh isn't connecting to itself, I can remotely run apps that show up on the other machine's monitor and the like. I'll be back in a bit with the ssh -v – rck May 15 '09 at 22:09
feedback

2 Answers

You can regenerate new host ssh keys using the following command:

ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key

If you are on OSX, the location is actually at /etc/ssh_host_dsa_key. Also, you can substitute rsa for dsa if you prefer.

link|improve this answer
feedback

You probably have an entry in /etc/hosts that makes the cloned machine think it is the original one.

And if these are virtual machines, ensure that their virtual network cards have different MAC addresses.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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