Hi Tom Smith,
Thanks for sharing the details and the screenshot. Based on the information, I see you are using the Microsoft Entra ID SSH extension for authentication and encountering this error when connecting via PuTTY or other standard SSH clients on port 22:
key_exchange_identification: Connection
Your VM is configured to use the Microsoft Entra ID SSH extension, which enables authentication through Azure AD (Entra ID) using OpenSSH certificate-based authentication. This method is a modern and secure alternative to traditional SSH username/password or SSH key logins.
- Azure CLI SSH commands integrate seamlessly with this extension and support authentication using short-lived OpenSSH certificates issued by Entra ID. That’s why these connections succeed.
- Traditional SSH clients like PuTTY typically rely on password or private key-based authentication and, until recently, lacked full support for OpenSSH certificate-based authentication. This incompatibility can lead to connection timeouts or the SSH key exchange (kex_exchange_identification) error you are experiencing.

Could you please follow the below steps to resolve the issue:
1. Update PuTTY to the Latest Version:
Modern PuTTY versions now support OpenSSH certificate-based authentication, enabling compatibility with the Microsoft Entra ID SSH extension. Please download and use the latest PuTTY release to enable this functionality.
2. Verify Azure RBAC Role Assignments:
Ensure your Azure AD user has one of these roles assigned on the VM or resource group:
- Virtual Machine Administrator Login
- Virtual Machine User Login
Without these roles, Entra ID SSH authentication will be blocked.
3. Configure Traditional SSH Access (if needed):
If you prefer using PuTTY or other SSH clients without certificate support, you can enable password or SSH key authentication on the VM:
az vm reset-access --resource-group <ResourceGroup> --name <VMName> --user-name <username> --password <NewPassword>
- Edit sshd_config on the VM to include:
sudo vi /etc/ssh/sshd_config
PasswordAuthentication yes
sudo systemctl restart sshd
Alternatively, create an SSH key pair and configure authorized keys for SSH key-based login.
4. Microsoft Entra ID SSH Extension Considerations
- The Entra ID SSH extension enables Azure AD certificate-based logins that might conflict with traditional SSH authentication settings.
- You may temporarily disable the extension to test standard username/password SSH login.
- Alternatively, continue using Azure CLI SSH commands for seamless certificate-based logins.
If required, please restart or redeploy the VM.
Could you please refer below documentations:
https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/linux/troubleshoot-ssh-connection
https://learn.microsoft.com/en-us/entra/identity/devices/howto-vm-sign-in-azure-ad-linux
https://learn.microsoft.com/en-us/azure/virtual-machines/linux/ssh-from-windows#using-the-putty-ssh-client
Hope this helps to resolve the issue. Please let me know if you have any further questions or need assistance.