天天看点

15.4 xshell使用xftp传输文件;15.5 使用pure-ftpd搭建ftp服务

扩展:

vsftp使用mysql存放虚拟用户并验证 :

http://www.aminglinux.com/bbs/thread-342-1-1.html

ftp的主动和被动模式 :

http://www.aminglinux.com/bbs/thread-961-1-1.html

 15.4 xshell使用xftp传输文件

下载Xshell的Xftp插件:

快捷键:Ctrl + Alt + F

15.4 xshell使用xftp传输文件;15.5 使用pure-ftpd搭建ftp服务
15.4 xshell使用xftp传输文件;15.5 使用pure-ftpd搭建ftp服务
15.4 xshell使用xftp传输文件;15.5 使用pure-ftpd搭建ftp服务
15.4 xshell使用xftp传输文件;15.5 使用pure-ftpd搭建ftp服务
15.4 xshell使用xftp传输文件;15.5 使用pure-ftpd搭建ftp服务
15.4 xshell使用xftp传输文件;15.5 使用pure-ftpd搭建ftp服务

进邮箱里,点击链接,(ps: 这里是去年操作的了,本次做实验用的本地保存的安装包...)

15.4 xshell使用xftp传输文件;15.5 使用pure-ftpd搭建ftp服务

就可以下载Xftp5.exe这个包!

15.4 xshell使用xftp传输文件;15.5 使用pure-ftpd搭建ftp服务
15.4 xshell使用xftp传输文件;15.5 使用pure-ftpd搭建ftp服务
15.4 xshell使用xftp传输文件;15.5 使用pure-ftpd搭建ftp服务

在Xshell登录状态,快捷键:Ctrl + Alt + F   弹出XFtp

默认状态:左边是Windows系统桌面,右边centos系统用户夹目录

这两个系统,可以互传文件!!!

15.4 xshell使用xftp传输文件;15.5 使用pure-ftpd搭建ftp服务

15.5 使用pure-ftpd搭建ftp服务

1. 安装epel-release和pure-ftpd :

[root@hao-01 ~]# yum install -y epel-release

[root@hao-01 ~]# yum install -y pure-ftpd

2. 编辑pure-ftpd.conf配置文件 :

[root@hao-01 ~]# vim /etc/pure-ftpd/pure-ftpd.conf

找到pureftpd.pdb这行,把行首的#号删掉!

15.4 xshell使用xftp传输文件;15.5 使用pure-ftpd搭建ftp服务
15.4 xshell使用xftp传输文件;15.5 使用pure-ftpd搭建ftp服务

3. 关闭vsftpd服务(下面打开pure-ftpd服务 也需要占用21端口) :

[root@hao-01 ~]# systemctl stop vsftpd

4. 启动pure-ftpd服务 :

[root@hao-01 ~]# systemctl start pure-ftpd

5. 搜索ftp进程是否启动 ?

[root@hao-01 ~]# ps aux |grep ftp

15.4 xshell使用xftp传输文件;15.5 使用pure-ftpd搭建ftp服务

6. 查看pure-ftpd服务端口号 :

[root@hao-01 ~]# netstat -lntp

15.4 xshell使用xftp传输文件;15.5 使用pure-ftpd搭建ftp服务

7. 创建一个测试目录ftp :

[root@hao-01 ~]# mkdir /data/ftp

8. 创建一个普通用户,-u指定uid :

[root@hao-01 ~]# useradd -u 1010 pure-ftp

9. 把测试目录ftp,属主属组改为pure-ftp :

[root@hao-01 ~]# chown -R pure-ftp:pure-ftp /data/ftp

10. 创建虚拟用户,指定映射的系统用户,指定虚拟用户夹目录 :

pure-pw useradd 虚拟用户名 -u 系统用户  -d 虚拟用户夹目录

[root@hao-01 ~]# pure-pw useradd ftp_usera -u pure-ftp  -d /data/ftp

15.4 xshell使用xftp传输文件;15.5 使用pure-ftpd搭建ftp服务

11. 执行命令 :

[root@hao-01 ~]# pure-pw mkdb

12. 在测试目录ftp下,创建一个123.txt测试文件 :

[root@hao-01 ~]# touch /data/ftp/123.txt

13. 用ftp服务@本地ip,并ls查看 :

[root@hao-01 ~]# lftp [email protected]

继续阅读