#!/usr/bin/expect set timeout -1 spawn scp -r ssh@192.168.20.240:/root/*.txt /mnt/d/work/Smartlogic/UCP2.0/ucp4008_nr_integrated_small_cell/driver/rfic/ expect { "password" {send "111111\r"} } expect eof