Chaining SSH commands via PHP -


i running ssh2 command via php , trying chain commands answer password prompts bash script run.

wget url-to-bash-script bash name-of-file.sh 

after prompt for

mysql password: 

and:

retype password: 

it proceed install packages lamp

i have tried no luck;

$ssh->exec( "wget url;bash installlamp.sh; password; password");

thanks!

what might want use expect

here examples on how use it:

http://www.thegeekstuff.com/2010/10/expect-examples/


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -