• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1123
  • Last Modified:

Cron Deamon email alerts - Warning: The SSH configuration option 'PermitRootLogin' has not been set. The default value may be 'yes', to allow root access.

I have a Cron Deamon email alerts that says the following below. How do I fix this.


[ Rootkit Hunter version 1.3.8 ]

Checking rkhunter data files...
  Checking file mirrors.dat                                  [ No update ]
  Checking file programs_bad.dat                             [ No update ]
  Checking file backdoorports.dat                            [ No update ]
  Checking file suspscan.dat                                 [ No update ]
  Checking file i18n/cn                                      [ No update ]
  Checking file i18n/de                                      [ No update ]
  Checking file i18n/en                                      [ No update ]
  Checking file i18n/zh                                      [ No update ]
  Checking file i18n/zh.utf8                                 [ No update ]
[ Rootkit Hunter version 1.3.8 ]
File updated: searched for 164 files, found 141
Warning: The SSH configuration option 'PermitRootLogin' has not been set.
         The default value may be 'yes', to allow root access.
Warning: Hidden directory found: /dev/.udev
Warning: Hidden file found: /etc/.logrotate.conf.swp: data
Warning: Hidden file found: /usr/bin/.ssh.hmac: ASCII text
Warning: Hidden file found: /usr/bin/.fipscheck.hmac: ASCII text
Warning: Hidden file found: /usr/sbin/.sshd.hmac: ASCII text
0
sobeservices2
Asked:
sobeservices2
  • 3
  • 2
  • 2
5 Solutions
 
woolmilkporcCommented:
Hi,

seems that you have a Rootkit Hunter script which would check several security relevant parameters.

Your sshd_config file does not contain the parameter PermitRootLogin. Since the default is "Yes" this is obviously considered a security issue.

You will have to decide whether your'e further going to permit root login via ssh or not.

If you want to forbid it just add "PermitRootLogin no" to sshd config.

If you must allow root to login via ssh you will have to live with that message, or maybe you could configure the Rootkit Hunter progran to ignore this parameter.
Since I don't know this program I will not be able to help you with this without some googling.

wmp
0
 
sobeservices2Author Commented:
Yes I need root to be able to login via ssh?

Humm maybe I can find something hope to get some post here
0
 
woolmilkporcCommented:
Please look at /etc/rkhunter.conf

There is a setting

ALLOW_SSH_ROOT_USER=no

Change it to "yes" and the message will no longer appear.

wmp
0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
t-maxCommented:
If you need your system to be more secure, you should add the line:
PermitRootLogin no

Open in new window

To the file /etc/ssh/sshd_config

This line means that you can't log through ssh using the user "root". This avoid for example a brute force attack on it.
To use "root" with the option above, you need to ssh to the computer with a regular user, and then you need to write "su -" to get the root identity and privileges.

If you don't care about security much (eg: because it's an internal network), then add the same line but with "yes" instead. This should avoid the message you get from rkhunter.

Whatever you decide, after changing /etc/ssh/sshd_config, you need to restart the sshd service. Do that with "/etc/init.d/sshd restart".
0
 
sobeservices2Author Commented:
Ok cool

So I could ssh into my server as a regular user the just type in su and I become root?

How can I make a regular user?
I have cpanel on my server?
0
 
t-maxCommented:
Of course, you just do "su -" (or just "su" if you want to keep your environment variables) and that "upgrades" your normal user to root.
I'm not sure which system you have, but there's usually a script called "useradd" or "adduser" which does exactly that. Put "--help" at the end to get details on how to use it, or try with "man useradd". I'm sorry but can't help you with cPanel.
0
 
woolmilkporcCommented:
In most cases you're not allowed to have more than one cPanel account.

But if you really have "root" access (not "admin" or the like) and if you can open a shell (command line) it should be possible.

If you need this user only to avoild using ssh as root just issue:

useradd -g users sobeservices2

passwd sobeservices2
- type a new password when prompted (twice)

You will be requested to change the password when first logging in as sobeservices2

Don't forget to change /etc/ssh/sshd_config ("PermitRootLogin no") and to restart sshd.

wmp
0

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

  • 3
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now