Debainlinuxos: Install telnetserver-Debian Technology for Linux release. For details, refer to the following section. Note: This article discusses telnet server rather than telnet client.
The telnet server of debain linux is mounted on xinet. d. The telnet operation is/etc/init. d/xinet. d force-reload | restart | start | stop.
In this article, both debain (2.6.18-4-686) and ubuntu (2.6.20-15-generic) are tested successfully. The installation steps are as follows (ubuntu is used as an example ):
Install internet superserver: xinetd.
Root @ zhoudh-desktop:/# apt-get install xinetd
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
Xinetd
0 upgraded, 1 newly installed, 0 to remove and 166 not upgraded.
Need to get 135kB of archives.
After unpacking into KB of additional disk space will be used.
WARNING: The following packages cannot be authenticated!
Xinetd
Install these packages without verification [y/N]? Y
Get: 1 http://cn.archive.ubuntu.com feisty/main xinetd. 3.14-1ubuntu1 [135kB]
Fetched 135kB in 44 s (3009B/s)
Selecting previusly deselected package xinetd.
(Reading database... 90150 files and directories currently installed .)
Unpacking xinetd (from.../xinetd_1% 3a2. 3.14-1ubuntu1_i386.deb )...
Setting up xinetd (2.3.14-1ubuntu1 )...
Stopping internet superserver: xinetd.
Adding 'diversion of/etc/init. d/inetd to/etc/init. d/inetd. real by xinetd'
Starting internet superserver: xinetd.
Install telnet server
Install software
Root @ zhoudh-desktop:/# 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 166 not upgraded.
Need to get 0B/42.0kB of archives.
After unpacking 147kB of additional disk space will be used.
WARNING: The following packages cannot be authenticated!
Telnetd
Install these packages without verification [y/N]? Y
Selecting previusly deselected package telnetd.
(Reading database... 90170 files and directories currently installed .)
Unpacking telnetd (from.../telnetd_0.17-35ubuntu1_i386.deb )...
Setting up telnetd (0.17-35ubuntu1 )...
After the installation is complete, the system will add a line of information in/etc/inetd. conf:
Telnet stream tcp nowait telnetd/usr/sbin/tcpd/usr/sbin/in. telnetd
Root @ zhoudh-desktop: // # cat/etc/inetd. conftelnet stream tcp nowait telnetd/usr/sbin/tcpd/usr/sbin/in. telnetd
If this row does not exist, add it.
Modify configuration file
Root @ zhoudh-desktop:/# cd/etc/xinetd. d/
Root @ zhoudh-desktop:/etc/xinetd. d # vi telnet
# Default: on
# Description: The telnet server serves telnet sessions; it uses \
# Unencrypted username/password pairs for authentication.
In the online example, nano-w/etc/xinetd. d/telnet is used to create the telnet configuration file, but vi is actually used.
Install telnet client
Root @ zhoudh-desktop:/# apt-get install telnet
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
Telnet
0 upgraded, 1 newly installed, 0 to remove and 166 not upgraded.
Need to get 0B/65.6kB of archives.
After unpacking 188kB of additional disk space will be used.
WARNING: The following packages cannot be authenticated!
Telnet
Install these packages without verification [y/N]? Y
Selecting previusly deselected package telnet.
(Reading database... 90182 files and directories currently installed .)
Unpacking telnet (from.../telnet_0.17-35ubuntu1_i386.deb )...
Setting up telnet (0.17-35ubuntu1 )...
Use telnet to log on to another host
Zhoudh-desktop login: root
Login incorrect
Zhoudh-desktop login: zhoudh
Password:
Last login: Mon Dec 10 16:43:40 2007 from 192.168.200.250 on pts/2
Linux zhoudh-desktop 2.6.20-15-generic #2 SMP Sun Apr 15 07:36:31 UTC 2007 i686
The programs encoded with the Ubuntu system are free software;
The exact distribution terms for each program are described in
Individual files in/usr/share/doc/*/copyright.
Ubuntu comes with absolutely no warranty, to the extent permitted
Applicable law.
Zhoudh @ zhoudh-desktop :~ $
We can see from the above that the connection is successful, but the root connection will fail, because the default security setting limits the root user to use telnet to connect to the host.
Allow root Login
Modify configuration file
Root @ zhoudh-desktop :~ # Vi/etc/pam. d/login
Auth requisite pam_securetty.so
-> # Auth requisite pam_securetty.so
The online example uses nano/etc/pam. d/login.
Log On with root
Ubuntu does not provide root users, so this can only be tested on debain.
Localhost login: root
Password:
Last login: Tue Dec 11 06:10:06 2007 from 192.168.200.250 on pts/0
Linux localhost 2.6.18-4-686 #1 SMP Mon Mar 26 17:17:36 UTC 2007 i686
The programs encoded with the Debian GNU/Linux system are free software;
The exact distribution terms for each program are described in
Individual files in/usr/share/doc/*/copyright.
Debian GNU/Linux comes with absolutely no warranty, to the extent
Permitted by applicable law.
1 failure since last login.
Last was Tue 11 Dec 2007 06:10:37 am est on pts/0.
Localhost :~ #
Of course, it is not recommended to allow root telnet login.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service