Author Posts

August 12, 2016 at 12:08 am

I installed the 64 bit version of OpenSSH on a Windows Server 2012 machine. In PowerShell I started the SSH service. I could not SSH to the Windows server from the server itself. This is how I test SSH on Linux.

I tried to SSH from a Linux server to the Windows server. I got the error "connection refused." I know that port 22 is not blocked from the Linux server to the Windows server. What do I need to do to get OpenSSH to work?

I followed all of the github directions except the optional steps. What am I doing wrong?

August 12, 2016 at 2:29 am

Any entry in Windows server event/firewall logs about the dropped connection?

Curious. Can you telnet (port 23) to it for test purposes?

August 13, 2016 at 12:50 am

I could not use Putty to get into the Windows server. I get "connection refused." Port 23 is not blocked between the Linux server and Windows server. I don't have any way of using telnet that I can think of. I saw nothing in the logs. No connection ever initiates.

August 13, 2016 at 3:55 am

First get an SSH connection going from the Windows server itself. Do you see the OpenSSH server listening on port 22?

PowerShell command:

Get-NetTCPConnection | Where-Object { $_.LocalPort -eq 22 }

PowerShell output:

LocalAddress                        LocalPort RemoteAddress                       RemotePort State       AppliedSetting OwningProcess 
------------                        --------- -------------                       ---------- -----       -------------- ------------- 
::                                  22        ::                                  0          Listen                     3564                              22                             0          Listen                     3564

Command Prompt command:

netstat -an -p tcp | findstr

Command Prompt output:

  TCP                 LISTENING

August 17, 2016 at 12:54 am

I eventually got it to work. I do not know the root cause.