I clearly haven't been reading the libssh docs, and clang isn't catching my errors for me