I have a custom image of Debian 6 and i have created an Azure Vm out of it. I am trying to ssh to it but it fails. The port 22 doesn't respond. I see the login screen of the vm from the troubleshooting section so it means that the boot is successfull. I have attached to the VM a Nic with a private&public ip.
I have also tested this local image in my local Hyper-V and i can ssh to it with a static ip address. But i cannot do the same in Azure neither with public nor private ip.
I didn't put any nsg so it is not a nsg problem.
Do you have any idea?
You definitely need to configure NSG in case you want to access SSH from the internet to your VM, refer to this doc
In other words when creating a NSG rule you always consider your private IP, I mean from the internet to your SSH VM, add its private IP on port 22 for example and source your public internet IP.
Alternately you can investigate it further through console as described into this doc, you should check SSH service, IP configuration inside VM and so on.