Shortened SSH tunneling System property names, fixed problem with parsing of '-via' cmd line option, fixed intermittent problem with SSH password dialog.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4916 3789f03b-4d11-0410-bbf8-ca57d06f2519
diff --git a/java/com/tigervnc/vncviewer/tunnel.java b/java/com/tigervnc/vncviewer/tunnel.java
index 2fc12a6..23da0a9 100644
--- a/java/com/tigervnc/vncviewer/tunnel.java
+++ b/java/com/tigervnc/vncviewer/tunnel.java
@@ -194,9 +194,9 @@
try {
if (tunnelOption) {
- pattern = System.getProperty("com.tigervnc.VNC_TUNNEL_CMD");
+ pattern = System.getProperty("VNC_TUNNEL_CMD");
} else {
- pattern = System.getProperty("com.tigervnc.VNC_VIA_CMD");
+ pattern = System.getProperty("VNC_VIA_CMD");
}
} catch (java.lang.Exception e) {
vlog.info(e.toString());
@@ -294,10 +294,10 @@
}
// username and passphrase will be given via UserInfo interface.
PasswdDialog dlg = new PasswdDialog(new String("SSH Authentication"), false, false);
- dlg.userEntry.setText((String)System.getProperties().get("user.name"));
+ dlg.promptPassword(new String("SSH Authentication"));
Session session=jsch.getSession(dlg.userEntry.getText(), tunnelEndpoint, 22);
- session.setUserInfo(dlg);
+ session.setPassword(new String(dlg.passwdEntry.getPassword()));
session.connect();
String[] tokens = cmd.split("\\s");