expect 模拟交互 ftp 上传文件到指定目录下
发布日期:2021-05-10 12:01:26 浏览次数:5 分类:精选文章

本文共 1171 字,大约阅读时间需要 3 分钟。

���������������FTP������������vsftpd���

���������������������������������������������������������������������������FTP������������

������������������vsftpd

������YUM������������������vsftpd���```bashyum -y install vsftpd```

������������������vsftpd���

���������������������vsftpd���������������1. ���������������������������```bashvim /etc/vsftpd/configfile```
  1. ���������������������
  2. anon_upload_enable=YESanon_mkdir_write_enable=YESchown_uploads=YES

    ���������������

    1. ���FTP������������������������������������```bashchmod -R 777 /var/ftp/pub```
    1. ������vsftpd���������
    2. systemctl restart vsftpd
      1. ������������������������SELinux���������
      2. systemctl stop firewalldsetenforce 0

        ������������������FTP���������

        ������YUM������ftp������������������```bashyum -y install ftp```

        ���������������������������������expect���������

        ���������������������```bashyum -y install expect```

        ������������������������������

        #!/usr/bin/expectspawn ftp 192.168.177.246expect "":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

        ���������������������������������������FTP���������������������������������

上一篇:x11 windows 第二章:窗口显示函数说明
下一篇:x window 第10章 events事件

发表评论

最新留言

感谢大佬
[***.8.128.20]2025年04月25日 23时19分36秒