зеркало из https://github.com/github/putty.git
Add -share -noshare command line option to plink to share SSL connections.
This commit is contained in:
Родитель
0e2955ffbf
Коммит
309c3dfd95
13
cmdline.c
13
cmdline.c
|
@ -403,7 +403,18 @@ int cmdline_process_param(const char *p, char *value,
|
|||
SAVEABLE(0);
|
||||
conf_set_int(conf, CONF_tryagent, FALSE);
|
||||
}
|
||||
|
||||
if (!strcmp(p, "-share")) {
|
||||
RETURN(1);
|
||||
UNAVAILABLE_IN(TOOLTYPE_NONNETWORK);
|
||||
SAVEABLE(0);
|
||||
conf_set_int(conf, CONF_ssh_connection_sharing, TRUE);
|
||||
}
|
||||
if (!strcmp(p, "-noshare")) {
|
||||
RETURN(1);
|
||||
UNAVAILABLE_IN(TOOLTYPE_NONNETWORK);
|
||||
SAVEABLE(0);
|
||||
conf_set_int(conf, CONF_ssh_connection_sharing, FALSE);
|
||||
}
|
||||
if (!strcmp(p, "-A")) {
|
||||
RETURN(1);
|
||||
UNAVAILABLE_IN(TOOLTYPE_FILETRANSFER | TOOLTYPE_NONNETWORK);
|
||||
|
|
|
@ -182,6 +182,15 @@ which of the agent's keys to use. }
|
|||
\dd Allow use of an authentication agent. (This option is only necessary
|
||||
to override a setting in a saved session.)
|
||||
|
||||
\dt \cw{\-noshare}
|
||||
|
||||
\dd Don't test and try to share an existing connection, always make
|
||||
a new connection.
|
||||
|
||||
\dt \cw{\-share}
|
||||
|
||||
\dd Test and try to share an existing connection.
|
||||
|
||||
\dt \cw{\-hostkey} \e{key}
|
||||
|
||||
\dd Specify an acceptable host public key. This option may be specified
|
||||
|
|
|
@ -75,6 +75,8 @@ use Plink:
|
|||
\c -i key private key file for user authentication
|
||||
\c -noagent disable use of Pageant
|
||||
\c -agent enable use of Pageant
|
||||
\c -noshare disable use of connection sharing
|
||||
\c -share enable use of connection sharing
|
||||
\c -hostkey aa:bb:cc:...
|
||||
\c manually specify a host key (may be repeated)
|
||||
\c -m file read remote command(s) from file
|
||||
|
@ -237,6 +239,28 @@ line.
|
|||
|
||||
(This option is only meaningful with the SSH-2 protocol.)
|
||||
|
||||
\S2{plink-option-share} \I{-share-plink}\c{-share}:
|
||||
Test and try to share an existing connection.
|
||||
|
||||
This option tris to detect if an existing connection can be shared
|
||||
(See \k{config-ssh-sharing} for more information about SSH connection
|
||||
sharing.) and reuses that connection.
|
||||
|
||||
A Plink invocation of the form:
|
||||
|
||||
\c plink -share <session>
|
||||
\e iiiiiiiii
|
||||
|
||||
will test whether there is currently a viable \q{upstream} for the
|
||||
session in question, which can be specified using any syntax you'd
|
||||
normally use with Plink to make an actual connection (a host/port
|
||||
number, a bare saved session name, \c{-load}, etc). If no \q{upstream}
|
||||
viable session is found and \c{-share} is specified, this connection
|
||||
will be become the \q{upstream} connection for subsequent connection
|
||||
sharing tries.
|
||||
|
||||
(This option is only meaningful with the SSH-2 protocol.)
|
||||
|
||||
\S2{plink-option-shareexists} \I{-shareexists-plink}\c{-shareexists}:
|
||||
test for connection-sharing upstream
|
||||
|
||||
|
|
|
@ -579,6 +579,8 @@ static void usage(void)
|
|||
printf(" -i key private key file for user authentication\n");
|
||||
printf(" -noagent disable use of Pageant\n");
|
||||
printf(" -agent enable use of Pageant\n");
|
||||
printf(" -noshare disable use of connection sharing\n");
|
||||
printf(" -share enable use of connection sharing\n");
|
||||
printf(" -hostkey aa:bb:cc:...\n");
|
||||
printf(" manually specify a host key (may be repeated)\n");
|
||||
printf(" -m file read remote command(s) from file\n");
|
||||
|
|
|
@ -207,6 +207,8 @@ static void usage(void)
|
|||
printf(" -i key private key file for user authentication\n");
|
||||
printf(" -noagent disable use of Pageant\n");
|
||||
printf(" -agent enable use of Pageant\n");
|
||||
printf(" -noshare disable use of connection sharing\n");
|
||||
printf(" -share enable use of connection sharing\n");
|
||||
printf(" -hostkey aa:bb:cc:...\n");
|
||||
printf(" manually specify a host key (may be repeated)\n");
|
||||
printf(" -m file read remote command(s) from file\n");
|
||||
|
|
Загрузка…
Ссылка в новой задаче