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