Robert de Bath's implementation of ESC [ Z (backtab)
[sgt/putty] / doc / plink.but
CommitLineData
f5e8038f 1\versionid $Id: plink.but,v 1.5 2001/04/18 15:23:36 owen Exp $
bace5431 2
e5b0d077 3\C{plink} Using the command-line connection tool Plink
4
5\# Explain Plink
6
7\# Explain that Plink is probably not what you want if you want to
8\# run an interactive session in a Command Prompt window
9
10\# Explain that Plink is really for batch-file use, and that
11\# therefore it works best with public-key authentication; link to
12\# that chapter
13
14\# Give instructions on how to set up Plink with CVS
bace5431 15
eaebbdf8 16\i{Plink} (PuTTY Link), is a command-line connection tool similar to
17UNIX \c{ssh}. It is probably not what you want if you want to run an
bace5431 18interactive session in a console window.
19
20\H{plink-starting} Starting Plink
21
22Plink is a command line application. This means that you cannot just
23double-click on its icon to run it and instead you have to bring up a
24\i{console window}. With Windows 95, 98, and ME, this is called an
25\q{MS-DOS Prompt} and with Windows NT and 2000 it is called a
26\q{Command Prompt}. It should be available from the Programs section
27of your Start Menu.
28
29To start Plink it will need either to be on your \i{\c{PATH}} or in your
30current directory. To add the directory containing Plink to your
31\c{PATH} environment variable, type into the console window:
32
33\c set PATH C:\path\to\putty\directory;%PATH%
34
35This will only work for the lifetime of that particular console
36window. To set your \c{PATH} more permanently on Windows NT, use the
37Environment tab of the System Control Panel. On Windows 95, 98, and
38ME, you will need to edit your \c{AUTOEXEC.BAT} to include a \c{set}
39command like the one above.
40
41\H{plink-usage} Plink Usage
42
43Once you've got a console window to type into, you can just type
44\c{plink} on its own to bring up a usage message. This tells you the
45version of Plink you're using, and gives you a brief summary of how to
46use Plink:
47
48\c Z:\sysosd>plink
49\c PuTTY Link: command-line connection utility
50\c Release 0.50
51\c Usage: plink [options] [user@]host [command]
52\c Options:
53\c -v show verbose messages
54\c -ssh force use of ssh protocol
55\c -P port connect to specified port
56\c -pw passw login with specified password
57
58\S{plink-usage-basics} The basics
59
60\S{plink-usage-options} Options
61
62These are the command line options that Plink accepts.
63
7638530e 64\S2{plink-usage-options-v}\c{-v} show verbose messages
65
66By default, Plink only displays any password prompts and the output of
67the remote command. The \c{-v} option makes it print extra
68information about the connection being made, for example:
69
70\c Server version: SSH-1.5-OpenSSH-1.2.3
71\c We claim version: SSH-1.5-PuTTY
72\c Using SSH protocol version 1
73\c Received public keys
74\c Host key fingerprint is:
75\c 1023 e3:65:44:44:bd:b1:04:59:bc:e2:3d:a1:4d:09:ce:99
76\c Encrypted session key
77\c Using 3DES encryption
78\c Trying to enable encryption...
79\c Successfully started encryption
80\c Sent username "fred".
81\c Sent username "fred"
82\c fred@example.com's password:
83
84This information can be useful for diagnosing problems.
85
86\S2{plink-usage-options-ssh}\c{-ssh} force use of ssh protocol
87
88\S2{plink-usage-options-P}\c{-P port} connect to specified port
89
90\S2{plink-usage-options-pw}\c{-pw passw} login with specified password
91
92\H{plink-pubkey} Using public key authentication with Plink
bace5431 93
eaebbdf8 94\H{plink-batch} Using Plink in \i{batch files} and \i{scripts}
bace5431 95
eaebbdf8 96\H{plink-cvs} Using Plink with \i{CVS}
97
7638530e 98To use Plink with CVS, you need to set the environment variable
99\c{CVS_RSH} to point to Plink:
eaebbdf8 100
101\c set CVS_RSH=\path\to\plink.exe
7638530e 102
103You also need to arrange to be able to connect to a remote host
104without a password. To do this, either:
105
f5e8038f 106\b Run PuTTY, and create a PuTTY saved session (see \k{config-saving})
107with the protocol set to SSH (see \k{config-hostname}) and specifies
108your private key file (see \k{config-auth}). You will probably also
109want to specify a username to log in as (see \k{config-username}).
110You should then be able to run CVS as follows:
7638530e 111
112\c cvs -d :ext:user@sessionname:/path/to/repository co module
113
114If you specified a username in your saved session, you can just say:
115
116\c cvs -d :ext:sessionname:/path/to/repository co module
117
118Alternatively, you can use Pageant if Pageant is running (see
119\k{pageant}). To do this, you would:
120
121\b Ensure Pageant is running, and has your private key stored in it.
122
123\b Run CVS as follows:
124
eaebbdf8 125\c cvs -d :ext:user@hostname:/path/to/repository co module
126
7638530e 127\H{plink-wincvs} Using Plink with \i{WinCVS}
128
129Plink can also be used with WinCVS. Firstly, arrange for Plink to be
130able to connect to a remote host without a password. \k{plink-cvs}
131has instructions on this.
eaebbdf8 132
7638530e 133In WinCVS, bring up the \e{Preferences} dialogue box from the
134\e{Admin} menu, and switch to the \e{Ports} tab. Tick the box there
135labelled \e{Check for an alternate rsh name} and in the text entry
136field to the right enter the full path to \c{plink.exe}. Select
137\e{OK} on the \e{Preferences} dialogue box.
eaebbdf8 138
7638530e 139Next, select \e{Command Line} from the WinCVS \e{Admin} menu, and type
140a CVS command as in \k{plink-cvs}, for example:
141
142\c cvs -d :ext:user@hostname:/path/to/repository co module
eaebbdf8 143
7638530e 144Select the folder you want to check out to with the \e{Change Folder}
145button, and click \e{OK} to check out your module. Once you've got
146modules checked out, WinCVS will happily invoke plink from the GUI for
147CVS operations.
bace5431 148
149\H{plink-whatelse} Using Plink with... ?
150