Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoryamanaka2007-01-17 07:48:23 +0000
committeryamanaka2007-01-17 07:48:23 +0000
commit793e5cb60ce302bea5cf9b7fbaf6c1464348da37 (patch)
tree9ecb12434e4da5bad334e2465bcb479fa13723e7 /bundles/org.eclipse.team.cvs.ssh2
parent1fbedf6c312051f7d27520aa5525bfb7d834c004 (diff)
downloadeclipse.platform.team-793e5cb60ce302bea5cf9b7fbaf6c1464348da37.tar.gz
eclipse.platform.team-793e5cb60ce302bea5cf9b7fbaf6c1464348da37.tar.xz
eclipse.platform.team-793e5cb60ce302bea5cf9b7fbaf6c1464348da37.zip
Since jsch 0.1.31, it has its own order to try authentication methods
and it is simmilar to OpenSSH's "PreferredAuthentications" option. By this change, keyboard-interactive(KI) auth method will be tried and then password auth will be tried. Such a behavior is not a problem and, in fact OpenSSH's ssh will have same behavior, but unfortunately the prompt for KI[1] is not so matuare and it will not allow to save given password. By this commit, password auth will be tried if possible and then KI will be. [1] org.eclipse.team.internal.ccvs.ui.KeyboardInteractiveDialog.java
Diffstat (limited to 'bundles/org.eclipse.team.cvs.ssh2')
-rw-r--r--bundles/org.eclipse.team.cvs.ssh2/src/org/eclipse/team/internal/ccvs/ssh2/JSchSession.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/bundles/org.eclipse.team.cvs.ssh2/src/org/eclipse/team/internal/ccvs/ssh2/JSchSession.java b/bundles/org.eclipse.team.cvs.ssh2/src/org/eclipse/team/internal/ccvs/ssh2/JSchSession.java
index 71a14ecbb..e56c4db05 100644
--- a/bundles/org.eclipse.team.cvs.ssh2/src/org/eclipse/team/internal/ccvs/ssh2/JSchSession.java
+++ b/bundles/org.eclipse.team.cvs.ssh2/src/org/eclipse/team/internal/ccvs/ssh2/JSchSession.java
@@ -15,6 +15,7 @@ import java.io.*;
import java.net.Socket;
import java.net.UnknownHostException;
import java.util.Enumeration;
+import java.util.Hashtable;
import org.eclipse.core.runtime.*;
import org.eclipse.jface.preference.IPreferenceStore;
@@ -478,6 +479,17 @@ class JSchSession {
session.setPassword(password);
session.setUserInfo(wrapperUI);
session.setSocketFactory(socketFactory);
+
+ // TODO following lines should be deleted after
+ // improvements on the prompt for keyboard-interactive(KI) auth method.
+ // Without following lines, in establishing SSH session to some sshd(for example,
+ // running on dev.eclipse.org), KI will be tryed at first instead of password auth method and
+ // the GUI for KI prompt will not allow to save given password in current implementation.
+ Hashtable config=new Hashtable();
+ config.put("PreferredAuthentications", //$NON-NLS-1$
+ "gssapi-with-mic,publickey,password,keyboard-interactive"); //$NON-NLS-1$
+ session.setConfig(config);
+
// This is where the server is contacted and authentication occurs
try {
session.connect();

Back to the top