Search code examples
azuresshvirtual-machineazure-resource-managerazure-vm-role

Cannot SSH to Azure VM


I have a Ubuntu VM on Azure (Resource Group, not the Classic VM) and it all worked out of the box. I recently tried to SSH into the VM using Putty and I could not.

I get the error: Network Error: Connection Timed out.

I have made sure that the port 22 is opened for SSH on the VM Inbound rules.

SSH Port 22 Allowed

I had this VM setup about 2 months ago for a side project and at that time I was able to SSH easily without any troubles. Now I can't. Am I missing something?

PS: The HTTP works fine. I have the website running on it and it shows up in the browser. Also, I tried using a browser-based SSH client and it was able to SSH into the VM.


Solution

  • Looks to be an issue with the local firewall. Try resetting the SSH configuration in the portal.

    1. Go to Azure Portal
    2. Select VM in question
    3. Select Reset Password
    4. Select Reset Configuration Only
    5. Select Update

    Screenshot of the process here!