mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-03 22:35:43 +02:00
Merge "Bug 462418 - Use stored password on non-preferred password based auth."
This commit is contained in:
commit
91596fb8d7
1 changed files with 5 additions and 1 deletions
|
@ -7,6 +7,7 @@
|
|||
*
|
||||
* Contributors:
|
||||
* IBM Corporation - Initial API and implementation
|
||||
* Patrick Tasse - [462418] use stored password on non-preferred password based authentication
|
||||
*******************************************************************************/
|
||||
package org.eclipse.remote.internal.jsch.core;
|
||||
|
||||
|
@ -828,10 +829,13 @@ public class JSchConnection implements IRemoteConnectionControlService, IRemoteC
|
|||
session.setUserInfo(new JSchUserInfo());
|
||||
if (isPasswordAuth()) {
|
||||
session.setConfig("PreferredAuthentications", "password,keyboard-interactive,gssapi-with-mic,publickey"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
session.setPassword(getPassword());
|
||||
} else {
|
||||
session.setConfig("PreferredAuthentications", "publickey,gssapi-with-mic,password,keyboard-interactive"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
}
|
||||
String password = getPassword();
|
||||
if (!password.isEmpty()) {
|
||||
session.setPassword(password);
|
||||
}
|
||||
if (getProxyCommand().isEmpty() && getProxyConnectionName().isEmpty()) {
|
||||
fJSchService.connect(session, getTimeout() * 1000, progress.newChild(10)); // connect without proxy
|
||||
} else {
|
||||
|
|
Loading…
Add table
Reference in a new issue