mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-01 19:42:48 -05:00
New command-line option in Plink (and PuTTY, though it's less useful
there): `plink host -nc host2:port' causes the SSH connection's main channel to be replaced with a direct-tcpip connection to the specified destination. This feature is mainly designed for use as a local proxy: setting your local proxy command to `plink %proxyhost -nc %host:%port' lets you tunnel SSH over SSH with a minimum of fuss. Works on all platforms. [originally from svn r6823]
This commit is contained in:
@ -1807,6 +1807,11 @@ output streams.
|
||||
This could be used, for instance, to talk to some kind of network proxy
|
||||
that PuTTY does not natively support; or you could tunnel a connection
|
||||
over something other than TCP/IP entirely.
|
||||
|
||||
If you want your local proxy command to make a secondary SSH
|
||||
connection to a proxy host and then tunnel the primary connection
|
||||
over that, you might well want the \c{-nc} command-line option in
|
||||
Plink. See \k{using-cmdline-ncmode} for more information.
|
||||
}
|
||||
|
||||
\S{config-proxy-exclude} Excluding parts of the network from proxying
|
||||
|
@ -796,6 +796,47 @@ at all} checkbox in the SSH panel of the PuTTY configuration box
|
||||
This option is not available in the file transfer tools PSCP and
|
||||
PSFTP.
|
||||
|
||||
\S2{using-cmdline-ncmode} \I{-nc}\c{-nc}: make a \i{remote network
|
||||
connection} in place of a remote shell or command
|
||||
|
||||
The \c{-nc} option prevents Plink (or PuTTY) from attempting to
|
||||
start a shell or command on the remote server. Instead, it will
|
||||
instruct the remote server to open a network connection to a host
|
||||
name and port number specified by you, and treat that network
|
||||
connection as if it were the main session.
|
||||
|
||||
You specify a host and port as an argument to the \c{-nc} option,
|
||||
with a colon separating the host name from the port number, like
|
||||
this:
|
||||
|
||||
\c plink host1.example.com -nc host2.example.com:1234
|
||||
|
||||
You might want to use this feature if you needed to make an SSH
|
||||
connection to a target host which you can only reach by going
|
||||
through a proxy host, and rather than using port forwarding you
|
||||
prefer to use the local proxy feature (see \k{config-proxy-type} for
|
||||
more about local proxies). In this situation you might select
|
||||
\q{Local} proxy type, set your local proxy command to be \cq{plink
|
||||
%proxyhost -nc %host:%port}, enter the target host name on the
|
||||
Session panel, and enter the directly reachable proxy host name on
|
||||
the Proxy panel.
|
||||
|
||||
This feature is only available in SSH protocol version 2 (since the
|
||||
version 1 protocol assumes you will always want to run a shell). It
|
||||
is not available in the file transfer tools PSCP and PSFTP. It is
|
||||
available in PuTTY itself, although it is unlikely to be very useful
|
||||
in any tool other than Plink. Also, \c{-nc} uses the same server
|
||||
functionality as port forwarding, so it will not work if your server
|
||||
administrator has disabled port forwarding.
|
||||
|
||||
(The option is named \c{-nc} after the Unix program
|
||||
\W{http://www.vulnwatch.org/netcat/}\c{nc}, short for \q{netcat}.
|
||||
The command \cq{plink host1 -nc host2:port} is very similar in
|
||||
functionality to \cq{plink host1 nc host2 port}, which invokes
|
||||
\c{nc} on the server and tells it to connect to the specified
|
||||
destination. However, Plink's built-in \c{-nc} option does not
|
||||
depend on the \c{nc} program being installed on the server.)
|
||||
|
||||
\S2{using-cmdline-compress} \I{-C-upper}\c{-C}: enable \i{compression}
|
||||
|
||||
The \c{-C} option enables compression of the data sent across the
|
||||
|
Reference in New Issue
Block a user