CentOS allows telnet access through root

Time:2020-7-27

CentOS:

[ root@clovem  ~]#Yum install telnet-server - Y // install telnet server
[ [email protected]  ~]#Cat / etc / xinetd. D / telnet // start telnet hosting service
# default: on
# description: The telnet server serves telnet sessions; it uses \
#unencrypted username/password pairs for authentication.
service telnet
{
flags= REUSE
socket_type= stream
wait= no
user= root
server= /usr/sbin/in.telnetd
log_on_failure+= USERID
Disable = no // change yes to No
}
[ [email protected]  ~]#Service xinetd restart // restart the managed service to make the configuration file take effect

The following actions make the root login effective

[[email protected] ~]# mv /etc/securetty /etc/securetty.bak

In this way, root can enter the Linux host directly. However, this is not recommended. You can also switch to the root user and have the root authority after the ordinary user enters.

Red Hat Enterprise Linux AS release 4

Need to modify: krb5 telnet

[[email protected] ~]# cat /etc/xinetd.d/krb5-telnet
# default: off
# description: The kerberized telnet server accepts normal telnet sessions, \
# but can also use Kerberos 5 authentication.
service telnet
{
flags= REUSE
socket_type= stream
wait= no
user= root
server= /usr/kerberos/sbin/telnetd
log_on_failure+= USERID
disable= no
}

After configuration, restart xinetd service

Solaris: comment the console line of this document, which takes effect directly

-bash-3.00# cat /etc/default/login |grep CONSOLE
# If CONSOLE is set, root can only login on that device.
#CONSOLE=/dev/console