LibSSH
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:
- Download and extract code and patch
- $ wget http://0xbadc0de.be/libssh/libssh-0.11.tgz
- $ wget http://www.rkeene.org/projects/info/resources/projects/libssh/v0.11/libssh-0.11-win32-1.patch
- $ tar -zxf libssh-0.11.tgz
- Apply the patch
- $ cd libssh-0.11
- $ patch -p1 < ../libssh-0.11-win32-1.patch
- Compile
- $ CC=i586-mingw32msvc-gcc ./configure --host=i586-pc-mingw32msvc
- $ make
- Strip (optional)
- $ i586-mingw32msvc-strip libssh/libssh.dll
- Install
- $ cp libssh/libssh.dll /somewhere/lib
- $ cp -a include/libssh /somewhere/include
- Use
- See "sample.c" for a sample LibSSH application