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

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

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
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

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

How to block USB Storage Devices

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

To block USB Storage devices on your system do the following:

1. Most Linux distros have a module called usb-storage.

2. On my system I located it to


3. Open the /etc/modprobe.d/blacklist and add the entry

blacklist usb-storage

4. Restart the machine.

5. Usb storage devices will be blocked upon restarting the machine.

6. If you still face issues enter the following line at the bottom of the /etc/modprobe.conf file.

install usb-storage /bin/true

The above method can be used to block any module from loading in an OS