文章目录
- debian12 - install and config telnet
- 概述
- 笔记
- 配置文件
- END
debian12 - install and config telnet
概述
前面实验,在xinetd中指定telnet服务,查看状态时,看到telnet服务bind失败。
直接从其他计算机来连telnet又是正常的,说明telnet服务已经启动起来了。
想确定一下,telnet服务是谁启动的。
笔记
实验环境 - 配置好的原装debian12。
sudo apt-get remove xinetd
sudo apt-get remove telnet
sudo apt-get remove telnetd-ssl
sudo apt-get update
sudo apt-get install telnet
sudo apt-get install telnetd-ssl
sudo systemctl status inetd
可以确定,inetd服务就是在安装完telnetd-ssl之后被启动的。
不用再安装xinetd了,怪不得装了xinetd之后,看telnet服务状态,说telnet服务bind失败,但是服务已经可用了。
此时,在win10中,用telnet连接debian12的IP, 输入用户名和口令后,是可以正常连接的。
telnet 192.168.236.133
telnet显示中文乱码需要使用UTF8语言,或者GB2312
export LANG=en_US.UTF-8
虽然不乱码了,汉字也不能正常显示,
配置文件
# 根据查询服务时的提示,看inetd帮助
man inetd
# 配置文件位置
/etc/inetd.conf
配置文件内容如下:
lostspeed@debian12d4x64:~$ more inetd.conf
# /etc/inetd.conf: see inetd(8) for further informations.
#
# Internet superserver configuration database
#
#
# Lines starting with "#:LABEL:" or "#<off>#" should not
# be changed unless you know what you are doing!
#
# If you want to disable an entry so it isn't touched during
# package updates just comment it out with a single '#' character.
#
# Packages should modify this file by using update-inetd(8)
#
# <service_name> <sock_type> <proto> <flags> <user> <server_path> <args>
#
#:INTERNAL: Internal services
#echo stream tcp nowait root internal
#discard stream tcp nowait root internal
#discard dgram udp wait root internal
#daytime stream tcp nowait root internal
#time stream tcp nowait root internal
#chargen stream tcp nowait root internal
#:STANDARD: These are standard services.
telnet stream tcp nowait telnetd-ssl /usr/sbin/tcpd /usr/sbin/in.telnetd
#:BSD: Shell, login, exec and talk are BSD protocols.
#:MAIL: Mail, news and uucp services.
#:INFO: Info services
#:BOOT: TFTP service is provided primarily for booting. Most sites
# run this only on machines acting as "boot servers."
#:RPC: RPC based services
#:HAM-RADIO: amateur-radio services
#:OTHER: Other services