How to disable direct root login via ssh

Hi,

for security purpose i want to disable direct root login on a server (redhat).Can you please help me out
Williams225System AdministatorAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
Didier VallyConnect With a Mentor Systems Engineer and Finance AnalystCommented:
0
 
woolmilkporcConnect With a Mentor Commented:
Add to /etc/ssh/sshd_config

PermitRootLogin   no

Other options to PermitRootLogin

are "yes" (self-explanatory),  "without-password" (login via public key only) and "forced-commands-only'' (no interactive shell, only commands).

wmp
0
 
woolmilkporcCommented:
... don't forgert to restart sshd to make your changes take effect!

wmp
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.