Wednesday, November 3, 2021

[SOLVED] Steps required to SSH into Azure Windows VM from a Linux VM

Issue

Having created a Windows Azure VM and opened ports 3389 and 22 for inbound RDP and SSH connections, respectively.

I can successfully connect to the vm via RDP from a remote Windows PC. Testing SSH connection in the Portal succeeds. However trying to connect from a remote Linux VM using SSH fails.

Given that SSH connection test within the portal succeeds, it suggests that (1) it is possible to SSH into a windows VM; and (2) there is no other config require on the server ie installing OpenSSH (or similar) / Copying over key file(s) to some location etc. However, the help steps in the Azure Portal for my Windows VM, for making remote SSH connections suggest that maybe a public key needs to exist on the server and that I need the private key on the LinuxVM I am trying to connect from.

Please could someone help me understand if ssh into windows Azure VM is possible and if so, the requirements / minimum set of steps (on the target Windows VM and the source Linux VM) I need to get to a state that I can successfully SSH.

Other posts re similar question posted have not helped me connect via ssh. I have not found a 'golden source of truth' on Microsoft docs. Maybe I missed it.

Thank you.

enter image description here


Solution

A Windows Server doesn’t typically come pre-built and ready to go with SSH access and it requires some setup. You can follow this to set up your Azure VM for SSH access. You can configure SSH on a Windows Azure VM for access, check out How to Set Up OpenSSH on a Windows Server. After deploying the OpenSSH, you can follow the steps about connect via SSH with client in the Azure portal on your Linux client to access that Windows VM via SSH.



Answered By - Nancy Xiong