Answer the question
In order to leave comments, you need to log in
Using SSH in php - how to send commands correctly?
$connection = ssh2_connect($srvip, 22);
if(ssh2_auth_password($connection, $slogin, $passwd)) {
$stream = ssh2_exec($connection, "wget -P /var/www/КИРИЛЛИЦА.РУ https://zip.org/zip.zip; ");
stream_set_blocking($stream, true);
$stream_out = ssh2_fetch_stream($stream, SSH2_STREAM_STDIO);
$rl = stream_get_contents($stream_out);
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question