大网数据广告活动
服务器运维问答

I cannot SSH or Telnet to Windows Server 2012 on VPS

· 52CE 我爱测

I just bought a Windows Server 2012 on VPS.I can connect it using remote desktop and setup mongodb and access it.But i cannot seem to telnet or ssh to it using Putty. Both ports are open and listening.Putty gives me 'Connection t…

问题原文

原帖链接 · Wardruna · CC BY-SA 3.0

I just bought a Windows Server 2012 on VPS.I can connect it using remote desktop and setup mongodb and access it.But i cannot seem to telnet or ssh to it using Putty.

Both ports are open and listening.Putty gives me 'Connection timeout error'.

Below are the screenshots

Port is open

Port is listening

已采纳解答

原帖链接 · bao7uo · CC BY-SA 3.0

I think it must be a firewall... could well be Windows firewall.

Try turning it completely off temporarily (if you are happy to!) to test. Run the following from an elevated (run as administrator) cmd prompt:

netsh a s a state off

If that is a work around that lets you ssh in then you have found the problem, so turn the firewall back on (again from elevated cmd prompt):

netsh a s a state on

Then you can try opening port 22 inbound using the following (elevated again):

netsh a f a r n="Open Port 22" d=in a=allow prot=TCP localp=22

That does it for all profiles.

If turning windows firewall off didn't let you ssh in, then still turn the firewall back on (obviously!). But it might be a firewall further upstream, like at your VPS provider's gateway.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2016-12-15)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。