自动scp(ssh信任外的另一种方法) 2014/11/23 15287 #!/usr/bin/expect set password yanfa set host 10.8.210.5 spawn scp index.html yanfa@$host:/home/yanfa/ expect "*password:" send "$password\r" expect eof.