Can't connect with password or SSH Key to restored backup

Lance Quaro 1 Reputation point
2021-11-08T23:12:33.783+00:00

Hi all, I've been thrown into supporting this Azure account with very little familarity. More experienced with AWS.

We had a server failure on a Virtual Machine so I recreated the VM from a backup and moved the Network Configuration over to the new VM. The site is now back up, but I can't figure out how to connect to the new VM. On the old VM I has a user/pass I could use to SSH/SFTP into the server with. That doesn't seem to work anymore, though the new VM is a backup clone of the old. I tried creating a new SSH Key but that's now working either. I'm not sure what "Login username" to use in the command they give here ssh -i <private key path> <Login username>@52.160.107.155

Thanks!

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,357 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. kobulloc-MSFT 25,051 Reputation points Microsoft Employee
    2021-11-09T02:01:24.21+00:00

    Hello, @Lance Quaro !

    No worries, we'll try to help you get this sorted out.

    If the VM is stuck in a failed state, you can redeploy the VM in the portal or with the CLI pretty quickly. It's also possible to restore a VM if you have a specific recovery point/restore point that you are interested in although this is a much more involved process.

    What process did you use for recovering the failed VM?

    As far as the "Login username", this refers to the admin username that part of creating a Linux VM. Using the Azure CLI it would be the --admin-username value in az vm create and in the portal it would be Username on Basics (the first screen) under Administrator account:

    147524-image.png

    If you go to the portal, you can see what this username is by going to your VM resource and clicking on Connect under Settings on the left:

    147543-image.png

    If all else fails, you can Reset password in your VM resource (Support + troubleshooting > Reset password). This will allow you to reset the SSH key and assign a username.

    147506-image.png

    0 comments No comments