Telnet服务器无法启动
我正在安装Ubuntu Server 13.10并且无法在服务器上运行telnet。 我已经通过apt-get和restarted xinetd安装了xinet.d和telnetd,但是当我执行netstat -l
时没有启动任何内容。 在谷歌搜索中,我看到提到添加telnet stream tcp wait telnetd /usr/sbin/tcpd /usr/sbin/in.telnetd
的麻烦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
谢谢
用命令安装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 }
重启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.