?
Solved

need to disable root login (ssh and telnet) to unix servers

Posted on 2011-04-22
5
Medium Priority
?
897 Views
Last Modified: 2012-05-11
I have setup sudo for all users. How do I now disable root ssh and telnet logins?

Thanks
0
Comment
Question by:sonriks
  • 2
  • 2
5 Comments
 
LVL 1

Expert Comment

by:hangeles1
ID: 35451152
open your ssh config file with your favorite editor

add
PermitRootLogin no

restart the ssh daemon

drink soda
0
 
LVL 38

Expert Comment

by:wesly_chen
ID: 35451292
If you use Solaris, then eidt /etc/default/login
 and uncomment out the following line as follows:
---------
# If CONSOLE is set, root can only login on that device.
# Comment this line out to allow remote login by root.

CONSOLE=/dev/console
---------
0
 
LVL 1

Author Comment

by:sonriks
ID: 35451315
Thanks,What about HP and Linux? It's a mixed environment.
0
 
LVL 38

Accepted Solution

by:
wesly_chen earned 2000 total points
ID: 35451345
Linux, by default, you can not telnet as root.
(make sure your/etc/securetty doesn't not content pts)

For HP-UX, simply create a file called /etc/securetty (perm=440) and put the line
console
in it. That would ONLY allow root login from the console.

For ssh, you can do hangeles1's method for all Unix/Linux platform.
0
 
LVL 1

Author Closing Comment

by:sonriks
ID: 35453347
thanks for all the options! I'll give it a try.
0

Featured Post

Become an Android App Developer

Ready to kick start your career in 2018? Learn how to build an Android app in January’s Course of the Month and open the door to new opportunities.

Question has a verified solution.

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

Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
Users of Windows 10 Professional can disable automatic reboots using the policy editor. This tool is not included in the Windows home edition. But don't worry! Follow the instructions below to install (a Win7) policy editor on your Windows 10 Home e…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.
Suggested Courses

579 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