Hi @Anish S
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.