Some will try to use a webserver/php to open ssh connections to the servers without using a ssh client.

At this point you need Openssl, libssh2 installed on the server and of course ssh2 php module.

The only issue is that the latest ssh2 module is in Beta only and most of the time it will be impossible to install it using PECL or PEAR so the only way to do it will be using the tarball.

The latest tarball has also an issue as it may not compile correctly ending in a make: *** [ssh2.lo] Error 1 error . This is because of the tarball actually and there is a patch for it but the easiest way to get over this will be the next fix:

1. Extract the files from the tarball
2. Edit ssh2.c and look for :
#if LIBSSH2_APINO < 200412301450
3. Change the line to look like:
#if LIBSSH2_VERSION_NUM < 0x001000
4. Save and run phpize && ./configure --with-ssh2 && make from within the directory .

I will try to post a full how-to on the full installation this days.

Support my Blog please!
  • Share/Bookmark
3 Responses to “Installing ssh2 module in php – make: *** [ssh2.lo] Error 1”
  1. Ken CNo Gravatar says:

    – using php4…builds OK…but gives error when Apache is restarted because Apache PHP version is 5
    PHP Api Version: 20020918
    Zend Module Api No: 20020429
    Zend Extension Api No: 20050606

    – using php5
    ie sudo /usr/local/php5/bin/phpize && ./configure –with-ssh2 –with-php-config=/usr/local/php5/bin/php-config && make
    PHP Api Version: 20041225
    Zend Module Api No: 20060613
    Zend Extension Api No: 220060519

    build fails:
    libtool: link: `ssh2.lo’ is not a valid libtool object
    make: *** [ssh2.la] Error 1

  2. Florian NNo Gravatar says:

    That error when using PHP5 may be because of the parallel make.

    Try and run the commands one by one or induce make -j1 instead of make at the end.

  3. WestwoudNo Gravatar says:

    I had problems getting the ssh2 module installed, as well. Thankfully, it doesn’t really matter if you can or not as phpseclib, a pure php ssh implementation works quite nicely.

  4.  
Leave a Reply


Comment spam protected by SpamBam


Clicky Web Analytics