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

.htaccess - First slash is removed after domain when entering a webpage in the browser -

Socket.connect doesn't throw exception in Android -

SPSS keyboard combination alters encoding -