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