Execute a command using php under ssh2 in php
Posted
by
Mervyn
on Stack Overflow
See other posts from Stack Overflow
or by Mervyn
Published on 2012-11-15T14:54:21Z
Indexed on
2012/11/16
11:01 UTC
Read the original article
Hit count: 171
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
© Stack Overflow or respective owner