PHP 5.6.24 is released

Installation

Information zur Installation dieser PECL-Extension finden sie im Kapitel Installation von PECL-Extensions. Zusätzliche Informationen wie neue Releases, Downloads, Quelldateien, Maintainerinformation und ein CHANGELOG finden Sie hier: » http://pecl.php.net/package/ssh2.

Eine DLL-Datei für diese PECL-Erweiterung steht derzeit nicht zur Verfügung. Weitere Details finden Sie im Abschnitt zum Kompilieren für Windows.

add a note add a note

User Contributed Notes 11 notes

up
9
dreadwestern at gmail dot com
3 years ago
Steps for installing the extension package on Debian systems:

> sudo apt-get install libssh2-php
> sudo /etc/init.d/apache2 restart
up
9
zizifu at gmail dot com
3 years ago
CentOS 6.2 64bit Installation Steps:

1. download the libssh2 package from http://libssh2.org, command as following:
tar vxzf libssh2-1.4.2.tar.gz
cd libssh2-1.4.2
./configure
make
make install

2. download the php-ssh2 package from http://pecl.php.net/package/ssh2:

tar vxzf ssh2-0.11.3
cd ssh2-0.11.3
phpize
./configure --with-ssh2
make
make install

and the ssh2.so file will copy into /usr/lib64/php/modules
check it.

3. modify the php.ini

vi /etc/php.ini

add the "extension=ssh2.so" to the extension part of php.ini

4. check the environment of php, use phpinfo();

5. enjoy
up
2
francewhoa+php dot net at ubertus dot ca
8 months ago
Steps to install "ssh2" on Debian Jessie 8

1. Using Terminal as Root. Run the following command to install the extension package.

apt-get install php5-ssh2

2. Restart Apache2 server

service apache2 restart
up
1
Ders
2 months ago
Steps for installing the extension package on Ubuntu 14.04.

Very similar to dreadwestern at gmail dot com recipe, but enable ssh2 in PHP:

> sudo apt-get install libssh2-php
>  php5enmod ssh2
> sudo /etc/init.d/apache2 restart
up
1
imedina at grosshat dot com
5 years ago
Using PECL it must be specified the channel, since the beta version has to be choosen instead of stable one:

$ pecl install ssh2 channel://pecl.php.net/ssh2-version
up
0
stanislav dot eckert at vizson dot de
5 months ago
Since version 0.12 (released 2012-10-15) there is a binary version for Windows.

See here: http://pecl.php.net/package/ssh2/0.12/windows

I tested it with PHP 5.5.29 (32-bit, thread-safe) on my Windows 7 machine.
up
0
warkirasep dot puloh at gmail dot com
7 months ago
Installation For Centos 5.11 x86_64

1. Update your repo

wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el5.rf.x86_64.rpm

rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt

rpm -K rpmforge-release-0.5.3-1.el5.rf.*.rpm

rpm -i rpmforge-release-0.5.3-1.el5.rf.*.rpm

2. yum install gcc php-devel php-pear libssh2 libssh2-devel
3. pecl install -f ssh2
4. Enable extension from php.ini configuration

extension=ssh2.so

5. Restart HTTPD

/etc/init.d/httpd restart

6. Chek PHP module

php -m

Good Luck
up
0
sadhooklay AT gmail.com
8 months ago
Installing on Ubuntu 14.0.4

    sudo pecl channel-update pecl.php.net
    sudo apt-get install libssh2-1-dev
    sudo pecl install -a ssh2-0.12
    echo 'extension=ssh2.so' | sudo tee /etc/php5/mods-available/ssh2.ini > /dev/null
    sudo php5enmod ssh2
up
-1
warpman at gmail dot com
1 year ago
Installing this module for use with CentOS 5.?? or 6.?

1. Install your favorite PHP RPM packages.  Make sure that one of your favorite packages is pear, so pecl gets installed in-tow.

2. Find and install *RPMS* of libssh2 of a version >= 1.2, get both the base lib package (libssh2-1.2.*.rpm) and the devel package that includes headers (libssh2-devel-1.2.*.rpm) of the EXACT SAME VERSION.  Finding these packages took a few minutes of googling, and I invite an editor that has a trusted source for these to attach URLs as appropriate. (Yes, the version below is ancient)

# rpm -ivh libssh2-1.2.6-1.el5.rf.x86_64.rpm libssh2-devel-1.2.6-1.el5.rf.x86_64.rpm

3. Install the PHP module via pecl
# pecl install ssh2-0.12

4. Make PHP see the newly-installed extension
# echo "extension=ssh2.so" > /etc/php.d/ssh2.ini

5. Restart apache
up
-3
chris at 3menandarecorder dot com
7 years ago
To help someone avoid the headaches I did for a week. SSH2 functions have problems with the ssh2-beta & libssh2-0.18 even after patching with said patches on the internet.

ssh_exec will work fine
ssh2_shell will not work

In order to use ssh2_shell I had to roll back to libssh2-0.14 in order to get ssh2_shell function to work properly
up
-3
arie dot mail at gmail dot com
7 years ago
Just a little note: when compiling this package after modifying the ssh2.c, do not use pecl build as it will not create an ssh2.so file (although it says it succeeded), use:

phpize
./configure --with-ssh2
make

you then need to copy the ssh2.so file into your extension dir if it didn't do so already.
To Top