服务端下载vsftpd
1.服务端下载vsftpd
1 |
|
2.配置vsftpd
1 2 3 |
|
3 重启vsftpd 关闭防火墙和selinux 修改权限
1 2 |
|
4.客户端下载ftp
1 |
|
5.在客户端写脚本
注意:用expect写脚本需要下载 expect
1 |
|
#!/usr/bin/expect
spawn ftp 192.168.177.246
expect ":root):"
send "anonymous\r"
expect "Password:"
send "\r"
expect "ftp >"
send "cd pub\r"
expect "ftp >"
send "put /tmp/yum.log a.log\r"
interact