1

I'm trying to remote into our development machine which is on an Azure VM with Remote - SSH an addon for VSC. I have installed openssh on the VM as per this document, and have been able to have the machine connect to the RDP via the az network bastion tunnel.

I have been able to connect, but it times out after the pre-set 15 seconds. My assumption is that the 22 port hasn't opened. Any suggestions welcomed.

1 Answer 1

1

You can try the following solutions to this problem:

  • Check to see if the Azure VM's 22 port is open. You can do this through the Azure portal or by running the Azure CLI command "az vm show —resource-group —name —query [publicIps] —output tsv". This will display the VM's public IP address, and you can scan the ports with a tool like nmap.

  • Check that the Azure VM's firewall is not blocking the 22 port. You can verify this by typing "az vm open-port —resource-group —name —port 22" into the Azure CLI. This will open the firewall's port 22.

  • Examine the Azure VM to see if the ssh daemon (sshd) is running. You can do this by connecting to the VM via RDP and entering the command "systemctl status ssh". If it isn't already running, type "systemctl start ssh" to get it going.

  • Check that you are connecting to the Azure VM via SSH with the correct username and password. Run the command "whoami" on the Azure VM to determine the username.

If none of the preceding steps work, you may need to troubleshoot the ssh connection itself.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .