SSH to the server and get result (PHP) !
i'm make ssh conneting to my server using "ssh2_connect" function. now i need to execute command and get the return result and echo in the result in the php. "ssh2_connect" is working perfect but i don't know how to execute and get results from the command using this connection. please can you help me to do this. here is my code part for the ssh connectin.
Code (text):
<?php
$connection = ssh2_connect(‘www.example.com’, 22);
if (ssh2_auth_password($connection, ‘root’, ‘samplepassword’)) {
echo…
SSH to the server and get result (PHP) !
See original post by Shyamin Ayesh
Leave a Reply
You must be logged in to post a comment.