2

I need to gain root access to a newly-created VM hosted on Microsoft Azure. This is done on FreePBX (running CentOS) by sending the keys Alt+F9 on the console and issuing the command !passwd root.

How can I send modifier keys to Azure's Serial Console?

2
+50

You don't, because Alt+F9 is a keypress that only makes sense on the actual Linux framebuffer console. It switches to virtual terminal 9 on the real console. While it's possible to view the virtual machine's console using Boot Diagnostics, Azure doesn't allow sending keystrokes to the console. Therefore it is not possible to perform that action.

If you want to change the root password, you need to either log in with your normal user and sudo, or mount the virtual disk to another VM and edit its password (shadow) file from there.

  • Thanks for your answer Michael, that all makes sense! It's a little frustrating that I can administer the server through FreePBX's web GUI but not via SSH. I guess this is a task for another time when the VM can be shutdown and mounted elsewhere. Many thanks! – Danny Beckett May 21 at 2:47

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.