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

I have setup sudo for all users. How do I now disable root ssh and telnet logins?

Thanks
LVL 1
sonriksAsked:
Who is Participating?
 
wesly_chenCommented:
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
 
hangeles1Commented:
open your ssh config file with your favorite editor

add
PermitRootLogin no

restart the ssh daemon

drink soda
0
 
wesly_chenCommented:
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
 
sonriksAuthor Commented:
Thanks,What about HP and Linux? It's a mixed environment.
0
 
sonriksAuthor Commented:
thanks for all the options! I'll give it a try.
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.