ubuntu 24.04 安装telnet服务

1.安装telnet客户端

$sudo apt-get install telnet

2.安装telnet服务器

$sudo apt-get instlal telnetd

3.安装网络守护进程服务程序来管理telnet服务

$sudo apt-get install xinetd

4.修改配置文件inetd.conf

$sudo vi /etc/inetd.conf
telnet stream tcp nowait telnetd /usr/sbin/tcpd/ /usr/sbin/in.telnetd
telnet stream tcp nowait root   /usr/sibn/tcpd/ /usr/sbin/in.telnetd

5.修改配置文件xinetd.conf

vi /etc/xinetd.conf
# Simple configuration file for xinetd
#
# Some defaults, and include /etc/xinetd.d/

defaults
{

# Please note that you need a log_type line to be able to use log_on_success
# and log_on_failure. The default is the following :
# log_type = SYSLOG daemon info
instances = 60
log_type = SYSLOG authpriv
log_on_success = HOST PID
log_on_failure = HOST
cps = 25 30

}

includedir /etc/xinetd.d

6.修改/etc/xinetd.d/telnet配置文件,注意server = /usr/sbin/telnetd,不是。in.telnetd

vi /etc/xinetd.d/telnet
service telnet
{
        disable = no
        flags = REUSE
        socket_type = stream
        wait = no
        user = root
        server = /usr/sbin/telnetd
        log_on_failure += USERID
}

7.开启服务

$sudo /etc/init.d/xinetd restart

8.查看服务,显示服务器正在监听

 netstat -a |grep telnet
tcp6       0      0 [::]:telnet             [::]:*                  LISTEN     

9.尝试连接本机,输入用户名、密码后连接成功

$ telnet localhost
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.

Linux 6.8.0-38-generic (ernest-laptop) (pts/11)

ernest-laptop 用户名: tjjingpan
密码: 
Welcome to Ubuntu 24.04 LTS (GNU/Linux 6.8.0-38-generic x86_64)

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

扩展安全维护(ESM)Applications 未启用。

55 更新可以立即应用。
要查看这些附加更新,请运行:apt list --upgradable

启用 ESM Apps 来获取未来的额外安全更新
请参见 https://ubuntu.com/esm 或者运行: sudo pro status

tjjingpan@ernest-laptop:~$ 

相关推荐

  1. ubuntu 24.04 安装telnet服务

    2024-07-13 15:22:03       22 阅读
  2. Ubuntu2204安装小熊猫C++/DevCpp

    2024-07-13 15:22:03       72 阅读
  3. ubuntu2204,mysql8.x安装

    2024-07-13 15:22:03       54 阅读
  4. ubuntu2004,自动安装mysql5.7.37

    2024-07-13 15:22:03       32 阅读
  5. mac安装telnet命令

    2024-07-13 15:22:03       31 阅读
  6. Ubuntu2204配置samba

    2024-07-13 15:22:03       69 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-07-13 15:22:03       67 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-07-13 15:22:03       72 阅读
  3. 在Django里面运行非项目文件

    2024-07-13 15:22:03       58 阅读
  4. Python语言-面向对象

    2024-07-13 15:22:03       69 阅读

热门阅读

  1. 【Docker Install SQL Server】

    2024-07-13 15:22:03       18 阅读
  2. 在鸿蒙开发中如何实现主题切换?

    2024-07-13 15:22:03       23 阅读
  3. oracle分区使用

    2024-07-13 15:22:03       23 阅读
  4. Nginx 自定义模块实现之权限控制模块

    2024-07-13 15:22:03       24 阅读
  5. 子组件向父组件传参的方式

    2024-07-13 15:22:03       18 阅读