Can not ssh via VPN

Issues related to configuring your network
Post Reply
Posts: 5
Joined: 2021/01/28 18:17:16

Can not ssh via VPN

Post by Igor2003 » 2021/01/28 18:28:43

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

User avatar
Forum Moderator
Posts: 30559
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Can not ssh via VPN

Post by TrevorH » 2021/01/28 18:48:39

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.
CentOS 6 died in November 2020 - migrate to a new version!
Info for USB installs on
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke

Posts: 5
Joined: 2021/01/28 18:17:16

Re: Can not ssh via VPN

Post by Igor2003 » 2021/01/28 19:03:58

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!

Post Reply

Return to “CentOS 7 - Networking Support”