According to doc, ssh_userauth_none must be called before ssh_userauth_list.
It solves login issue for new versions of libssh.
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
... | ... |
@@ -71,6 +71,9 @@ static av_cold int libssh_authentication(LIBSSHContext *libssh, const char *user |
71 | 71 |
if (user) |
72 | 72 |
ssh_options_set(libssh->session, SSH_OPTIONS_USER, user); |
73 | 73 |
|
74 |
+ if (ssh_userauth_none(libssh->session, NULL) == SSH_AUTH_SUCCESS) |
|
75 |
+ return 0; |
|
76 |
+ |
|
74 | 77 |
auth_methods = ssh_userauth_list(libssh->session, NULL); |
75 | 78 |
|
76 | 79 |
if (auth_methods & SSH_AUTH_METHOD_PUBLICKEY) { |