Can execute SSH directly from Windows CMD into Centos 7, but not the other way around

Issues related to configuring your network
Post Reply
kix
Posts: 23
Joined: 2018/06/10 22:56:42

Can execute SSH directly from Windows CMD into Centos 7, but not the other way around

Post by kix » 2018/07/28 04:16:11

I followed instructions, here (link), and here, to use Cygwin64 to install an SSH server on my Windows 7 desktop.

From there I can open cmd.exe an administrator (required), and execute: ssh [centos 7 OS username]@[LAN address]

But when I try to do the same from laptop that has centos 7 installed, I get a connection time out.

On the windows 7 side, I've configured the firewall to allow both outbound and inbound port 22 connections.

Full output:

Code: Select all

OpenSSH_7.4p1, OpenSSL 1.0.2k-fips  26 Jan 2017
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 58: Applying options for *
debug1: Connecting to 192.168.1.157 [192.168.1.157] port 22.
debug1: connect to address 192.168.1.157 port 22: Connection timed out
ssh: connect to host 192.168.1.157 port 22: Connection timed out
This is the content of file at line 58

Code: Select all

sed -n '57,63p' /etc/ssh/ssh_config

Host *
	GSSAPIAuthentication yes
# If this option is set to yes then remote X11 clients will have full access
# to the original X11 display. As virtually no X11 client supports the untrusted
# mode correctly we set this to yes.
	ForwardX11Trusted yes
Edit: I apologize for not posting this in the networking support forum.
Centos 7 w/Gnome | Lenovo Thinkpad X201 ─ i7@2.6GHz, 4GB DDR3, 270 MB/s SSD

User avatar
TrevorH
Site Admin
Posts: 33191
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Can execute SSH directly from Windows CMD into Centos 7, but not the other way around

Post by TrevorH » 2018/07/28 08:38:38

You're trying to connect via ssh to an ssh daemon running on a Windows machine? Check the port is open in Windows firewall.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

kix
Posts: 23
Joined: 2018/06/10 22:56:42

Re: Can execute SSH directly from Windows CMD into Centos 7, but not the other way around

Post by kix » 2018/08/01 20:36:44

I stated I opened the ports in windows firewall.

Edit: Problem seems to occur in Linux Mint, after explicitly installing ufw and permitting port 22.
Centos 7 w/Gnome | Lenovo Thinkpad X201 ─ i7@2.6GHz, 4GB DDR3, 270 MB/s SSD

Post Reply