mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-08 18:26:01 +02:00
Bug 462418 - Use stored password on non-preferred password based auth.
Change-Id: Id169ecbb47cb4ad8d04d68a5d37338dad77b2b60 Signed-off-by: Patrick Tasse <patrick.tasse@gmail.com>
This commit is contained in:
parent
62dcd2bc81
commit
003263a0d4
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