|
Use autoexpect
# autoexpect <return>
#scp/ssh xxx@xx <return>
#password:*****
#ctrl d
it will automatically generate script.exp in the current directory and u can call that script from shell script.
Basically autoexpect logs key strokes and generates the script.
Hope this helps
|