How to Disable Telnet access on the server

Telnet sends password in plain text passwords and usernames through logins, and hackers can obtain these passwords easily as compared to SSH. TELNET server listens for incoming messages on port 23, and sends outgoing messages to port 23.

01. Login to your server through SSH as a root user.

02. Open file
#nano /etc/xinetd.d/telnet

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

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

05. Make sure it is turned through chkconfig as well because it can still start through that.
#/sbin/chkconfig telnet off

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

------------------------------------------------------------------------------------------

0 comments: