Execute a command using php under ssh2 in php
- by Mervyn
Using Mint terminal my script connects using ssh2_connect and ssh2_auth-password.
When am logged in successfully I want to run a command which will give me the hardware cpu. Is there a way I can use to exec the command in my script then show the results. I have used system and exec for pinging. if i was in the terminal i do the login. then type "get hardware cpu"
in the terminal it would look like this:
Test~ $ get hardware cpu