libssh is generally thread-safe so long as users stick to accessing a given ssh_session object from a single thread.
However there are usages of strerror throughout the codebase and there are no guarantees that strerror itself is thread-safe.
To fix this I think perhaps an ssh_strerror function can be used instead, and the implementation of that can be wrapped with strerror_r or equivalent depending on platform.