Tuesday, February 16, 2010

Enabling FTP and Telnet on Red-hat Clones

Enabling Telnet and FTP Services

To enable the telnet service, login to the server as the root user account and run the following commands:
# chkconfig telnet on
# service xinetd reload
Reloading configuration: [  OK  ]

Vsftp can be started from /etc/init.d/vsftpd as below:

# /etc/init.d/vsftpd start
Starting vsftpd for vsftpd:         [ OK ]
If you want the vsftpd service to start and stop when recycling (rebooting) the machine, you can create the following symbolic links:
# ln -s /etc/init.d/vsftpd /etc/rc3.d/S56vsftpd
# ln -s /etc/init.d/vsftpd /etc/rc4.d/S56vsftpd
# ln -s /etc/init.d/vsftpd /etc/rc5.d/S56vsftpd

Allowing Root Logins to Telnet and FTP Services

Now before getting into the details of how to configure Linux for root logins
BEWARE - Keep in mind that this is VERY BAD for your server security. Make sure that you NEVER configure your production servers to allow root login for FTP/Telnet.

Configure Telnet for root logins

Edit the file /etc/securetty and add the following to the end of the file.

pts/0
pts/1
pts/2
pts/3
pts/4
pts/5
pts/6
pts/7
pts/8
pts/9
This will allow up to 10 telnet sessions to the server as root.
Configure FTP for root logins

Edit the files /etc/vsftpd/ftpusers and /etc/vsftpd/user_list and remove the 'root' line from the files.

Borrowed from http://www.idevelopment.info/data/Unix/Linux/LINUX_TelnetFTPAsRoot.shtml

0 comments: