Operating System - HP-UX
1835244 Members
2706 Online
110078 Solutions
New Discussion

Re: Disable root login by telnet or ssh

 
nmendez
New Member

Disable root login by telnet or ssh

Hi, i need to disable the root login by telnet or ssh, not changin configuration of telnet or sshd. Is there any file in hpux that let me do that ?

I only want root to login by a console.

Thanks in advance.
4 REPLIES 4
Court Campbell
Honored Contributor

Re: Disable root login by telnet or ssh

echo console > /etc/securety

then uncomment and edit sshd_config and change the line

#PermitRootLogin yes

to

PermitRootLogin no

and restart sshd.
"The difference between me and you? I will read the man page." and "Respect the hat." and "You could just do a search on ITRC, you don't need to start a thread on a topic that's been answered 100 times already." Oh, and "What. no points???"
Court Campbell
Honored Contributor

Re: Disable root login by telnet or ssh

And there is also the option in sshd_config:

EnforceSecureTTY
"The difference between me and you? I will read the man page." and "Respect the hat." and "You could just do a search on ITRC, you don't need to start a thread on a topic that's been answered 100 times already." Oh, and "What. no points???"
James R. Ferguson
Acclaimed Contributor

Re: Disable root login by telnet or ssh

Hi:

Create '/etc/securetty' and place the word "console" on a line within. This will allow root-login to occur only at the console.

For 'ssh' connections, edit '/etc/ssh/sshd_config' and define 'PermitRootlogin No'.

Regards!

...JRF...

nmendez
New Member

Re: Disable root login by telnet or ssh

thanks a lot..