ChrisMartino Posted August 7, 2010 Share Posted August 7, 2010 Hey there thanks again for your time reading this thread!. So here's my issue, I have a include I found on the internet that is very handy for sending commands to a machine if the host doesn't have SSH2 installed, now my problem is that I haven't got a clue how to parse passwd due to the fact that it's a prompt on the console, here's the include that I use: http://phpseclib.sourceforge.net And a example of how I run a command: $ssh = new Net_SSH2('www.domain.tld'); if (!$ssh->login('username', 'password')) { exit('Login Failed'); } $ssh->exec('adduser HelloWorld'); echo $ssh->exec('uptime'); But how would I run passwd?, thanks for your time. Quote Link to comment Share on other sites More sharing options...
trq Posted August 8, 2010 Share Posted August 8, 2010 Take a look at the Expect extension. http://php.net/expect Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.