How to Disable Telnet

Telnet sends clear text passwords and usernames through logins and should be disabled on all web servers and replaced with SSH.


Some hosting providers are not disabling telnet by default but you should ensure that it has been turned off as it’s a great security risk to your servers. TELNET server listens for incoming messages on port 23, and sends outgoing messages to port 23.

1. Login to your server through SSH and su to root.

2. Type pico /etc/xinetd.d/telnet

3. Look for the line: disable = no and replace with disable = yes

4. Now restart the inetd service: /etc/rc.d/init.d/xinetd restart

5. Turn off it through chkconfig as well because it can still start through that.
/sbin/chkconfig telnet off

6. Scan your server to ensure port 23 is closed.
nmap -sT -O localhost
Also run ps -aux | grep telnet and if you find anything other than “grep telnet” as?result kill the process.

Facebook Comments

More Stuff

How to Install VMware Workstation Pro 14 on Linux Systems This tutorial will show you how to install VMware Workstation Pro 14 on RHEL/CentOS 7, Fedora 22-27, Debian 7-9, Ubuntu 18.04-14.14 and Linux Mint 17-...
HBO Disappears From Dish as Monopoly Concerns Mount When AT&T announced plans to acquire HBO's parent company Time Warner, competitors, consumer groups, and the Department of Justice argued that the...
How to Save a File in Vi / Vim Editor in Linux It is true that learning Vi/Vim – a well-known text editor in the Linux ecosystem, is not as easy as learning Nano or Emacs, as it requires a little e...
How to Install LEMP (Linux, Nginx, MariaDB, PHP-FPM) on Debian 9 S... Since Debian powers a large percentage of web servers all over the world, in this article we will explain how to install the LEMP (Linux + Nginx + Mar...
Spread the love