libssh2

After building OpenSSL, you can create the library used for SSH. This enables extra features in curl, as well as being a requirement for SSH, SCP, etc.

I was expecting some difficulty building this, but no special options were needed for configure and make.

Prerequisites

Install MSYS + MinGW.

Build OpenSSL (requires zlib and pthreads).

You can Install 7zip for extracting files instead of tar. Use "7z" on the command line.

Download source

Download the latest tarball from https://www.libssh2.org: 1.8.0.

Copy to your MSYS home directory, and start your MSYS shell.

  • Start the MinGW Shell

  • cd

  • tar xvfz libssh2-1.8.0.tar.gz

  • cd libssh2-1.8.0

Build

  • ./configure

  • make

Install

  • make install

What was installed?

    • /usr/local/lib/

    • libssh2.dll.a

    • libssh2.la

    • libssh2.a

    • /usr/local/include/

    • libssh2_sftp.h

    • libssh2_publickey.h

    • libssh2.h

What next?

Try out the example program (be sure to use an IP address instead of hostname):

example/ssh2 66.7.199.108

Build some programs that use SSH, such as curl.