Ssh – I cannot SSH or Telnet to Windows Server 2012 on VPS

puttysshtimeoutvpswindows-server-2012

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 open

Port is listening

And listening

Best Answer

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.