配置FTP进行文件操作
启动FTP服务器,在AR1上ftp命令连接FTP服务器。
<AR1>ftp 10.0.2.1 Trying 10.0.2.1 ... Press CTRL+K to abort Connected to 10.0.2.1. 220 FtpServerTry FtpD for free User(10.0.2.1:(none)):ftp 331 Password required for ftp . Enter password: 230 User ftp logged in , proceed [AR1-ftp]
[AR1-ftp]dir 200 Port command okay. 150 Opening ASCII NO-PRINT mode data connection for ls -l. 226 Transfer finished successfully. Data connection closed. FTP: 0 byte(s) received in 0.090 second(s) 0.00byte(s)/sec. [AR1-ftp]ls 200 Port command okay. 150 Opening ASCII NO-PRINT mode data connection for ls -l. 226 Transfer finished successfully. Data connection closed. FTP: 0 byte(s) received in 0.060 second(s) 0.00byte(s)/sec. [AR1-ftp]
AR1配置FTPserver
ftp server enable local-user ftp password cipher %$%$i3p1$d{/t%QW<NR63~r6};$i%$%$ local-user ftp privilege level 15 local-user ftp ftp-directory flash: local-user ftp service-type ftp
配置完成后,本地生成test-user.txt,并设置用户信息并配置服务器地址10.0.1.254,用户名:ftp,密码:huawei,然后点击登录
登录成功后可在“本地文件列表”选择文件test-user.txt,并点击向右箭头传送到服务器,可观察到上传文件成功
<AR1>ftp 10.0.2.1Trying 10.0.2.1 ...
Press CTRL+K to abortConnected to 10.0.2.1.220 FtpServerTry FtpD for free User(10.0.2.1:(none)):ftp331 Password required for ftp .Enter password:230 User ftp logged in , proceed
[AR1-ftp]