telnet协议的不好之处是,它发送的报文是未加密,很可能被黑客通过监听的手段分析你的隐私和秘密,所以最好选择SSH协议(报文加密)远程登录。
好言归正传我们来说一下怎么配置ubuntu root用户能远程登录telnet。
1.启用root
默认ubuntu的超级管理员用户(root)是被禁止掉了的,我首先得启用它。
默认ubuntu的超级管理员用户(root)是被禁止掉了的,我首先得启用它。
输入命令:sudo su root输入当前用户密码即可切换到root,然后输入命令: passwd,输入root密码,修改成功。
2.安装telnet服务
输入命令:sudo apt-get install xinetd telnetd
3.启用telnet服务
在 /etc/inetd.d文件夹下创建telnet文件,内容如下:
# default: off
# description: Telnet service which is the interface of remote access.
# This is the tcp version.I omited the UDP's.
service telnet
{
socket_type = stream
protocol = tcp
wait = no
user = root
server = /usr/sbin/in.telnetd
disable = no
}
4.允许root用户telnet登录
有两种方法:
(1)输入命令:mv /etc/securetty /etc/securetty.bak
(2)修改/etc/pam.d/login这个文件。只需将下面一行注释一下即可。
#auth required lib/security/pam_securetty.so
2.安装telnet服务
输入命令:sudo apt-get install xinetd telnetd
3.启用telnet服务
在 /etc/inetd.d文件夹下创建telnet文件,内容如下:
# default: off
# description: Telnet service which is the interface of remote access.
# This is the tcp version.I omited the UDP's.
service telnet
{
socket_type = stream
protocol = tcp
wait = no
user = root
server = /usr/sbin/in.telnetd
disable = no
}
4.允许root用户telnet登录
有两种方法:
(1)输入命令:mv /etc/securetty /etc/securetty.bak
(2)修改/etc/pam.d/login这个文件。只需将下面一行注释一下即可。
#auth required lib/security/pam_securetty.so