Install libssh2 for curl on DirectAdmin server

libssh2 is a client-side C library implementing the SSH2 protocol.

How to install libssh2 for Curl

To be short here you can find a list of commands to run as root in a bash console:

cd /usr/local/src
wget https://libssh2.org/download/libssh2-1.9.0.tar.gz
tar zxvf libssh2-1.9.0.tar.gz
cd libssh2-1.9.0
./configure
make
make install
cd /usr/local/directadmin/custombuild

mkdir -p /usr/local/directadmin/custombuild/custom/curl
cp -p /usr/local/directadmin/custombuild/configure/curl/configure.curl /usr/local/directadmin/custombuild/custom/curl/configure.curl
nano /usr/local/directadmin/custombuild/custom/curl/configure.curl
#!/bin/sh
./configure --with-libssh2
cd /usr/local/directadmin/custombuild
./build curl

Now test it:

curl -V | grep ssh

You should see similar output:

curl 7.69.1 (x86_64-pc-linux-gnu) libcurl/7.69.1 OpenSSL/1.1.1c-fips zlib/1.2.11 libssh2/1.9.0 nghttp2/1.40.0

Leave a Reply

Your email address will not be published.