2020.1.23 CentOS 7配置vsftpd

购买了阿里云的云虚拟ECS后,要在CentOS7上配置ftp环境,选择安装vsftpd

1. 安装vsftpd

查看vsftpd是否安装,如果有残留文件记得全部删除

rpm -q vsftpd
whereis vsftpd

安装vsftpd,检查安装

sudo yum install -y vsftpd
whereis vsftpd

启动vsftpd服务

sudo systemctl start vsftpd

2. 配置vsftpd

  1. 设置开机启动,并且检查开机启动项目中是否已经有了vsftpd
systemctl enable vsftpd
systemctl list-unit-files | grep vsftpd
  1. 关闭匿名用户登录,设置使用root用户登录
  • 打开 /etc/vsftpd/vsftpd.conf文件,修改如下内容
anonymous_enable=NO
  • 打开 /etc/vsftpd/ftpusers,把root注释掉
  • 打开 /etc/vsftpd/user_list,把root注释掉
  1. 重启vsftpd服务
systemctl restart vsftpd
systemctl status vsftpd

配置完成后可以使用xshell等工具,以root用户登录到 /目录下

3. xshell6报错:服务器发回了不可路由的地址。使用服务器地址代替

在这里插入图片描述
解决方法:
在这里插入图片描述
参考:https://www.cnblogs.com/wsyjlly/p/9573808.html

发布了145 篇原创文章 · 获赞 21 · 访问量 3万+

猜你喜欢

转载自blog.csdn.net/weixin_43826242/article/details/104075871
今日推荐