scp批量操作脚本 host.list scp.sh hosts.sh yum -y install expect 使用的时候只需要编辑hosts.list文件格式如下: 指定远程主机ip、用户名、密码,如: 172.18.85.175 root 123456 172.18.85.176 root 234123 使用方法: sh /root/scp.sh /root/host.list /etc/hosts /etc/