This Howtos posted under: Linux | Total Visitors Till Now: 175

How to Set Up A Telnet Server

Setting up the telnet server is easy to do, but the procedure differs between Linux distributions.

Redhat / Fedora

To set up a Telnet server use the chkconfig command to activate Telnet.

[root@bigboy tmp]# chkconfig telnet on

You can also use the chkconfig --list command to verify that telnet will be started on the next reboot.

[root@bigboy tmp]# chkconfig --list | grep telnet
       telnet: on
[root@bigboy tmp]#

Use the chkconfig command to deactivate telnet, even after the next reboot.

[root@bigboy tmp]# chkconfig telnet off

Debian / Ubuntu

In Debian / Ubuntu, the Telnet server runs using the inetd, not the xinetd daemon, and uses a single /etc/inetd.conf configuration to manage the activation of the daemons it controls.

To stop Telnet you need only to edit the configuration file, comment out the Telnet server line, and restart inetd as seen in this example:

root@u-bigboy:~# vi /etc/inetd.conf 
# File: /etc/inetd.conf # #telnet stream tcp nowait telnetd.telnetd /usr/sbin/tcpd /usr/sbin/in.telnetd root@u-bigboy:~# /etc/init.d/inetd restart
 * Restarting internet superserver...
   ...done.
root@u-bigboy:~# netstat -a | grep telnet
root@u-bigboy:~#

Note: The xinetd package provides much more flexibility than its inetd equivalent. xinetd allows you to restrict connections to specific source IP addresses and allows you to specify the TCP port and server IP address on which to listen. You may want to convert your system to use the xinetd package for Telnet by installing xinetd and creating your own custom /etc/xinetd.d/telnet configuration file. The rest of the examples in this chapter assume that the more versatilexinetd is being used.

Note: You can test whether the Telnet process is running with the following command which is used to check the TCP/UDP ports on which your server is listening, if it isn’t running then there will be no response.

[root@bigboy tmp]# netstat -a | grep telnet
tcp        0        0        *:telnet        *:*        LISTEN
[root@bigboy tmp]#

Editor  Posted by Editor on February 20, 2009 at 11:41 pm

Be the first to comment - What do you think?  Tags:

Coolsearchinfo - A free Social Bookmarking Site

Liked this article? To continue getting our latest free Howtos and Tutorials,
you can also grab the RSS feed or Subscribe to Techgurulive by Email

Not Getting