Execute a command using expect
I am new to Linux and LQ.
Well lets get into the business.
ssh user@remotehost ls /home/user
It produces the list of files on remotehost.Fine.
But I need to automise this using expect.
Well I have tried a bit as below
set timeout -1
spawn ssh user@remotehost ls /home/user
send -- "password\r"
Script runs fine,but I am unable to get the expected O/P.
Please Guide me.
Last edited by visu_kvg; 08-05-2009 at 10:00 AM.