Maybe I'm missing something, but, ssh_socket_connect() only ever connects in non-blocking mode. There is a defined ssh_connect_host() for blocking connections but it is never referenced. Looks like the logic to check for a connected callback is missing and choose the correct connection function is missing.
https://git.libssh.org/projects/libssh.git/tree/src/socket.c#n799 Regards, Nick
