Telnet 服务器未启动

Ala*_*anK 9 server telnet

我正在安装 Ubuntu Server 13.10,但无法在服务器上使用 telnet。我已经通过 apt-get 安装了 xinet.d 和 telnetd 并重新启动了 xinetd,但是当我执行netstat -l. 在谷歌搜索中,我看到提到将telnet stream tcp wait telnetd /usr/sbin/tcpd /usr/sbin/in.telnetd行添加到/etc/inetd.conf. 我没有inetd.conf。我看到 inetd 已被弃用,我将线路插入xinetd.conf并重新启动 xinetd 服务,但仍然没有 telnet 侦听。有人可以告诉我 telnet 服务器的正确设置以及它们应该放在哪些文件中。这是我的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

}

includedir /etc/xinetd.d

#:STANDARD: These are standard services.
telnet      stream  tcp nowait  telnetd /usr/sbin/tcpd  /usr/sbin/in.telnetd
Run Code Online (Sandbox Code Playgroud)

谢谢

270*_*974 2

使用命令安装 telnetd 和 xinetd 后

sudo apt-get install xinetd telnetd

创建文件telnet并放入/etc/xinetd.d

sudo nano /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
}
Run Code Online (Sandbox Code Playgroud)

重新启动 xinetd 服务

sudo service xinetd restart

xinetd.conf你有includedir /etc/xinetd.d和不需要线

telnet stream tcp nowait telnetd /usr/sbin/tcpd /usr/sbin/in.telnetd

删除它。

在 telnet 文件中,您可以添加更多选项,例如:

only_from = 192.168.120.0/24 #Only users in 192.168.120.0 can access to
only_from = .bob.com #allow access from bob.com
no_access = 192.168.120.{101,105} #not allow access from the two IP.
Run Code Online (Sandbox Code Playgroud)