Telnet Server Configuration and Commands in Linux

Telnet


Telnet protocol allows you to connect to remote hosts over TCP/IP network (such as the Internet). Using telnet client software on your computer, you can make a connection to a telnet server (i.e., the remote host). Once your telnet client establishes a connection to the remote host, your client becomes a virtual terminal, allowing you to communicate with the remote host from your computer. In most cases, you'll need to log into the remote host, which requires that you have an account on that system or public without having an account.

Telnet by default does not encrypt any data sent over the connection.


Command to connect telnet server

telnet host port

Port Number

Telnet default port no 23

RPM required for Telnet

RPM are required to configure telnet server in Linux.

xinetd

telnet or (telnet-server and telnet-clinet)

Configuration file and Installation steps

Configuration file

/etc/xinetd.d/telnet

If you do not have the telnet-server or telnet packages installed, you can install them with the RPMs available from your installation media or internet, or install using yum.

Installation Steps


Step 1: Install telnet server

[root@ server ~#] yum install telnet*


Step 2: Enable telnet

Enable telnet by changing disable = no in config file.

[root@server ~#] vi /etc/xinetd.d/telnet

Ensure that disable = yes is changed to read disable = no

disable= no


Step 3: Start telnet service

start/restart telnet service

[root@server ~#] service telnet restart

Add telnet service to start-up 

[root@server ~#] chkconfig telnet on


Step 4: Start xinetd service

start/restart xinetd service

[root@server ~#] service xinetd restart


Add xinetd service to start-up 

[root@server ~#] chkconfig xinetd on


Step 5: Connect using telnet

Connecting to telnet Server whose ip is 192.168.20.205 at port 9081 using client system

[root@client ~#] telnet 192.168.20.205 9081

Trying 192.168.20.205...

Connected to 192.168.20.205 (192.168.20.205).

Escape character is '^]'.

^]

telnet> quit

Connection closed.



No comments: