I suspect that script tries to get the banner (in a way that is unacceptable for your version of libssh2), whereas the other script does not.
for an example of the correct way to handle the setting/getting of the banner with recent versions of the libssh2 library.
Which version of the libssh2 library do you have ? It may need updating.