@hackage libssh0.1.0.0

libssh bindings

Haskell bindings to the libssh library

The bindings are not complete (though maybe will get there): they are composed primarily to fetch files over SFTP, since other available options had issues with that. In particular, when downloading hundreds of files per hour, over hundreds of connections (with dozens of those simultaneously), in a long-running process, the following was observed:

  • SSHFS 2.8 quits without leaving a trace, and does not seem to be actively maintained.

  • Haskell curl bindings lead to memory leaks, possibly because curl uses libssh2, which leaks (see below).

  • libssh2 1.7.0 (on Debian 9) and 1.9.0 (on Debian 11) appears to leak memory, even after leaks in its Haskell bindings are fixed.

  • libssh 0.7.3 (on Debian 9) seems to enter an infinite loop in sftp_open occasionally, with high CPU load, but version 0.9.8 (on Debian 11) does not.

The "discarded-qualifiers" warnings happen during the build because of the GHC issue 22043, but ConstPtr was introduced recently, so using it would break compatibility with base versions that are still in use.

The bindings are compatible with libssh versions 0.7.3, 0.9.8, 0.10.6.