copypasta libssh-0.6.0 fix
debugging + tweaking