Telnet 在 Ubuntu 20.04 上不起作用

Telnet 在 Ubuntu 20.04 上不起作用

我希望 Ubuntu 作为远程服务器,为此我安装了 telnetd:

ngadre@in01-7h4wrf3:~/Documents/release6.6.1/caos$ sudo apt install telnetd -y
[sudo] password for ngadre:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
  gir1.2-goa-1.0
Use 'sudo apt autoremove' to remove it.
The following NEW packages will be installed:
  telnetd
0 upgraded, 1 newly installed, 0 to remove and 162 not upgraded.
Need to get 38.8 kB of archives.
After this operation, 114 kB of additional disk space will be used.
Get:1 http://in.archive.ubuntu.com/ubuntu focal/universe amd64 telnetd amd64 0.17-41.2build1 [38.8 kB]
Fetched 38.8 kB in 1s (48.4 kB/s)
Selecting previously unselected package telnetd.
(Reading database ... 227457 files and directories currently installed.)
Preparing to unpack .../telnetd_0.17-41.2build1_amd64.deb ...
Unpacking telnetd (0.17-41.2build1) ...
Setting up telnetd (0.17-41.2build1) ...
Adding user telnetd to group utmp
Note: xinetd currently is not fully supported by update-inetd.
Please consult /usr/share/doc/xinetd/README.Debian and itox(8).
update-inetd: warning: cannot add service, /etc/inetd.conf does not exist
Processing triggers for man-db (2.9.1-1) ...


ngadre@in01-7h4wrf3:~/Documents/release6.6.1/caos$ ps aux | grep inet
root         110  0.0  0.0      0     0 ?        I<   Apr06   0:00 [inet_frag_wq]
root     3444843  0.0  0.0   7936  2160 ?        Ss   18:00   0:00 /usr/sbin/xinetd -pidfile /run/xinetd.pid -stayalive -inetd_compat -inetd_ipv6

netstat -plnt  shows that tcp6:23 port is listening but tcp v4 telnet is not listening.
ngadre@in01-7h4wrf3:~/Documents/release6.6.1/caos$ sudo netstat -plnt
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN      3338537/cupsd
tcp        0      0 0.0.0.0:5938            0.0.0.0:*               LISTEN      4202/teamviewerd
tcp        0      0 127.0.0.1:5939          0.0.0.0:*               LISTEN      4202/teamviewerd
tcp        0      0 127.0.0.1:6015          0.0.0.0:*               LISTEN      3443323/sshd: ngadr
tcp        0      0 127.0.0.1:6010          0.0.0.0:*               LISTEN      3444365/sshd: ngadr
tcp        0      0 127.0.0.53:53           0.0.0.0:*               LISTEN      2747323/systemd-res
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      1001058/sshd: /usr/
tcp6       0      0 ::1:6015                :::*                    LISTEN      3443323/sshd: ngadr
tcp6       0      0 ::1:6010                :::*                    LISTEN      3444365/sshd: ngadr
tcp6       0      0 :::5938                 :::*                    LISTEN      4202/teamviewerd
tcp6       0      0 ::1:631                 :::*                    LISTEN      3338537/cupsd
tcp6       0      0 :::23                   :::*                    LISTEN      3446333/xinetd
tcp6       0      0 :::22                   :::*                    LISTEN      1001058/sshd: /usr/


connecting to telnet using "telnet 192.168.0.10" fails:
ngadre@in01-7h4wrf3:~/Documents/release6.6.1/caos$ telnet 192.168.0.10
Trying 192.168.0.10...
Connected to 192.168.0.10.
Escape character is '^]'.
Connection closed by foreign host.

如何为 ipv4 启用 telnet?

防火墙已禁用,并且我在 iptables 中看不到任何 DROP/DENY 规则。

我的xinetd.conf如下:

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_on_success = HOST PID
log_on_failure = HOST
cps = 25 30
}

includedir /etc/xinetd.d

相关内容