\c Z:\sysosd>plink
\c Plink: command-line connection utility
-\c Release 0.64
+\c Release 0.66
\c Usage: plink [options] [user@]host [command]
\c ("host" can also be a PuTTY saved session name)
\c Options:
\c -N don't start a shell/command (SSH-2 only)
\c -nc host:port
\c open tunnel in place of session (SSH-2 only)
+\c -shareexists
+\c test whether a connection-sharing upstream exists
Once this works, you are ready to use Plink.
(This option is only meaningful with the SSH-2 protocol.)
+\S2{plink-option-shareexists} \I{-shareexists-plink}\c{-shareexists}:
+test for connection-sharing upstream
+
+This option does not make a new connection; instead it allows testing
+for the presence of an existing connection that can be shared.
+(See \k{config-ssh-sharing} for more information about SSH connection
+sharing.)
+
+A Plink invocation of the form:
+
+\c plink -shareexists <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). It returns a
+zero exit status if a usable \q{upstream} exists, nonzero otherwise.
+
+(This option is only meaningful with the SSH-2 protocol.)
+
\H{plink-batch} Using Plink in \i{batch files} and \i{scripts}
Once you have set up Plink to be able to log in to a remote server