Solved

How to disable direct root login via ssh

Posted on 2011-09-12
4
628 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
ID: 36521628
0
 
LVL 68

Assisted Solution

by:woolmilkporc
woolmilkporc earned 166 total points
ID: 36521629
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
ID: 36521632
... 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
ID: 36521883
0

Featured Post

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
Fine Tune your automatic Updates for Ubuntu / Debian
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

912 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

20 Experts available now in Live!

Get 1:1 Help Now