Operating System - Linux
1751701 Members
4905 Online
108781 Solutions
New Discussion юеВ

How to set access from console only

 
Adithyan
Frequent Advisor

How to set access from console only

Hi,

Is there any single configuration file that we can edit and prevent root access only from console in a Linux server?

Keen to learn HP UX
4 REPLIES 4
Adithyan
Frequent Advisor

Re: How to set access from console only

Hi,

There is a mistake in the last post !! its How to restrict root user login from telnet and ssh. Root user should be able to login only from the console.

Pls help.
Keen to learn HP UX
Alexander Chuzhoy
Honored Contributor

Re: How to set access from console only

Edit the file /etc/securetty and remove all lines except starting with tty.


If you only want to disable telnet and ssh - then - for telnet do nothing - it's the default. For ssh - edit the file /etc/ssh/sshd_config and uncomment the line #PermitRootLogin. Make sure it's set to no.
Adithyan
Frequent Advisor

Re: How to set access from console only

Hi Alexander,

Thanks a lot !!
Keen to learn HP UX
Alexander Chuzhoy
Honored Contributor

Re: How to set access from console only

Best way of thanking in this forum is to assign points.
Regards.