linuxazuressh

connect to host vm ip port 22: Connection timed out


I'm trying to ssh connect to my VM on Azure from my home pc. However, I get a connection timed out on port 22. Weird because last 2 days I connected via ssh it was fine. I check my inbound rules for SSH all are fine, refer picture below for my inbound rules. I check that my VM is currently running based on the Azure dashboard overview. There are a list of methods I tried in order to solve this issue however I haven't try to reset credentials and redeploy VM as I am waiting for others' suggested solution before I try it. Any idea why this happens? I appreciate anyone that could help.

enter image description here

There are a few methods that I tried to solve this problem.

  1. restart VM (not working)
  2. sudo ufw allow && sudo ufw allow 22 (not working then check for sudo ufw status verbose still inactive status)
  3. check VM health (health was okay)
  4. check list of status of Azure VM here (no issues for Southeast Asia)
  5. recreate inbound rules for ssh (not working)
  6. redeploy VM (not working)
  7. reset ssh public key (not working)

Solution

  • Probably, the outbound public IP from your home pc is changed then you could whiltelist the new public IP in inbound rule for port 22 in the NSG. Check what is my IP address.