Networking - TELNET

Telnet Client and Telnet Server work together to allow users to communicate with a remote computer.

Telnet Client allows users to connect to a remote computer and interact with that computer through a terminal window.

Telnet Server allows users of Telnet Client to log on to the computer running Telnet Server and run character-mode applications on that computer. The Telnet server acts as a gateway through which the Telnet clients communicate with each other.

In Redhat linux, we need two rpms to install,

[root@www RPMS]# rpm -ivh telnet-server-0.17-28.i386.rpm

warning: telnet-server-0.17-28.i386.rpm: V3 DSA signature: NOKEY, key ID 4f2a6fd2

Preparing... ########################################### [100%]

1:telnet-server ########################################### [100%]

ð This rpm is for server side.

[root@www RPMS]# rpm -ivh telnet-0.17-28.i386.rpm

warning: telnet-0.17-28.i386.rpm: V3 DSA signature: NOKEY, key ID 4f2a6fd2

Preparing... ########################################### [100%]

1:telnet ########################################### [100%]

ð This rpm is for client side.

The main configuration file of telnet is "telnet" and it is in "/etc/xinetd.d" directory.

root@www RPMS]# vi /etc/xinetd.d/telnet

# default: on

# description: The telnet server serves telnet sessions; it uses \

# unencrypted username/password pairs for authentication.

service telnet

{

flags = REUSE

socket_type = stream

wait = no

user = root

server = /usr/sbin/in.telnetd

log_on_failure += USERID

disable = yes

}

ð In the file, we should change the option as "Disable" equal "no" to give the permission to the clients to access telnet. Such that “Disable = no”.

Now initiate or restart the xinetd service because telnet is controlled by xinetd,

[root@www xinetd.d]# service xinetd restart

Stopping xinetd: [ OK ]

Starting xinetd: [ OK ]

The telnet command is used to communicate with another host using the TELNET protocol. If telnet is invoked without the host argument, it enters command mode, indicated by its prompt (telnet>). In this mode, it accepts and executes the commands listed below. If it is invoked with arguments, it performs an open command with those arguments. Syntax,

telnet

Example,

[root@www root]# telnet 192.168.10.4

or

[root@www root]# telnet mail.home.com

Trying 192.168.10.4...

Connected to mail.home.com.

Escape character is '^]'.

Fedora Core release 2 (Tettnang)

Kernel 2.6.5-1.358 on an i586

login: sumon

Password:

Last login: Mon Jun 27 14:55:58 from mail.home.com

telnet >

ð After given the login name and password, it opens telnet command prompt. Now we can use the commands (ls, rm, cp, mv etc) to access remote system.

telnet > exit

Connection closed by foreign host.

ð To logout from remote system we can use exit command.