How To Configure The Telnet Server On Linux
How To Configure The Telnet Server On Linux
Telnet, or more precisely the Telnet protocol, offers the possibility of establishing a session of
terminal over TCP/IP. This document presents the installation and configuration of a server
Telnet.
INSTALLATION :
The Telnet service consists of two packages:
The Telnet client (telnet-0.17-23.rpm);
The Telnet server (telnet-server-0.17-23.rpm)
The verification of the presence and installation of these packages is done using the
rpm command.
Example of verification:
[root@pc root]# rpm -qa|grep telnet
telnet-0.17-23
telnet-server-0.17-23
The installation is also done using the rpm command.
Example of Telnet server installation:
[root@pc root]# rpm -i telnet-server-0.17-23
ACTIVATE AND START THE TELNET SERVICE:
The Telnet service is controlled via the xinetd service. By default, the Telnet service is
disabled.
To activate it, you need to edit the file /etc/xinetd.d/telnet and set: disable=no.
Example of file /etc/xinetd.d/telnet:
telnet service
{
REUSE
stream
no
root,user1
server = /usr/sbin/in.telnetd
log_on_failure += USERID
no
port =23
}
Then you need to restart the xinetd service:
[root@pc root]# service xinetd restart
Stopping xinetd: [ OK ]
Starting xinetd: [ OK ]
It is also possible to activate the Telnet server using the redhat-config-service utilities.
ntsysv
and chkconfig.
Telnet can be started in two modes: input mode and command mode.
Switching from one mode to another is done by pressing the key combination Ctrl +
to
starting Telnet. When the host computer is indicated, the program proceeds
automatically in input mode. Telnet can be started with the parameters
following:
telnet [-d] [-a] [-n file] [-e char] [[-l user] host [port]]
Parameter Function
-d Starting debug mode.
Telnet tries to establish an automatic connection by attempting to transmit
-a the USER environment variable to the contacted host computer, in order to
simplify the login process.
Telnet records trace information in the specified file, for
-n
allow for further debugging.
This parameter allows you to replace the default escape character (Ctrl
-e + [) by the designated character. If this character is not valid, Telnet continues to
function without escape character.
-l Telnet connects as a user, under the specified name.
The host parameter is the name or Internet address of the contacted computer. If the
the port parameter is specified, Telnet communicates through this port. This parameter is
rarely used. The default port (23/tcp) is defined in the /etc/services file. During the
Starting Telnet, if the target computer name is not specified, the program
starts in command mode. The Telnet prompt is displayed, and the list of commands
appears in response to the command ?.