Problem Installing SSH2

Discussion in 'Install/Configuration' started by bahram0110, Aug 21, 2013.

  1. bahram0110

    bahram0110 Member

    I want to install ssh2
    I use php 5.3.x, lsws (latest), cpanel (latest)
    I was installed it and I can see, ssh2.exec, ssh2.tunnel, ssh2.scp, ssh2.sftp in Registered PHP Streams part of phpinfo()

    But there is not any section like this :

    I was installed ssh2 & libssh2 on another apache server and it work well
    Current error for lsws server is :
    Warning: ssh2_connect() [function.ssh2-connect]: Unable to connect to x.x.x.x on port 22 in /home/user/public_html/ssh.php on line 5
    port 22 is open!

    Attached Files:

  2. NiteWave

    NiteWave Administrator

  3. bahram0110

    bahram0110 Member

    I was compiled libssh2
    Then : was added to php.ini automatically (same php.ini located in phpinfo)

    Final Result:
  4. bahram0110

    bahram0110 Member

    Is it possible to install ssh2 with lsws :)
  5. NiteWave

    NiteWave Administrator

    I'll try on our lab. but will be tomorrow. Sorry for have you wait.
  6. hando

    hando New Member

  7. NiteWave

    NiteWave Administrator

    Sorry for late, succeeded to build ssh2 on lsphp-5.3.27 without surprise.

    I built it in a x86 box. the steps just FYI:
    #yum install libssh2-devel.i386
    #yum install openssl-devel.i386

    following steps same as you:
    only in step 4, I added --with-ssh2
    ./configure --with-ssh2 --with-php-config=/usr/local/lsws/lsphp5/bin/php-config
    however, it may not have any difference

    6.5 add
    to php.ini

    when access phpinfo page, the ssh2 section is there:
    extension version 0.12
    libssh2 version 1.2.9
    banner SSH-2.0-libssh2_1.2.9

Share This Page