Sunday, March 29, 2009

How to configure telnet server on your Linux box

(system used here is a Cent OS 5.2 system with kernel 2.6.18-92.1.22.el5)

1. Install telnet server on your system.

2. Yum install telnet-server
this will install
[root@localhost ~]# rpm -qa | grep telnet
telnet-0.17-39.el5
telnet-server-0.17-39.el5

3. [root@localhost ~]# rpm -qa | grep xinetd
xinetd-2.3.14-10.el5

4. service xinetd start
chkconfig xinetd on

5. goto /etc/xinetd.d/telnet
change the ‘disable=yes’ to ‘disable=no’

6. restart the xinetd daemon.

7. Run ‘telnet localhost’ on the Linux machine and if it runs successfully showing the login prompt,

run the following at command prompt on a windows machine.

8. telnet 192.168.5.231
this will take you to a login prompt provided the telnet port, 23 is open on the Linux machine firewall.

9. By default root user will be disabled telnet access. It is strongly discouraged to login as root user using telnet as you will send the root password in plain text over the network. Even logging in as a normal user and ‘su –‘ is not recommended. Use ssh to login as root user.

10. Goto /etc/securetty and add lines at the bottom
pts/0
pts/1
pts/2

11. This will allow 3 root user sessions on the server.

No comments: