Solved

How to disable direct root login via ssh

Posted on 2011-09-12
4
627 Views
Last Modified: 2012-05-12
Hi,

for security purpose i want to disable direct root login on a server (redhat).Can you please help me out
0
Comment
Question by:cismoney
  • 2
4 Comments
 
LVL 5

Accepted Solution

by:
Didier Vally earned 167 total points
Comment Utility
0
 
LVL 68

Assisted Solution

by:woolmilkporc
woolmilkporc earned 166 total points
Comment Utility
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
 
LVL 68

Expert Comment

by:woolmilkporc
Comment Utility
... don't forgert to restart sshd to make your changes take effect!

wmp
0
 
LVL 2

Assisted Solution

by:ind_selva
ind_selva earned 167 total points
Comment Utility
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Attention: This article will no longer be maintained. If you have any questions, please feel free to mail me. jgh@FreeBSD.org Please see http://www.freebsd.org/doc/en_US.ISO8859-1/articles/freebsd-update-server/ for the updated article. It is avail…
I promised to write further about my project, and here I am.  First, I needed to setup the Primary Server.  You can read how in this article: Setup FreeBSD Server with full HDD encryption (http://www.experts-exchange.com/OS/Unix/BSD/FreeBSD/A_3660-S…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now