When you add a rule to the NSG, and if you have a active session which matches that rule, then it will still be allowed even if you delete the rule until the session is closed. That is the possible explanation that I can provide you for the issue that you have been through.
Connection troubleshoot will not send actual traffic to validate that port. It checks the NSG rules and see if the traffic is allowed or not.
Best bet is to check the ports from online tools like https://ping.eu/port-chk/ and check if the ports are open. Cannot SSH can be due to following reasons:
- Issue with the NSG/ connectivity to the VM itself.
- Issue in the Guest OS where SSH port is not open. To troubleshoot this you need to check the Serial console logs and requires deeper troubleshooting.
Regards,
Karthik Srinivas