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 -

Socket.connect doesn't throw exception in Android -

iphone - How do I keep MDScrollView from truncating my row headers and making my cells look bad? -