diff --git a/unix/uxplink.c b/unix/uxplink.c index 3d3a645f..7721e4b6 100644 --- a/unix/uxplink.c +++ b/unix/uxplink.c @@ -961,7 +961,7 @@ int main(int argc, char **argv) uxsel_init(); /* - * Unix Plink doesn't provide any way to add forwardings after the + * Plink doesn't provide any way to add forwardings after the * connection is set up, so if there are none now, we can safely set * the "simple" flag. */ diff --git a/windows/winplink.c b/windows/winplink.c index a0458b39..99e269fd 100644 --- a/windows/winplink.c +++ b/windows/winplink.c @@ -618,6 +618,17 @@ int main(int argc, char **argv) return 1; } + /* + * Plink doesn't provide any way to add forwardings after the + * connection is set up, so if there are none now, we can safely set + * the "simple" flag. + */ + if (conf_get_int(conf, CONF_protocol) == PROT_SSH && + !conf_get_int(conf, CONF_x11_forward) && + !conf_get_int(conf, CONF_agentfwd) && + !conf_get_str_nthstrkey(conf, CONF_portfwd, 0)) + conf_set_int(conf, CONF_ssh_simple, TRUE); + logctx = log_init(NULL, conf); console_provide_logctx(logctx);