libssh2 library is used to secured remote connection which provide  resource shell, remote exec, file transfer using a secure cryptographic transport.

Download :

Need to download the ssh2 packages with support version using wget command (wget link)

#   wget http://pecl.php.net/get/ssh2-0.11.3.tgz

Extarct the package,
 
# tar -xf ssh2-0.11.3.tgz

# cd ssh2-0.11.3/

Installation:

Configure the php-ssh2 with your xampp package,
 
# /opt/lampp/bin/phpize

Configuring for:
PHP Api Version:         20121113
Zend Module Api No:      20121212
Zend Extension Api No:   220121212

Note : If you may getting error like,
 
# ./configure  --with-php-config=/opt/lampp/bin/php-config

#  make

#  make install
Installing shared extensions:     /opt/lampp/lib/php/extensions/no-debug-non-zts-20121212/


The installation once has been completed to verify the ssh2.so module,
 
# cd /opt/lampp/lib/php/extensions/no-debug-non-zts-20121212/

# ls -al ssh*
-rwxr-xr-x 1 root root 203823 Sep  6 12:34 ssh2.so 

Be ensure the ssh2.so file extension to be added in your php.ini file,
 
# vi /opt/lampp/etc/php.ini
extension="ssh2.so"

Restart XAMPP:
 
# /opt/lampp/lampp restart

Verify the modoule with below command,
 
# /opt/lampp/bin/php -i | grep ssh2

Registered PHP Streams => https, ftps, compress.zlib, compress.bzip2, php, file, glob, data, http, ftp, phar, zip, ssh2.shell, ssh2.exec, ssh2.tunnel, ssh2.scp,
ssh2.sftp
ssh2
libssh2 version => 1.4.3
banner => SSH-2.0-libssh2_1.4.3
OLDPWD => /root/ssh2-0.11.3
_SERVER["OLDPWD"] => /root/ssh2-0.11.3

or create a file with .php extension and add the below codem for example phpinfo.php.

<?php
echo phpinfo();
?>