You are on page 1of 4

15/8/2017 How to install ssh2 extension for PHP Plesk Help Center

Type your question or error here in English

Plesk Help Center > Technical Articles > Plesk


English (US) Submit a request Sign in

How to install ssh2 extension


for PHP
Applicable to: Plesk 12.5 for Linux
How to install
ssh2 extension
Question for PHP

How to install ssh extension for PHP?


Applicable to:

Plesk 12.5 for Linux


Answer
Created:
Follow
For CentOS only 2016-11-16
13:00:53 UTC
For OS php package:
Modied:

1. Install all missing packages: 2017-08-08


13:08:20 UTC

# yum install make gcc glibc-devel zlib-devel 7


openssl-devel php-devel Was this article
helpful?

2. Compile and install libssh2 libraries:

Have more
# wget https://libssh2.org/download/libssh2-
questions?
1.8.0.tar.gz
Submit aYes
request
# tar vxzf libssh2-1.8.0.tar.gz
No
# cd libssh2-1.8.0/
# ./configure
# make

# make install

https://support.plesk.com/hc/en-us/articles/213930085-How-to-install-ssh2-extension-for-PHP 1/4
15/8/2017 How to install ssh2 extension for PHP Plesk Help Center

3. Compile and install ssh2 extension:

# wget https://pecl.php.net/get/ssh2-0.13.tgz

# tar vxzf ssh2-0.13.tgz


# cd ssh2-0.13
# phpize

# ./configure --with-ssh2
# make
# make install

How to install
4. Add extension to PHP: ssh2 extension
for PHP

# echo "extension=ssh2.so" > /etc/php.d/ssh2.ini


Applicable to:

Plesk 12.5 for Linux


5. Check that it is working:
Created:

# php -m | grep ssh2 2016-11-16


13:00:53 UTC
ssh2
Modied:

2017-08-08
For Plesk php(5.6 as example): 13:08:20 UTC

7
1. Install all missing packages:
Was this article
helpful?
# yum install make gcc glibc-devel zlib-devel
openssl-devel plesk-php56-devel

Have more
2. Compile and install libssh2 libraries(not required if it was previously questions?

done): Submit a request

https://support.plesk.com/hc/en-us/articles/213930085-How-to-install-ssh2-extension-for-PHP 2/4
15/8/2017 How to install ssh2 extension for PHP Plesk Help Center

# wget https://libssh2.org/download/libssh2-
1.8.0.tar.gz
# tar vxzf libssh2-1.8.0.tar.gz
# cd libssh2-1.8.0/

# ./configure
# make
# make install

3. Install ssh2 extension:


How to install
ssh2 extension
# /opt/plesk/php/5.6/bin/pecl install for PHP
https://pecl.php.net/get/ssh2-0.13.tgz

Applicable to:

on 'libssh2 prex? [autodetect] :' leave empty and press enter Plesk 12.5 for Linux

Created:
4. Add extension to PHP:
2016-11-16
13:00:53 UTC
# echo "extension=ssh2.so" >
Modied:
/opt/plesk/php/5.6/etc/php.d/ssh2.ini
2017-08-08
13:08:20 UTC
1. Check that it is working:
7

Was this article

/opt/plesk/php/5.6/bin/ph helpful?

p -m| grep ssh2 Have more


questions?

ssh2 Submit a request

Note : For Plesk PHP 7.0 it is required to download ssh2-1.0.tgz

Was this article helpful? Facebook


Twitter
LinkedIn
Google+
Yes No
7 out of 27 found this helpful

https://support.plesk.com/hc/en-us/articles/213930085-How-to-install-ssh2-extension-for-PHP 3/4
15/8/2017 How to install ssh2 extension for PHP Plesk Help Center

Have more questions? Submit a request

Please sign in to leave a comment.

How to install
ssh2 extension
for PHP

Applicable to:

Plesk 12.5 for Linux

Created:

2016-11-16
13:00:53 UTC

Modied:

2017-08-08
13:08:20 UTC

Was this article


helpful?

Have more
questions?

Submit a request

https://support.plesk.com/hc/en-us/articles/213930085-How-to-install-ssh2-extension-for-PHP 4/4

You might also like