A
A
alx19872017-03-08 07:29:01
PHP
alx1987, 2017-03-08 07:29:01

Why does ssh2_exec(): Unable to request command execution occur?

Hello, does anyone know what could be the problem.
In php, I connect to a remote server via ssh2 and try to send a command to write text to a file to it.

cat <<EOF > /test
$TEXT
EOF

The number of characters in the $TEXT variable is approximately 38000. An error occurs:
Warning: ssh2_exec (): Unable to request command execution on remote host in ...
With a smaller number of characters, the error disappears and it records everything well. The approximate number of characters at which the recording passes is 34000, if in Cyrillic, then 20000
====
Filled the text with zeros, the exact value that it successfully passes through the echo $data > $file command is 34691, the final file weighs 34692, if you add another 0, then everything, immediately an error.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
alx1987, 2017-03-09
@alx1987

I found information, it turns out to be the libssh2 library limit on the size of the package, which cannot be changed in any way.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question