sudo apt-get install openbsd-inetd
sudo apt-get install xinetd telnetd
sudo vi /etc/inetd.conf
telnet stream tcp nowait telnetd /usr/sbin/tcpd /usr/sbin/in.telnetd
kangruojin@kangruojin:~$ sudo cat /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
kangruojin@kangruojin:~$
kangruojin@kangruojin:~$ cat /etc/xinetd.d/telnet
# default: on
# description: The telnet server serves telnet sessions;it uses
# unencrypted username/password pairs for authentication.
service telnet
{
disable = no
flags = REUSE
socket_type = stream
wait = no
user = root
server = /usr/sbin/in.telnetd
log_on_failure += USERID
}
kangruojin@kangruojin:~$
$sudo service inetd restart
$sudo service xinetd restart
$sudo service networking restart
$sudo reboot #或者重启
SecureCRT设置:Options-->Session Options-->Appearance-->Character encoding:UTF-8
Ubuntu 16.04.6 LTS
kangruojin login: kangruojin
Password:
Last login: Fri Mar 29 21:31:59 CST 2019 from 192.168.80.1 on pts/4
Welcome to Ubuntu 16.04.6 LTS (GNU/Linux 4.15.0-46-generic x86_64)
* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/advantage
21 个可升级软件包。
9 个安全更新。
kangruojin@kangruojin:~$ ls
examples.desktop S3C2440 vmware-tools-patches 公共的 模板 视频 图片 文档 下载 音乐 桌面
kangruojin@kangruojin:~$
kangruojin@kangruojin:~$ netstat -a | grep telnet
tcp 0 0 *:telnet *:* LISTEN
#服务已经启动,处于LISTEN(监听23)状态
tcp 0 2 192.168.80.99:telnet 192.168.80.1:9065 ESTABLISHED
#有telnet客户端连接,处于ESTABLISHED(通信)状态
kangruojin@kangruojin:~$
参考Blog:ubuntu 下安装配置 telnet server服务