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. Link to comment https://forums.phpfreaks.com/topic/210083-parsing-passwd-in-php/ 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 Link to comment https://forums.phpfreaks.com/topic/210083-parsing-passwd-in-php/#findComment-1096517 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.