V
V
Vasya Pupkin2017-03-27 23:38:50
PHP
Vasya Pupkin, 2017-03-27 23:38:50

What is the easiest way to execute sh on a remote server via php?

The PHP script only accepts IP and PASS to connect via ssh.
The script also generates a sh file.
How to connect via ssh, upload a .sh file to a remote server and execute it?
The response from the script should return to the php script.
Is it also possible to run a multi-line script via ssh without downloading a file?
those. line by line to read the file is not an option, I think.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
developer007, 2017-03-28
@vasi_pupkin

php.net/manual/en/function.ssh2-scp-send.php

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question