Alibaba Cloud server uses FTP to transfer files

Alibaba Cloud server uses FTP to transfer files

1. Update source

I use Ali cloud ECS is Ubuntu18, I see his default update source, it seems, Ali site, but I do not know why not download ftp
Insert picture description here
then simply a matter, once again update source, the first of its backup

sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak  

Then sources.listmodify it to the following

deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse

Use the command to update after the modification

sudo apt-get update

Two, ubuntu18 install FTP service

Then install the FTP service:

sudo apt-get install vsftpd

After the installation is complete, use vi to open /etc/vsftpd.conf for configuration. The command is as follows:

sudo vi /etc/vsftpd.conf 

After opening the vsftpd.conf file, find the following two lines:

local_enable=YES 
write_enable=YES 

Make sure that there is no "#" in front of the above two lines, if there is, cancel it. After completion, as shown in the figure:
Insert picture description here
after modifying vsftpd.conf, save and exit, use the following command to restart the FTP service:

sudo /etc/init.d/vsftpd restart

3. Set up the Alibaba Cloud ECS security group

Because the Alibaba Cloud server has default security group protection, we need to release the ports that FTP needs to use.
Enter the Alibaba Cloud console, click [More]-> [Network and Security Group]-> [Security Group Configuration]
Insert picture description here
and then select [Add Security Group Configuration] to
Insert picture description here
add ports 20 and 21 to the security group, allow access, be sure to save
Insert picture description here

Four, FTP connection

Then we open [FileZilla], click to open the site manager:
Insert picture description here
select [SFTP] protocol, enter Alibaba Cloud ’s public IP address, then the username and password,
Insert picture description here
click [Connect] to connect
Insert picture description here

Published 64 original articles · won praise 13 · views 5640

Guess you like

Origin blog.csdn.net/qq_38113006/article/details/105520125