Ubuntu下启用telnet服务

一、安装openbsd-inetd软件包。

sudo apt-get install openbsd-inetd -y

二、安装telnetd服务。

sudo apt-get install telnetd -y

三、查看运行状态。

sudo netstat -a | grep telnet

ms@ubuntu:~$ sudo netstat -a | grep telnet
tcp        0      0 0.0.0.0:telnet          0.0.0.0:*               LISTEN     
tcp        0      0 ubuntu:telnet           198.168.1.201:56007     ESTABLISHED

四、本机登录与远程登录测试。

s@ubuntu:~$ telnet 127.0.0.1
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
Ubuntu 20.04.1 LTS
ubuntu login: ms
Password: 
Welcome to Ubuntu 20.04.1 LTS (GNU/Linux 5.4.0-52-generic x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

0 updates can be installed immediately.
0 of these updates are security updates.

Your Hardware Enablement Stack (HWE) is supported until April 2025.
Last login: Sat Oct 31 21:42:02 CST 2020 from localhost on pts/3
ms@ubuntu:~$ 
Ubuntu 20.04.1 LTS
ubuntu login: ms
Password:
Welcome to Ubuntu 20.04.1 LTS (GNU/Linux 5.4.0-52-generic x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

0 updates can be installed immediately.
0 of these updates are security updates.

Your Hardware Enablement Stack (HWE) is supported until April 2025.

The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.

-bash: warning: setlocale: LC_ALL: cannot change locale (zh_CN.UTF-8)

五、若登录失败,重启openbsd-inetd服务或系统。

sudo /etc/init.d/openbsd-inetd restart

ms@ubuntu:~$ sudo /etc/init.d/openbsd-inetd restart
Restarting openbsd-inetd (via systemctl): openbsd-inetd.service.
ms@ubuntu:~$ 
sudo reboot

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

寞水

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值