Make `Copy all to Clipboard' copy all non-empty lines from the
[u/mdw/putty] / doc / using.but
index ae093b2..0ffe58c 100644 (file)
@@ -1,4 +1,4 @@
-\versionid $Id: using.but,v 1.7 2002/08/07 19:20:06 simon Exp $
+\versionid $Id: using.but,v 1.19 2004/02/08 00:14:57 jacob Exp $
 
 \C{using} Using PuTTY
 
@@ -32,7 +32,9 @@ server where it will probably cause a process to be interrupted.
 
 Pasting is done using the right button (or the middle mouse button,
 if you have a three-button mouse and have set it up; see
-\k{config-mouse}). When you click the right mouse button, PuTTY will
+\k{config-mouse}). (Pressing Shift-Ins, or selecting \q{Paste} from
+the Ctrl+right-click context menu, have the same effect.)
+When you click the right mouse button, PuTTY will
 read whatever is in the Windows Clipboard and paste it into your
 session, \e{exactly} as if it had been typed at the keyboard.
 (Therefore, be careful of pasting formatted text into an editor that
@@ -61,6 +63,12 @@ mouse button does this instead.) Click the button on the screen, and
 you can pick up the nearest end of the selection and drag it to
 somewhere else.
 
+It's possible for the server to ask to handle mouse clicks in the
+PuTTY window itself.  If this happens, the mouse cursor will turn
+into an arrow, and copy and paste will only work if you hold down
+Shift.  See \k{config-features-mouse} and \k{config-mouseshift} for
+details of this feature and how to configure it.
+
 \S{using-scrollback} Scrolling the screen back
 
 PuTTY keeps track of text that has scrolled up off the top of the
@@ -70,7 +78,8 @@ look for it, you can use the scrollbar on the right side of the
 window to look back up the session history and find it again.
 
 As well as using the scrollbar, you can also page the scrollback up
-and down by pressing Shift-PgUp and Shift-PgDn. These are still
+and down by pressing Shift-PgUp and Shift-PgDn. You can scroll a
+line at a time using Ctrl-PgUp and Ctrl-PgDn. These are still
 available if you configure the scrollbar to be invisible.
 
 By default the last 200 lines scrolled off the top are
@@ -88,6 +97,10 @@ PuTTY's system menu contains extra program features in addition to
 the Windows standard options. These extra menu commands are
 described below.
 
+(These options are also available in a context menu brought up
+by holding Ctrl and clicking with the right mouse button anywhere
+in the PuTTY window.)
+
 \S2{using-eventlog} The PuTTY Event Log
 
 If you choose \q{Event Log} from the system menu, a small window
@@ -101,6 +114,14 @@ and hit the Copy button to copy them to the clipboard. If you are
 reporting a bug, it's often useful to paste the contents of the
 Event Log into your bug report.
 
+\S2{using-specials} Special commands
+
+Depending on the protocol used for the current session, there may be a
+submenu of \q{special commands}. These are protocol-specific tokens,
+such as a \q{break} signal, that can be sent down a connection in
+addition to normal data. Currently only Telnet and SSH have special
+commands.
+
 \S2{using-newsession} Starting new sessions
 
 PuTTY's system menu provides some shortcut ways to start new
@@ -238,7 +259,8 @@ remote session and have them display their windows on your PC.
 
 Note that if your PC X server requires authentication to connect,
 then PuTTY cannot currently support it. If this is a problem for
-you, you should mail the authors \#{FIXME} and give details.
+you, you should mail the PuTTY authors \#{FIXME} and give details
+(see \k{feedback}).
 
 \H{using-port-forwarding} Using port forwarding in SSH
 
@@ -254,7 +276,8 @@ to a port on a remote server, you need to:
 
 \b Choose a port number on your local machine where PuTTY should
 listen for incoming connections. There are likely to be plenty of
-unused port numbers above 3000.
+unused port numbers above 3000. (You can also use a local loopback
+address here; see below for more details.)
 
 \b Now, before you start your SSH connection, go to the Tunnels
 panel (see \k{config-ssh-portfwd}). Make sure the \q{Local} radio
@@ -291,15 +314,25 @@ To do this, just select the \q{Remote} radio button instead of the
 number on the \e{server} (note that most servers will not allow you
 to use port numbers under 1024 for this purpose).
 
+An alternative way to forward local connections to remote hosts is
+to use dynamic SOCKS proxying. For this, you will need to select the
+\q{Dynamic} radio button instead of \q{Local}, and then you should
+not enter anything into the \q{Destination} box (it will be
+ignored). This will cause PuTTY to listen on the port you have
+specified, and provide a SOCKS proxy service to any programs which
+connect to that port. So, in particular, you can forward other PuTTY
+connections through it by setting up the Proxy control panel (see
+\k{config-proxy} for details).
+
 The source port for a forwarded connection usually does not accept
 connections from any machine except the SSH client or server machine
 itself (for local and remote forwardings respectively). There are
 controls in the Tunnels panel to change this:
 
 \b The \q{Local ports accept connections from other hosts} option
-allows you to set up local-to-remote port forwardings in such a way
-that machines other than your client PC can connect to the forwarded
-port.
+allows you to set up local-to-remote port forwardings (including
+dynamic port forwardings) in such a way that machines other than
+your client PC can connect to the forwarded port.
 
 \b The \q{Remote ports do the same} option does the same thing for
 remote-to-local port forwardings (so that machines other than the
@@ -307,6 +340,19 @@ SSH server machine can connect to the forwarded port.) Note that
 this feature is only available in the SSH 2 protocol, and not all
 SSH 2 servers support it (OpenSSH 3.0 does not, for example).
 
+You can also specify an IP address to listen on. Typically a
+Windows machine can be asked to listen on any single IP address in
+the \cw{127.*.*.*} range, and all of these are loopback addresses
+available only to the local machine. So if you forward (for
+example) \c{127.0.0.5:79} to a remote machine's \cw{finger} port,
+then you should be able to run commands such as \c{finger
+fred@127.0.0.5}. This can be useful if the program connecting to
+the forwarded port doesn't allow you to change the port number it
+uses. This feature is available for local-to-remote forwarded
+ports; SSH1 is unable to support it for remote-to-local ports,
+while SSH2 can support it in theory but servers will not
+necessarily cooperate.
+
 \H{using-rawprot} Making raw TCP connections
 
 A lot of Internet protocols are composed of commands and responses
@@ -350,12 +396,12 @@ straight into a session.
 
 To start a connection to a server called \c{host}:
 
-\c putty.exe [-ssh | -telnet | -rlogin | -raw] [user@]host[:port]
+\c putty.exe [-ssh | -telnet | -rlogin | -raw] [user@]host
 
 If this syntax is used, settings are taken from the Default Settings
-(see \k{config-saving}); \c{user} and \c{port} override these
-settings if supplied. Also, you can specify a protocol, which will
-override the default protocol (see \k{using-cmdline-protocol}).
+(see \k{config-saving}); \c{user} overrides these settings if
+supplied. Also, you can specify a protocol, which will override the
+default protocol (see \k{using-cmdline-protocol}).
 
 For telnet sessions, the following alternative syntax is supported
 (this makes PuTTY suitable for use as a URL handler for telnet URLs in
@@ -442,7 +488,7 @@ These options are equivalent to the username selection box in the
 Connection panel of the PuTTY configuration box (see
 \k{config-username}).
 
-\S2{using-cmdline-portfwd} \c{-L} and \c{-R}: set up port forwardings
+\S2{using-cmdline-portfwd} \c{-L}, \c{-R} and \c{-D}: set up port forwardings
 
 As well as setting up port forwardings in the PuTTY configuration
 (see \k{config-ssh-portfwd}), you can also set up forwardings on the
@@ -456,12 +502,23 @@ one of these:
 \c putty -L 5110:popserver.example.com:110 -load mysession
 \c plink mysession -L 5110:popserver.example.com:110
 
-And to forward a remote port to a local destination, just use the
-\c{-R} option instead of \c{-L}:
+To forward a remote port to a local destination, just use the \c{-R}
+option instead of \c{-L}:
 
 \c putty -R 5023:mytelnetserver.myhouse.org:23 -load mysession
 \c plink mysession -R 5023:mytelnetserver.myhouse.org:23
 
+To specify an IP address for the listening end of the tunnel,
+prepend it to the argument:
+
+\c plink -L 127.0.0.5:23:localhost:23 myhost
+
+To set up SOCKS-based dynamic port forwarding on a local port, use
+the \c{-D} option. For this one you only have to pass the port
+number:
+
+\c putty -D 4096 -load mysession
+
 For general information on port forwarding, see
 \k{using-port-forwarding}.
 
@@ -474,21 +531,21 @@ file
 The \c{-m} option performs a similar function to the \q{Remote
 command} box in the SSH panel of the PuTTY configuration box (see
 \k{config-command}). However, the \c{-m} option expects to be given
-a file name, and it will read a command from that file. On most Unix
+a local file name, and it will read a command from that file. On most Unix
 systems, you can even put multiple lines in this file and execute
 more than one command in sequence, or a whole shell script.
 
 This option is not available in the file transfer tools PSCP and
 PSFTP.
 
-\S2{using-cmdline-p} \c{-p} or \c{-P}: specify a port number
+\S2{using-cmdline-p} \c{-P}: specify a port number
 
-The \c{-p} option (you can also write it as \c{-P}) is used to
-specify the port number to connect to. If you have a Telnet server
-running on port 9696 of a machine instead of port 23, for example:
+The \c{-P} option is used to specify the port number to connect to. If
+you have a Telnet server running on port 9696 of a machine instead of
+port 23, for example:
 
-\c putty -telnet -p 9696 host.name
-\c plink -telnet -p 9696 host.name
+\c putty -telnet -P 9696 host.name
+\c plink -telnet -P 9696 host.name
 
 (Note that this option is more useful in Plink than in PuTTY,
 because in PuTTY you can write \c{putty -telnet host.name 9696} in
@@ -576,8 +633,8 @@ PuTTY configuration box (see \k{config-ssh-prot}).
 \S2{using-cmdline-identity} \c{-i}: specify an SSH private key
 
 The \c{-i} option allows you to specify the name of a private key
-file which PuTTY will use to authenticate with the server. This
-option is only meaningful if you are using SSH.
+file in \c{*.PPK} format which PuTTY will use to authenticate with the
+server. This option is only meaningful if you are using SSH.
 
 For general information on public-key authentication, see \k{pubkey}.