I have written the following program for automating scp command in perl.
#!/usr/bin/expect
spawn scp hscpe@9.126.134.54:/home/hscpe/output.txt imt
set pass "jujsa32s"
expect {
password: {send "$pass\r"; exp_continue
}
But the file transfer is not happening. Normally on console if I tried the same scp command its working fine. Can anyone figure out the problem
Thanks in advance!!..
use Net::OpenSSH: