2

How can I solve the following rkhunter warnings?:

Checking if SSH root access is allowed                   [ Warning ]
Checking if SSH protocol v1 is allowed                   [ Warning ]

and what do they mean?

Please, take into account that I'm a newbie with a fresh installation of openSUSE Leap 15.3 KDE.

0

3 Answers 3

3

Protocol version 1 has been deprecated, so I will answer the other half of this question only.

The root access via SSH can be dangerous, if anywhere else than on a local network, where it actually can be very useful for managing stuff without passwords.

Make sure first, that you had set up your public key, which how-to you can find all over the place or the internet for that matter, so I omit it.


Once you had exchanged your public key with the server you will be connecting to, be sure to just test if password-less SSH login works, and then you may edit with sudo or as superuser the /etc/ssh/sshd_config on the target machine to contain the following:

# allow my public key only, never a password
PubkeyAuthentication    yes
PasswordAuthentication  no
AuthenticationMethods   publickey
PermitRootLogin         prohibit-password

The above will make sure no passwords are to be tried and also root can be accessed via SSH directly.


Now to harden the security if you rented a VPS (virtual private server) someplace you do not have physical access, it is usually wise to disable root access, and use some ordinary sudoer, and changing SSH port or other less known techniques.


Recommended know-how sources to read:

1

It is very simple, edit /etc/ssh/sshd_config with the options:

PermitRootLogin yes
Protocol 1,2

To:

PermitRootLogin no
Protocol 2
0
-2

I have:

#PermitRootLogin prohibit-password
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .