Ever had trouble in using libssh on Mac OSX 10.7.5.? And somehow it exits with the last error beeing like this: ** "Error : Server specified invalid channel 43" **
If you've installed a libssh for development with ports and used to have it arround in your deployed packages, be aware that this version is probably very old, or at least too old to contain the fix for libssh bug #39( https://red.libssh.org/issues/39 ). That bug is fixed in the latest version of libssh-0.4.8 in the series of 0.4
Unfortunately, this version is not usable on OSX 10.7.5. when not built with the correct pointer to environ; the problem is that in
libssh-0.4.8/libssh/socket.c, this is not buildable:
extern char **environ;
and you have to replace that with this:
#ifdef __APPLE__ #include <crt_externs.h> #define environ (*_NSGetEnviron()) #else extern char **environ; #endif
afterwards, build the thing and create your working libssh for 10.7.5.
$ mkdir libssh-0.4.8/build/ $ cd libssh-0.4.8/build/ $ cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release .. $ make
The result is your working libssh:
Use that library in your deployments and it at least works in 10.7.5. and 10.8.4 as far as I can say...
Have a good one,