Need help with expect script
Hello,
I'm trying to test expect script which i have written. I'm using a ssh session connect. Below is my script: #!/usr/bin/expect -f spawn ssh "domain\username"@localhost expect "?assword:" send "$PWD\r" expect "$" send "date\r" expect "$" send "exit\r" When i execute this script, I'm getting an output like this: extra characters after close-quote while executing "spawn ssh "domain\username"@localhost expect "?assword:" send "$PWD\r" expect "$" send "date\r" send "e..." Can someone help me out... Thanks |
I usually use autoexpect. Try it maybe.
Do those commands work correctly from shell? Some ideas on a quite similar question. http://stackoverflow.com/questions/4...to-ssh-command |
All times are GMT -5. The time now is 07:58 PM. |