Ubuntu下启用telnet服务

编程知识 更新时间:2023-05-02 19:05:32

一、安装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
 * Management:     https://landscape.canonical
 * Support:        https://ubuntu/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
 * Management:     https://landscape.canonical
 * Support:        https://ubuntu/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

更多推荐

Ubuntu下启用telnet服务

本文发布于:2023-04-28 04:35:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/2ed78959ec7c7c01bc49f82f065fbe28.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:Ubuntu   telnet

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!

  • 107664文章数
  • 27233阅读数
  • 0评论数