为什么 telnet 会报告“login: -h for super-user only.”?

为什么 telnet 会报告“login: -h for super-user only.”?

我无法 telnet 到 localhost 。

[root@localhost ~]# telnet localhost
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
Red Hat Enterprise Linux Server release 5.5 (Tikanga)
Kernel 2.6.18-194.el5PAE on an i686
login: -h for super-user only.
Connection closed by foreign host.


[root@localhost ~]# su - admin
[admin@localhost ~]$ telnet localhost
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
Red Hat Enterprise Linux Server release 5.5 (Tikanga)
Kernel 2.6.18-194.el5PAE on an i686
login: -h for super-user only.
Connection closed by foreign host.
[admin@localhost ~]$

解决方案可能是什么?

答案1

2011 年,正确的解决方案是不要使用 telnet。 切换到SSH反而:使能够sshd,然后运行ssh 127.0.0.1


远程控制系统上的守护进程配置错误:它应该以 root 身份启动。

编辑您的inetd配置文件。对于xinetd,添加user = roottelnet服务定义;与经典inetd,用户是中的第 5 个字段/etc/inetd.conf。完成后,pkill -HUP -f inetd

答案2

解决方法是添加以下行到xinetd.conf

user=root

然后重新启动 xinetd 服务。

相关内容