首先确保 PC能ping通 FTP服务器
服务器端配置
- 打开FTP服务
- 配置FTP用户名密码
客户端使用
sh
> ftp {ftp服务器的IP}
> 输入用户名密码
> put {文件路径}# dir不加盘符直接是从C盘开始定位; 可以使用dir看c盘下有什么文件
> get {文件名}
例如
sh
C:\>ftp 210.31.224.4
Trying to connect...210.31.224.4
Connected to 210.31.224.4
220- Welcome to PT Ftp server
Username:cisco
331- Username ok, need password
Password:
230- Logged in
(passive mode On)
ftp>put sampleFile.txt
Writing file sampleFile.txt to 210.31.224.4:
File transfer in progress...
[Transfer complete - 26 bytes]
26 bytes copied in 0.021 secs (1238 bytes/sec)
ftp>get sampleFile.txt
Reading file sampleFile.txt from 210.31.224.4:
File transfer in progress...
[Transfer complete - 26 bytes]
26 bytes copied in 0.001 secs (26000 bytes/sec)
ftp>