How to execute an SSH Command in a BASH Shell Script by way of a PHP program?
I am interested in having someone or as many technicians as possible to assist me,
or provide me with an understanding of how PHP processes an SSH commandssh username@hostname "ssh-script"
,
for remote access, embedded in a Bash Shell Script.
Initially I made many attempts to use PHP's ssh2_command()
My thinking is that perhaps SSH2 is not configured properly on my MAC OS X server.
I based my configuration on what I researched via the internet
- http://hi开发者_如何学Gonts.macworld.com/article.php?story=20010527220633471,
- http://www.3thirty.net/blog/?p=52
which appeared to install properly. Unfortunately, even with the good instruction, SSH2 does not work for me.
Any assistance will be appreciated.
You could try phpseclib, a pure PHP SSH implementation
精彩评论