question

Brittany-7193 avatar image
0 Votes"
Brittany-7193 asked ·

Unable to SSH in Ubuntu VM

I created a cluster on Microsoft Azure which created a Virtual Machine. Whenever I try to SSH into the Virtual Machine, I get a 'Connection timed out' error. I have tried restarting the Virtual Machine and I've also checked the Network Security Group to make sure port 22 is not blocked. The Network Security Group is not blocking traffic to port 22. Are there any suggestions for resolving the 'Connection timed out' error?

azure-virtual-machines
10 |1000 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.

LeonLaude avatar image
1 Vote"
LeonLaude answered ·

Hi,

Something here might help:

Troubleshoot SSH connections to an Azure Linux VM that fails, errors out, or is refused
https://docs.microsoft.com/en-us/azure/virtual-machines/troubleshooting/troubleshoot-ssh-connection


Best regards,
Leon

· 6 ·
10 |1000 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.

Thanks Leon, I've tried the suggestions in the Troubleshoot SSH connections link that you sent. I'm still unable to SSH into the VM. If I create a VM that's not part of the cluster, I can SSH into it fine but not the one in the cluster.

0 Votes 0 ·

Did you check the local firewalls of the Ubuntu machines?
https://stackoverflow.com/questions/46436762/cannot-ssh-to-azure-vm

0 Votes 0 ·

Yes, I checked the local firewalls and reset the SSH configuration as well. I even restarted the VM and redeployed the VM.

0 Votes 0 ·

Hello @Brittany-7193,


Could you please provide us the details of the cluster service you setup in Azure (like Service Fabric, Kubernetes etc.)


Thanks, Manu


0 Votes 0 ·

Hey Manu,

It's a Kubernetes cluster with 1 Standard D8s v3 node on it.

0 Votes 0 ·
Show more comments
ManuPhilip avatar image
0 Votes"
ManuPhilip answered ·

Hello @Brittany,


I suggest you to go with the following Easy way to SSH into Azure Kubernetes Service cluster node VMs (kubectl-plugin-ssh-jump)


https://github.com/yokawasa/kubectl-plugin-ssh-jump


Please mark as "Accept the answer" if the above steps helps you. Others with similar issues can also follow the solution as per your suggestion


Regards,


Manu


·
10 |1000 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.

pituach avatar image
0 Votes"
pituach answered ·

Good day @Brittany-7193,

The following Microsoft official document provides step-by-step explanation on how to connect with SSH to Azure Kubernetes Service (AKS) cluster nodes

https://docs.microsoft.com/en-us/azure/aks/ssh

Note: I recommend to follow the tutorial and create new test machines. Once it is working well, go back to your real live VM and implement it. This way you will already have an understanding of the procedure and a working test.


·
10 |1000 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.