From b7adc5b5a60cdba6b2ffecad6c8b986414fd63a6 Mon Sep 17 00:00:00 2001 From: Lukasz Marek Date: Fri, 4 Jul 2014 19:50:13 +0200 Subject: [PATCH] lavf/libssh: call ssh_userauth_none before ssh_userauth_list 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 Signed-off-by: Michael Niedermayer --- libavformat/libssh.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavformat/libssh.c b/libavformat/libssh.c index b20e93bbab..87a2a7f9df 100644 --- a/libavformat/libssh.c +++ b/libavformat/libssh.c @@ -71,6 +71,9 @@ static av_cold int libssh_authentication(LIBSSHContext *libssh, const char *user if (user) ssh_options_set(libssh->session, SSH_OPTIONS_USER, user); + if (ssh_userauth_none(libssh->session, NULL) == SSH_AUTH_SUCCESS) + return 0; + auth_methods = ssh_userauth_list(libssh->session, NULL); if (auth_methods & SSH_AUTH_METHOD_PUBLICKEY) {