mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-05-29 07:44:48 -05:00
Add "-s" option to Unix plink too.
Compiled, but not tested as Unix plink seems to be segfaulting today. [originally from svn r3427]
This commit is contained in:
parent
5690a72640
commit
2504a53d72
@ -53,3 +53,5 @@ Force use of SSH protocol version 2.
|
|||||||
Enable compression.
|
Enable compression.
|
||||||
.IP "\fB-i\fR \fIpath\fR"
|
.IP "\fB-i\fR \fIpath\fR"
|
||||||
Private key file for authentication.
|
Private key file for authentication.
|
||||||
|
.IP "\fB-s\fR"
|
||||||
|
Remote command is SSH subsystem (SSH-2 only).
|
||||||
|
@ -231,6 +231,7 @@ static void usage(void)
|
|||||||
printf(" -1 -2 force use of particular protocol version\n");
|
printf(" -1 -2 force use of particular protocol version\n");
|
||||||
printf(" -C enable compression\n");
|
printf(" -C enable compression\n");
|
||||||
printf(" -i key private key file for authentication\n");
|
printf(" -i key private key file for authentication\n");
|
||||||
|
printf(" -s remote command is an SSH subsystem (SSH-2 only)\n");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -244,6 +245,7 @@ int main(int argc, char **argv)
|
|||||||
int connopen;
|
int connopen;
|
||||||
int exitcode;
|
int exitcode;
|
||||||
int errors;
|
int errors;
|
||||||
|
int use_subsystem = 0;
|
||||||
void *ldisc, *logctx;
|
void *ldisc, *logctx;
|
||||||
|
|
||||||
ssh_get_line = console_get_line;
|
ssh_get_line = console_get_line;
|
||||||
@ -297,6 +299,9 @@ int main(int argc, char **argv)
|
|||||||
continue;
|
continue;
|
||||||
} else if (!strcmp(p, "-batch")) {
|
} else if (!strcmp(p, "-batch")) {
|
||||||
console_batch_mode = 1;
|
console_batch_mode = 1;
|
||||||
|
} else if (!strcmp(p, "-s")) {
|
||||||
|
/* Save status to write to cfg later. */
|
||||||
|
use_subsystem = 1;
|
||||||
} else if (!strcmp(p, "-o")) {
|
} else if (!strcmp(p, "-o")) {
|
||||||
if (argc <= 1) {
|
if (argc <= 1) {
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
@ -466,6 +471,12 @@ int main(int argc, char **argv)
|
|||||||
*/
|
*/
|
||||||
cmdline_run_saved(&cfg);
|
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.
|
* Trim a colon suffix off the hostname if it's there.
|
||||||
*/
|
*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user