首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >失去对azure vm的远程访问

失去对azure vm的远程访问
EN

Stack Overflow用户
提问于 2016-09-10 03:11:05
回答 3查看 168关注 0票数 0

我在Azure VM上更改了RDP的端口。现在我无法连接到它。可能是因为我忘了将防火墙设置为允许新端口。现在我不能访问它了。

我不确定之前是否在该虚拟机上设置了Powershell。然而,当我使用Enter-PSSession时,它给了我这个错误:

代码语言:javascript
复制
Enter-PSSession : Connecting to remote server 40.xx.xxx.xxx failed with the following error message : WinRM cannot
complete the operation. Verify that the specified computer name is valid, that the computer is accessible over the
network, and that a firewall exception for the WinRM service is enabled and allows access from this computer. By
default, the WinRM firewall exception for public profiles limits access to remote computers within the same local
subnet. For more information, see the about_Remote_Troubleshooting Help topic.
EN

回答 3

Stack Overflow用户

发布于 2016-09-11 15:34:21

您需要将VM的IP地址添加到受信任的主机(位于您要连接的计算机上。Set-Item WSMan:\localhost\Client\TrustedHosts "40.xx.xxx.xxx“(或*)

票数 0
EN

Stack Overflow用户

发布于 2016-09-12 18:39:55

如果您确定此问题是由操作系统的本地防火墙引起的。然后,您可以通过自定义脚本扩展更改防火墙规则。

如果您使用的是ASM模式,请检查此article

如果您使用的是ARM模式,请检查此article

您可以通过powershell命令New-NetFirewallRule创建新的防火墙规则。

有关如何使用powershell管理windows防火墙的详细信息,请参阅以下链接:

Network Security Cmdlets in Windows PowerShell

票数 0
EN

Stack Overflow用户

发布于 2016-09-13 03:06:31

我找到了我自己的答案。在azure端口中,有一种上传powerscript文件以在VM中运行的方法。我只是用它把端口改回原来的3389,然后重启。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/39418290

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档