printf(" -1 -2 force use of particular protocol version\n");
printf(" -C enable compression\n");
printf(" -i key private key file for authentication\n");
+ printf(" -s remote command is an SSH subsystem (SSH-2 only)\n");
exit(1);
}
int connopen;
int exitcode;
int errors;
+ int use_subsystem = 0;
ssh_get_line = console_get_line;
continue;
} else if (!strcmp(p, "-batch")) {
console_batch_mode = 1;
+ } else if (!strcmp(p, "-s")) {
+ /* Save status to write to cfg later. */
+ use_subsystem = 1;
} else {
fprintf(stderr, "plink: unknown option \"%s\"\n", p);
errors = 1;
cmdline_run_saved(&cfg);
/*
+ * Apply subsystem status.
+ */
+ if (use_subsystem)
+ cfg.ssh_subsys = TRUE;
+
+ /*
* Trim a colon suffix off the hostname if it's there.
*/
cfg.host[strcspn(cfg.host, ":")] = '\0';
*/
netevent = CreateEvent(NULL, FALSE, FALSE, NULL);
{
- char *error;
+ const char *error;
char *realhost;
/* nodelay is only useful if stdin is a character device (console) */
int nodelay = cfg.tcp_nodelay &&