L
L
likel0vsky2021-10-17 09:37:36
PHP
likel0vsky, 2021-10-17 09:37:36

How to connect to Localhost via phpseclib?

Good afternoon
I am writing a site in PHP, I needed to connect from PHP to SSH and execute the command, but the connection is not performed:

include "phpseclib/Net/SSH2.php";
$ssh = new SSH2('localhost', 22);


No error, just 500 internal server error in the request
What can I do?

(Using phpseclib 3 library )

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Karabanov, 2021-10-17
@likel0vsky

It is necessary to read the PHP log - it will be written there because of what the error occurs. I can assume that there is no module for SSH.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question