0

Hey there here i am trying to run a php code to connect with SSH and i am using phpseclib but i am facing a very frustrating situation here.

$connection_string = ssh2_connect('xyz', 22);
Hasan Hashmi
  • 71
  • 2
  • 6
  • Does this answer your question? [Call to undefined function ssh2\_connect()](https://stackoverflow.com/questions/18979144/call-to-undefined-function-ssh2-connect) – neubert Mar 12 '20 at 13:22

1 Answers1

0

Check the documentation and try commands below:

1. sudo apt install php-pear
2. sudo pecl channel-update pecl.php.net
3. sudo sudo apt install phpуourversion-dev
4. sudo pecl install ssh2 

Hope help you.

Dmitry Leiko
  • 3,970
  • 3
  • 25
  • 42