ubuntu 16.04中打开telnet服务步骤
1.安装openbsd-inetd
xxxx@ubuntu:/etc$ sudo apt-get install openbsd-inetd
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
openbsd-inetd
0 upgraded, 1 newly installed, 0 to remove and 227 not upgraded.
Need to get 27.7 kB of archives.
After this operation, 86.0 kB of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com/ubuntu xenial/main i386 openbsd-inetd i386 0.20140418-2 [27.7 kB]
37% [1 openbsd-inetd 12.7 kB/27.7 kB 46%]
37% [1 openbsd-inetd 12.7 kB/27.7 kB 46%]
37% [1 openbsd-inetd 12.7 kB/27.7 kB 46%]
Get:1 http://us.archive.ubuntu.com/ubuntu xenial/main i386 openbsd-inetd i386 0.20140418-2 [27.7 kB]
Fetched 15.0 kB in 2min 31s (98 B/s)
Selecting previously unselected package openbsd-inetd.
(Reading database ... 172416 files and directories currently installed.)
Preparing to unpack .../openbsd-inetd_0.20140418-2_i386.deb ...
Unpacking openbsd-inetd (0.20140418-2) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for ureadahead (0.100.0-19) ...
Processing triggers for systemd (229-4ubuntu4) ...
Setting up openbsd-inetd (0.20140418-2) ...
Processing triggers for ureadahead (0.100.0-19) ...
Processing triggers for systemd (229-4ubuntu4) ...
2、安装telnetd
xxxx@ubuntu:/etc$ sudo apt-get install telnetd
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
telnetd
0 upgraded, 1 newly installed, 0 to remove and 227 not upgraded.
Need to get 38.0 kB of archives.
After this operation, 136 kB of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com/ubuntu xenial/universe i386 telnetd i386 0.17-40 [38.0 kB]
Get:1 http://us.archive.ubuntu.com/ubuntu xenial/universe i386 telnetd i386 0.17-40 [38.0 kB]
Get:1 http://us.archive.ubuntu.com/ubuntu xenial/universe i386 telnetd i386 0.17-40 [38.0 kB]
Get:1 http://us.archive.ubuntu.com/ubuntu xenial/universe i386 telnetd i386 0.17-40 [38.0 kB]
Get:1 http://us.archive.ubuntu.com/ubuntu xenial/universe i386 telnetd i386 0.17-40 [38.0 kB]
Get:1 http://us.archive.ubuntu.com/ubuntu xenial/universe i386 telnetd i386 0.17-40 [38.0 kB]
Fetched 5,033 B in 12min 38s (6 B/s)
Selecting previously unselected package telnetd.
(Reading database ... 172425 files and directories currently installed.)
Preparing to unpack .../telnetd_0.17-40_i386.deb ...
Unpacking telnetd (0.17-40) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up telnetd (0.17-40) ...
Adding user telnetd to group utmp
xxxx@ubuntu:/etc$ cat /etc/inetd.conf |grep telnet
telnet stream tcp nowait telnetd /usr/sbin/tcpd /usr/sbin/in.telnetd
3、重启openbsd-inetd
xxxx@ubuntu:/etc$ sudo apt-get install telnetd
[sudo] password for xxxx:
Reading package lists... Done
Building dependency tree
Reading state information... Done
telnetd is already the newest version (0.17-40).
0 upgraded, 0 newly installed, 0 to remove and 227 not upgraded.
4、查看telnet运行状态
sudo apt install samba-common-bin
xxxx@ubuntu:/etc$ netstat -a |grep telnet
tcp 0 0 *:telnet *:* LISTEN