Page 1 of 1

Can not ssh via VPN

Posted: 2021/01/28 18:28:43
by Igor2003
Hi guys,

I have just installed 7.8.2003 and trying to figure out how to allow ssh connection via VPN (putty)
I can connect locally from my network
Let's say my network is and my VPN is
I have played with hosts.allow allowing ssh: ALL, etc... no success

What makes me really frustrated is that I managed to connect several times and then I got "connection refused" again
Moreover, rarely I get ssh "connection refused" even when I'm connecting from local network

I've wasted 4 hours on this today, pls help... sounds like routing issue. BTW, I stopped firewalld so it is not a firewall issue

Re: Can not ssh via VPN

Posted: 2021/01/28 18:48:39
by TrevorH
First of all, 7.8 is out of date and has been since the release of 7.9 nearly 4 months ago. You should yum update to get to 7.9.2009 ASAP.

The description of the problem sounds most like a duplicate ip address on your local network so you are not connecting (randomly) to the machine you think you are. By default, firewalld is used as the firewall on CentOS 7 and it comes preconfigured to allow ssh on port 22 from anywhere. The ssh daemon is likewise configured to allow connections from anywhere using any authentication mechanism.

As far as I know, hosts.allow etc are not used in CentOS 7 though I may be misremembering that and it might only have come in with 8.

Re: Can not ssh via VPN

Posted: 2021/01/28 19:03:58
by Igor2003
Dear Trevor

First of all, you were absolutely right. It was an IP conflict. Thank you so much for the input!
I have also updated the server to 7.9.2009
Thanks a lot!