Yesterday I was able to connect to VM. After i closed it, I was not able to connect anymore. I am getting these errors: Network connectivity blocked by security group rule: DefaultRule_DenyAllInBound
I am expecting a possible solution to this problem.
You have a rule in your network security group to allow RDP on TCP 3389, however, your test connection is for SSH on TCP 22. Which are you trying to connect by? RDP or SSH? Either add a rule to allow SSH or change your test to use RDP.
Note also, it is not good practice to open your NSG to source ANY. If you have an source IP or range that you can specify, it would be hugely more secure.