Unable to secure SSH

Support for security such as Firewalls and securing linux
easyprosys
Posts: 16
Joined: 2012/03/25 09:36:51

Unable to secure SSH

Postby easyprosys » 2015/03/08 09:05:17

After a hacking I have attempted to secure SSH and limit it to specific IPs. I have followed the instructions here:

http://centoshelp.org/security/securing-sshd/

I have added sshd: ALL to hosts.deny and I have added sshd: xxx.xxx.xxx.xxx to hosts.allow and then restarted sshd. Staying logged in as instructed I switched to a wireless card and was still able to login.

I am using v5.4 and openssh is current. This is a virtual server inside of Virtuozzo.

Any suggestions would be appreciated.

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

Re: Unable to secure SSH

Postby TrevorH » 2015/03/08 12:50:04

There is a contradiction here: your openssh cannot possibly be current if you are using 5.4. CentOS 5.4 was released in November 2009 and 5.5 was released in March 2010 at which point 5.4 became an unsupported deprecated release which received no more updates. If you are really running 5.4 then you are 5 years out of date. The current CentOS 5 is 5.11.
CentOS 5 died in March 2017 - migrate NOW!
Full time Geek, part time moderator. Use the FAQ Luke

gerald_clark
Posts: 10642
Joined: 2005/08/05 15:19:54
Location: Northern Illinois, USA

Re: Unable to secure SSH

Postby gerald_clark » 2015/03/08 17:17:11

1. You are not running CentOS.
2.You can't secure a virtuozzo system, because you have no control over the kernel.
3. You cannot secure a system once it has been hacked.

You need to a fresh install of a new real CentOS server,

easyprosys
Posts: 16
Joined: 2012/03/25 09:36:51

Re: Unable to secure SSH

Postby easyprosys » 2015/03/08 20:11:31

Good information but yes, I am running Centos.

Any suggestions on why blocking SSH isn't working? Telling me that I am not running Centos or that it is actually more out dated than thought does not answer the question.

gerald_clark
Posts: 10642
Joined: 2005/08/05 15:19:54
Location: Northern Illinois, USA

Re: Unable to secure SSH

Postby gerald_clark » 2015/03/08 21:12:47

No, you are NOT running CentOS. You are running a non CentOS kernel which you cannot update.
Since you have been hacked, your problem cannot be resolved.
Install from scratch a real, up-to-date CentOS.