Unable to access azure vm via ssh

Steve Fisher 40 Reputation points
2025-10-09T15:34:50.7633333+00:00

Cant connect via ssh to my linux box on azure
port 22 has a bypass rule set up in nsg for my ip i have used it in the past from multiple machines, i have tried from 2 today and i can not connect. the check access in azure portal is failing
Connection prerequisites

VM access__

Port 22 is not accessible from source IP(s) View blocking NSG rules

SSH command

I have redeployed the machine and can still not connect via ssh the troubleshooter found no issues

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
{count} votes

1 answer

Sort by: Most helpful
  1. Ankit Yadav 6,990 Reputation points Microsoft External Staff Moderator
    2025-10-09T17:49:23.18+00:00

    Cause: The issue occurred due to an unknown configuration or transient error that prevented successful SSH connections on port 22 despite the proper NSG bypass rule and previous successful access. The connection test in the Azure portal was failing, indicating that port 22 was blocked from the source IP.

    Resolution: The issue was resolved after the customer changed the VM password several times. This action might have triggered a reset or corrected a possible authentication-related anomaly, allowing SSH access to be restored.

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.