欢迎来到尧图网

客户服务 关于我们

您的位置:首页 > 财经 > 创投人物 > ubuntu 24.04 安装telnet服务

ubuntu 24.04 安装telnet服务

2024/10/24 9:23:57 来源:https://blog.csdn.net/tjjingpan/article/details/140380787  浏览:    关键词: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 = noflags = REUSEsocket_type = streamwait = nouser = rootserver = /usr/sbin/telnetdlog_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 statustjjingpan@ernest-laptop:~$ 

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com