Enable FTP and telnet services under CentOS6.x

Source: Internet
Author: User

Enable FTP and telnet services under CentOS6.x

Activate CentOS6's FTP service first. Learn about the telnet service. After CentOS is installed, you must set the Ftp and Telnet service files to start the Ftp and Telnet services. You can enable the services through remote control.

Two types of FTP are available: gssftp and vsftpd. After checking, it is said that vsftpd is more stable and secure. Use vsftpd.

What is vsftpd?
Vsftpd is the most popular FTP server program in the Linux release. Features: small, light, secure, and easy to use.

The name of vsftpd stands for "very secure FTP daemon". Security is one of the top concerns of Chris Evans, its developer. At the beginning of the FTP server design and development, high security is a goal.
First, check if vsftpd is installed.

rpm -q vsftpd

If it is not installed, install it first.

yum -y install vsftpd

Enable vsftpd ftp at startup

chkconfig vsftpd on

Start vsftpd

service vsftpd start

Manage vsftpd commands:

Stop vsftpd:

service vsftpd stop

Restart vsftpd:

service vsftpd restart

Configure the vsftpd Server

vi /etc/vsftpd/vsftpd.conf

Set the following three lines

#chroot_list_enable=YES # (default follows) #chroot_list_file=/etc/vsftpd/chroot_list

Change

chroot_list_enable=YES # (default follows) chroot_list_file=/etc/vsftpd/chroot_list

Use adduser to add ftpuser and use-d to specify the directory. See adduser for the display usage.

useradd -d /home/wwwroot/ -g ftp ftpuser

Set a user's password with passwd

passwd ftpuser

Restart vsftpd

service vsftpd restart

Activate the telnet Service

rpm -q xinetd yum -y install xinetd chkconfig xinetd on service xinetd start

In this way, telnet is enabled.

Configure Firewall
If the access still fails after the above settings, it is likely that the firewall screen is out. Configure the firewall again

Vi/etc/sysconfig/iptables # Open the/etc/sysconfig/iptables file and add the following code
-A RH-Firewall-1-INPUT-m state -- state NEW-m tcp-p tcp -- dport 21-j ACCEPT # A RH-Firewall-1-INPUT-m state of port ftp21. -- state NEW-m tcp-p tcp -- dport 23-j ACCEPT # telnet23

Port restart iptables

service iptables restart

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.