In libssh, if an provided hostname resolves to IPv6 and IPv4 addresses, the connection tries only the first one. Usually it tries IPv6 first and usually fails before trying the IPv4 address.
The easiest way to reproduce this is to put something like this in /etc/hosts:
2001:db8::1 testing 192.168.0.1 testing
and then try to ./examples/ssh-client -vvvv testing. The client only tries the first address and gives up without trying the next.