Cannot SSH to Azure VM
I am adding this because it might help someone, the chosen answer did not work for me
for some reason the firewall on the ubuntu server
Go to Serial Console
type in your ssh username and you will be logged into the server
Check the firewall status to see if port 22 is allowed
sudo ufw status verbose
If the rule is not there then add it
sudo ufw allow ssh
I encountered the same issue. The following is how I solve this issue:
- Don't add any port While creating your VM, do it only after only the VM is created
- Add the port 22 in the networking tab until the VM status is Running.
Looks to be an issue with the local firewall. Try resetting the SSH configuration in the portal.
- Go to Azure Portal
- Select VM in question
- Select Reset Password
- Select Reset Configuration Only
- Select Update