sftp_init() fails to set the ssh error code at times
Reference: https://github.com/curl/curl/issues/9737
The (sparse) documentation for sftp_init()
says it sets the "ssh error code" on error, but still it can return error with ssh_get_error()
not set and thus returning zero (== no error).