You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Azure环境下Windows远程访问Linux虚拟机时出现连接错误

Troubleshooting Putty Remote Access Errors for Azure VMs

Hey there, let’s work through the most likely fixes for your Putty connection issue—since you’ve already completed the initial setup steps, these are the top things to check first:

  • Verify Azure Network Security Group (NSG) Rules
    Head to your VM in the Azure portal → Networking → Inbound port rules. Make sure there’s an active rule allowing SSH traffic (default port 22) from your local public IP address. For testing, you can temporarily set the source to "Any" (just remember to lock it down to your IP afterward) to rule out NSG blockages.

  • Confirm VM Public IP/DNS and Running Status
    Double-check that the public IP or DNS name you’re using in Putty matches what’s listed on your Azure VM’s overview page. Dynamic IPs can change if you restarted the VM, so this is a common gotcha. Also, ensure the VM shows as Running in the portal—if it’s stopped/deallocated, start it up first.

  • Check the SSH Service on Your VM
    Use the Azure portal’s Serial Console to log into your VM directly (no SSH needed) and run systemctl status sshd (for Linux VMs). This will tell you if the SSH service is active. If it’s stopped, start it with systemctl start sshd and enable it to run on boot with systemctl enable sshd.

  • Audit Putty Configuration

    • Make sure you’ve selected SSH as the connection type and port 22 (unless you changed the default SSH port on your VM).
    • If using a private key, confirm you’ve loaded the correct .ppk file under Connection → SSH → Auth → Private key file for authentication. If you have an OpenSSH key, you’ll need to convert it to PPK format using Puttygen first.
    • Disable any proxy settings in Putty (Connection → Proxy) unless you explicitly need a proxy to connect—unintended proxies often block SSH traffic.
  • Rule Out Local Network Restrictions
    Your local firewall or ISP might be blocking outbound SSH on port 22. Test connecting from a different network (like a mobile hotspot) to see if the issue goes away—this will confirm if the problem is on your end or with the VM.

If you can share the exact error message from your screenshot, we can narrow this down even further! For example, "Connection refused" usually points to NSG or SSH service issues, while "Host key verification failed" relates to key mismatches.


内容的提问来源于stack exchange,提问作者Deepanshi Bansal

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.21 08:21:05