- s = ctrl_getset(b, "Connection/SSH/Auth", "methods",
- "Authentication methods");
- ctrl_checkbox(s, "Attempt TIS or CryptoCard auth (SSH1)", 'm',
- HELPCTX(ssh_auth_tis),
- dlg_stdcheckbox_handler,
- I(offsetof(Config,try_tis_auth)));
- ctrl_checkbox(s, "Attempt \"keyboard-interactive\" auth (SSH2)",
- 'i', HELPCTX(ssh_auth_ki),
- dlg_stdcheckbox_handler,
- I(offsetof(Config,try_ki_auth)));
-
- s = ctrl_getset(b, "Connection/SSH/Auth", "params",
- "Authentication parameters");
- ctrl_checkbox(s, "Allow agent forwarding", 'f',
- HELPCTX(ssh_auth_agentfwd),
- dlg_stdcheckbox_handler, I(offsetof(Config,agentfwd)));
- ctrl_checkbox(s, "Allow attempted changes of username in SSH2", 'u',
- HELPCTX(ssh_auth_changeuser),
- dlg_stdcheckbox_handler,
- I(offsetof(Config,change_username)));
- ctrl_filesel(s, "Private key file for authentication:", 'k',
- FILTER_KEY_FILES, FALSE, "Select private key file",
- HELPCTX(ssh_auth_privkey),
- dlg_stdfilesel_handler, I(offsetof(Config, keyfile)));
+ if (!midsession) {
+
+ /*
+ * The Connection/SSH/Auth panel.
+ */
+ ctrl_settitle(b, "Connection/SSH/Auth",
+ "Options controlling SSH authentication");
+
+ s = ctrl_getset(b, "Connection/SSH/Auth", "main", NULL);
+ ctrl_checkbox(s, "Bypass authentication entirely (SSH-2 only)", 'b',
+ HELPCTX(ssh_auth_bypass),
+ dlg_stdcheckbox_handler,
+ I(offsetof(Config,ssh_no_userauth)));
+
+ s = ctrl_getset(b, "Connection/SSH/Auth", "methods",
+ "Authentication methods");
+ ctrl_checkbox(s, "Attempt authentication using Pageant", 'p',
+ HELPCTX(ssh_auth_pageant),
+ dlg_stdcheckbox_handler,
+ I(offsetof(Config,tryagent)));
+ ctrl_checkbox(s, "Attempt TIS or CryptoCard auth (SSH-1)", 'm',
+ HELPCTX(ssh_auth_tis),
+ dlg_stdcheckbox_handler,
+ I(offsetof(Config,try_tis_auth)));
+ ctrl_checkbox(s, "Attempt \"keyboard-interactive\" auth (SSH-2)",
+ 'i', HELPCTX(ssh_auth_ki),
+ dlg_stdcheckbox_handler,
+ I(offsetof(Config,try_ki_auth)));
+
+#ifndef NO_GSSAPI
+ ctrl_checkbox(s, "Attempt GSSAPI auth (SSH-2)",
+ NO_SHORTCUT, HELPCTX(no_help),
+ dlg_stdcheckbox_handler,
+ I(offsetof(Config,try_gssapi_auth)));
+#endif
+
+ s = ctrl_getset(b, "Connection/SSH/Auth", "params",
+ "Authentication parameters");
+ ctrl_checkbox(s, "Allow agent forwarding", 'f',
+ HELPCTX(ssh_auth_agentfwd),
+ dlg_stdcheckbox_handler, I(offsetof(Config,agentfwd)));
+ ctrl_checkbox(s, "Allow attempted changes of username in SSH-2", 'u',
+ HELPCTX(ssh_auth_changeuser),
+ dlg_stdcheckbox_handler,
+ I(offsetof(Config,change_username)));
+#ifndef NO_GSSAPI
+ ctrl_checkbox(s, "Allow GSSAPI credential delegation in SSH-2", NO_SHORTCUT,
+ HELPCTX(no_help),
+ dlg_stdcheckbox_handler,
+ I(offsetof(Config,gssapifwd)));
+#endif
+ ctrl_filesel(s, "Private key file for authentication:", 'k',
+ FILTER_KEY_FILES, FALSE, "Select private key file",
+ HELPCTX(ssh_auth_privkey),
+ dlg_stdfilesel_handler, I(offsetof(Config, keyfile)));
+ }
+
+ if (!midsession) {
+ /*
+ * The Connection/SSH/TTY panel.
+ */
+ ctrl_settitle(b, "Connection/SSH/TTY", "Remote terminal settings");
+
+ s = ctrl_getset(b, "Connection/SSH/TTY", "sshtty", NULL);
+ ctrl_checkbox(s, "Don't allocate a pseudo-terminal", 'p',
+ HELPCTX(ssh_nopty),
+ dlg_stdcheckbox_handler,
+ I(offsetof(Config,nopty)));
+
+ s = ctrl_getset(b, "Connection/SSH/TTY", "ttymodes",
+ "Terminal modes");
+ td = (struct ttymodes_data *)
+ ctrl_alloc(b, sizeof(struct ttymodes_data));
+ ctrl_columns(s, 2, 75, 25);
+ c = ctrl_text(s, "Terminal modes to send:", HELPCTX(ssh_ttymodes));
+ c->generic.column = 0;
+ td->rembutton = ctrl_pushbutton(s, "Remove", 'r',
+ HELPCTX(ssh_ttymodes),
+ ttymodes_handler, P(td));
+ td->rembutton->generic.column = 1;
+ td->rembutton->generic.tabdelay = 1;
+ ctrl_columns(s, 1, 100);
+ td->listbox = ctrl_listbox(s, NULL, NO_SHORTCUT,
+ HELPCTX(ssh_ttymodes),
+ ttymodes_handler, P(td));
+ td->listbox->listbox.multisel = 1;
+ td->listbox->listbox.height = 4;
+ td->listbox->listbox.ncols = 2;
+ td->listbox->listbox.percentages = snewn(2, int);
+ td->listbox->listbox.percentages[0] = 40;
+ td->listbox->listbox.percentages[1] = 60;
+ ctrl_tabdelay(s, td->rembutton);
+ ctrl_columns(s, 2, 75, 25);
+ td->modelist = ctrl_droplist(s, "Mode:", 'm', 67,
+ HELPCTX(ssh_ttymodes),
+ ttymodes_handler, P(td));
+ td->modelist->generic.column = 0;
+ td->addbutton = ctrl_pushbutton(s, "Add", 'd',
+ HELPCTX(ssh_ttymodes),
+ ttymodes_handler, P(td));
+ td->addbutton->generic.column = 1;
+ td->addbutton->generic.tabdelay = 1;
+ ctrl_columns(s, 1, 100); /* column break */
+ /* Bit of a hack to get the value radio buttons and
+ * edit-box on the same row. */
+ ctrl_columns(s, 3, 25, 50, 25);
+ c = ctrl_text(s, "Value:", HELPCTX(ssh_ttymodes));
+ c->generic.column = 0;
+ td->valradio = ctrl_radiobuttons(s, NULL, NO_SHORTCUT, 2,
+ HELPCTX(ssh_ttymodes),
+ ttymodes_handler, P(td),
+ "Auto", NO_SHORTCUT, P(NULL),
+ "This:", NO_SHORTCUT, P(NULL),
+ NULL);
+ td->valradio->generic.column = 1;
+ td->valbox = ctrl_editbox(s, NULL, NO_SHORTCUT, 100,
+ HELPCTX(ssh_ttymodes),
+ ttymodes_handler, P(td), P(NULL));
+ td->valbox->generic.column = 2;
+ ctrl_tabdelay(s, td->addbutton);
+
+ }
+
+ if (!midsession) {
+ /*
+ * The Connection/SSH/X11 panel.
+ */
+ ctrl_settitle(b, "Connection/SSH/X11",
+ "Options controlling SSH X11 forwarding");
+
+ s = ctrl_getset(b, "Connection/SSH/X11", "x11", "X11 forwarding");
+ ctrl_checkbox(s, "Enable X11 forwarding", 'e',
+ HELPCTX(ssh_tunnels_x11),
+ dlg_stdcheckbox_handler,I(offsetof(Config,x11_forward)));
+ ctrl_editbox(s, "X display location", 'x', 50,
+ HELPCTX(ssh_tunnels_x11),
+ dlg_stdeditbox_handler, I(offsetof(Config,x11_display)),
+ I(sizeof(((Config *)0)->x11_display)));
+ ctrl_radiobuttons(s, "Remote X11 authentication protocol", 'u', 2,
+ HELPCTX(ssh_tunnels_x11auth),
+ dlg_stdradiobutton_handler,
+ I(offsetof(Config, x11_auth)),
+ "MIT-Magic-Cookie-1", I(X11_MIT),
+ "XDM-Authorization-1", I(X11_XDM), NULL);
+ }