[Use ftp21 port to connect to Huawei Cloud Linux server]
HUAWEI CLOUD server uses ftp21 port to connect
Explanation: When we operate the linux server, we often want to operate files visually, and it is not friendly to use the command line alone. This article aims to use ftp tools to visually connect to Huawei cloud servers
1. Install vsfftpd
1.1 Check if vsfftpd is installed
Execute the following command, you can see that there is only port 22, but not 21
[root@sjc-cce-6tnyj ~]#netstat -tunlp
1.2 Install vsftpd
[root@sjc-cce-6tnyj ~]# yum install vsftpd -y
1.3 Start vsftpd service
[root@sjc-cce-6tnyj ~]#systemctl start vsftpd
1.4 Confirm that the vsftpd service is started
Re-execute the command of 1.1, you can see port 22 and port 21, if you see 21, it means the startup is successful
[root@sjc-cce-6tnyj ~]#netstat -tunlp
1.5 Set the vsftpd service to start at boot
[root@sjc-cce-6tnyj ~]#chkconfig vsftpd on
2. Let go of ftp user restrictions and solve the problem of user login failure
2.1 Open vsfftpd user login, first enter the /etc/vsftpd directory
[root@sjc-cce-6tnyj ~]# cd /etc/vsftpd
[root@sjc-cce-6tnyj vsftpd]# ls
2.2 Modify ftpusers, remove root from blacklist
[root@sjc-cce-6tnyj vsftpd] #Change vim ftpusers
the first line to , that is, remove it from the blacklist and allow the root user to log in. Press “ESC” after the modification is completed, save the keyboard input and exit.root
# root
:wq
2.3 Modify userlist, remove root from blacklist
[root@sjc-cce-6tnyj vsftpd] #Change user_list
the first line to , that is, remove it from the blacklist and allow the root user to log in. Press “ESC” after the modification is completed, save the keyboard input and exit.root
# root
:wq
2.4 Restart the vsftpd service
[root@sjc-cce-6tnyj vsftpd]# service vsftpd restart
3. The ftp login is successful, but it prompts that the file cannot be opened
ftp connection properties, on the "Options" page, uncheck the "Use passive mode"