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

I recently needed to restart a Xen host box, and now I can no longer ssh into the VMs. I was able to before, but now I get Permission denied (publickey).

I am not too experienced with Xen, is there a reason it would have removed or overwritten the keys on the VMs when I restarted? How can I get the keys back onto the machines? Can I log into the machines from the host box directly?

share|improve this question
up vote 1 down vote accepted

You can attach on console and reset your keys with xm console <id>.

As to your other question, it might be a service you have set to run on boot (of the VMs). You should look through /etc/init.d for anything suspicious. Also check /var/log/messages to find any helpful hints.

To get the keys back onto the machine scp them over from the host.

share|improve this answer
I get a xm: command not found. This is a machine I inherited responsibility for. Any reason xm wouldn't be installed? – mvid Jul 25 '11 at 18:33
@mvid it's the standard tool for managing Xen VMs. ensure you're a privileged user, and install the appropriate package (xen-tools for some distros) if it isn't installed – Michael Lowman Jul 25 '11 at 20:21

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.