Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

disable clear text protocols (telnet/ftp)

Featured Replies

Didn't see anyone had posted this. If you install sshd and thus can use ssh/sftp/scp to log in, you might want to turn off the telnet and ftp protocols.

 

This should be able to do the trick. (Can always get in via the console)

 

#!/bin/sh

#

# This turns off telnet and ftp, as scp/ssh/sftp should now be installed.

# Telnet and FTP are _clear_ services, and as such, should not be used.

#

#####################################################################################

 

DATE=`date +%m%d%y`  ##Format is MMDDYY

TIME=`date +%H%M%S`    ##Format is HHMMSS (24 hr)

 

#backup original inetd.conf

cp -rp /etc/inetd.conf /etc/inetd.conf.$DATE.$TIME

 

cat /etc/inetd.conf|while read LINE

do

        if [[ $LINE == ftp* ]] || [[ $LINE == telnet* ]];

        then

                MODIFIER=`echo "$LINE"|awk '{print $1}'`

                echo "$LINE"

                cat /etc/inetd.conf|sed -i "s/^$MODIFIER/\#\#\#$MODIFIER/" /etc/inetd.conf

        fi

done

 

#Find inetd and tell it to re-read its configuration file.

PTK=`ps -ef |grep inet|grep -v grep|awk '{print $2}'`

kill -HUP $PTK

  • 3 years later...

I understood how to copy the file but I was not clear what I need to add to the file to kill Telnet and FTP. Could please let me know what I need to do the edit the file?

 

Thanks

  • Author

I'm not positive what you mean. You take this script and put it into a file, make it executable (chmod 755 <scriptname>), and call it from the "go" file.

 

Example:

/boot/custom/execute_customization.sh

 

Your /etc/inetd.conf file has these lines in it (not next to each other)

 

ftp    stream  tcp    nowait  root    /usr/sbin/tcpd  vsftpd

telnet      stream  tcp    nowait  root    /usr/sbin/tcpd  in.telnetd

 

That script there. If executed puts the # symbol into inetd which "comments out" the lines of code in there that "turn on telnet." (I actually put 3 of them there so we can tell it is this script that did it).

 

The last part of it, find's the Process ID of inetd, and sends a kill -HUP to it.. which is a "restart and reread your configuration" request.  So it re-reads the configuration file, sees that we want telnet/ftp is turned off, and stops listening to those requests.

 

I can send further instructions if the above has not helped.

-Kanth

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.