question

SaidAlisic-9825 avatar image
0 Votes"
SaidAlisic-9825 asked MohammadHFaridi-2992 published

Cannot SSH through Putty to Azure Ubuntu 18 LTS VM server

Dear Microsoft Support team,

Yesterday I created an Ubuntu 18 LTS VM server through Azure which I successfully connected to through an SSH connection with Putty on my Windows 10 laptop and I only used "sudo apt-get update" to check if everything was working normally in the terminal, thereafter I disconnected from the VM by typing the usual "exit" command and my connection was closed. However, today (less than 24 hours later) I don't seem to be able to connect through Putty at all on the same VM, same port, same username, same ppk, and same IP address at all as I get a "Connection timed out" error whenever I try to connect. Could this be a problem with either the VM or my computer? However, I did not install anything on my computer since yesterday and it was on "Sleep Mode" from the time I finished my work after exiting the VM and until now when I powered it up again.

Sincerely,
Said Alisic

azure-virtual-machines
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@SaidAlisic-9825 Any update on the issue?

If the suggested response helped you resolve your issue, do click on "Mark as Answer" and "Up-Vote" for the answer that helped you for benefit of the community.

Thanks.

0 Votes 0 ·

1 Answer

SumanthMarigowda-MSFT avatar image
1 Vote"
SumanthMarigowda-MSFT answered MohammadHFaridi-2992 published

@SaidAlisic-9825 This article helps you find and correct the problems that occur due to Secure Shell (SSH) errors, SSH connection failures, or SSH is refused when you try to connect to a virtual machine (VM): https://docs.microsoft.com/en-us/azure/virtual-machines/troubleshooting/troubleshoot-ssh-connection

There is also similar discussion thread here, please refer to the suggestion and let us know the status

  • Also check if Port 22 is Enabled/Allow on "default-allow-ssh" under "Inbound Port Rules". (Path: Dashboard > Select your VM > Networking (under Settings section)

  • 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

Azure VM and ssh connection: test succeeded but PuTTY timed out

Also, to isolate the issue further you may take a look into the detailed troubleshooting steps outlined in the documentation Detailed SSH troubleshooting steps for issues connecting to a VM in Azure, and let us know how it goes.

Hope this helps!
Kindly let us know if the above helps or you need further assistance on this issue.


Please don’t forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.


· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi, I have a same issue, but my issue is I have only issue with root user, I cannot ssh to ubuntu through Root User. do you have any advice in this rgeard?

0 Votes 0 ·