ftp使用(本地centos搭配云服务器)
目录
安装ftp客户端和服务器端
本地centos 6
配置ftp服务器
设置防火墙命令
service iptables status //查看防火墙状态
service iptables stop //关闭防火墙
service iptables start //开启防火墙
service iptables restart //重启防火墙
防火墙处于开启状态,只开启了22端口。
设置防火墙开启21端口(ftp命令端口)
切换目录:cd /etc/sysconfig
打开文件:vi iptables
设置防火墙开启高端端口
重启操作系统看刚才的配置是否生效:
ok!
关闭selinux( Linux 的一个安全子系统)
vsftpd服务
ftp命令
操作命令
本地客户端操作命令:
切换目录:lcd xxx
其他命令使用前加一个 !
服务器端命令正常操作。
本地连远程
登录ftp服务器:
本地虚拟机登录远程服务器上的ftp服务器
本地下载服务器上的文件:
结果:
本地上传文件到服务器:
结果:
退出ftp:
远程连本地
本地做服务器端,开启ftp服务器
查看本地IP地址
云服务器做ftp客户端连接本地ftp服务器端