Skip to content
Permalink
Browse files

[WAGON-564] SSH connection failure because 'preferredAuthentications'…

… option is ignored if password isn't set

We do not set a default value anymore because since JSch 0.1.30 a value is
provided by default. Set the value if and only if user has provided one in
the settings.xml server section.
  • Loading branch information...
michael-o committed Jul 25, 2019
1 parent 2421041 commit 184cdad07a78cedcfdce68b6d8b05040593f4176
@@ -96,7 +96,7 @@
private volatile InteractiveUserInfo interactiveUserInfo;

/**
* @plexus.configuration default-value="gssapi-with-mic,publickey,password,keyboard-interactive"
* @plexus.configuration
*/
private volatile String preferredAuthentications;

@@ -251,7 +251,7 @@ public void openConnectionInternal()
config.setProperty( "StrictHostKeyChecking", strictHostKeyChecking );
}

if ( authenticationInfo.getPassword() != null )
if ( preferredAuthentications != null )
{
config.setProperty( "PreferredAuthentications", preferredAuthentications );
}

0 comments on commit 184cdad

Please sign in to comment.
You can’t perform that action at this time.