question

AnishS-6311 avatar image
0 Votes"
AnishS-6311 asked ·

cannot ssh into vm after changing the default port no for ssh?

Hey,
I changed the default ssh port from 22 to a different one and then restarted the ssh service on the vm , and then in order to check the changes are working or not I tried to ssh to the vm on a different powershell window on my machine without logging out of the connected one but I cannot ssh to the vm using the new port no I am getting Connection timed out error . But if I change the port no to default that is 22 I can ssh into the vm can anyone help me with this?

azure-virtual-machines
· 1
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.

To follow-up, Please let us know if you have further query on this.
Please don’t forget to Accept the answer

0 Votes 0 ·

1 Answer

learn2skills avatar image
1 Vote"
learn2skills answered ·

Hi @AnishS-6311
Thank You for posting in Q & A.

After changing the default ssh port on the VM, can you verify that new ssh port is added in the NSG rules. once new ssh port is added in the NSG rules or FW you can able to connect on the VM


If the Answer is helpful, please click Accept Answer and up-vote, this can be beneficial to other community members.

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