Simple C API for SSH

LibSSH provides a simple C API for SSH with a minimal learning curve and minimal dependencies.

I ported LibSSH v0.11 to Win32 with the intention of using it in BackupPCd. But I discovered that the server portion was incomplete, so I abandoned it.

I have sent my changes to the author and it seems that many people have tried to use them.

The patch:

Pre-built Binary for Win32:

How to use it:

  1. Download and extract code and patch
    1. $ wget
    2. $ wget
    3. $ tar -zxf libssh-0.11.tgz
  2. Apply the patch
    1. $ cd libssh-0.11
    2. $ patch -p1 < ../libssh-0.11-win32-1.patch
  3. Compile
    1. $ CC=i586-mingw32msvc-gcc ./configure --host=i586-pc-mingw32msvc
    2. $ make
  4. Strip (optional)
    1. $ i586-mingw32msvc-strip libssh/libssh.dll
  5. Install
    1. $ cp libssh/libssh.dll /somewhere/lib
    2. $ cp -a include/libssh /somewhere/include
  6. Use
    1. See "sample.c" for a sample LibSSH application