\versionid $Id: plink.but,v 1.3 2001/02/07 11:20:15 owen Exp $ \C{plink} Using the command-line connection tool Plink \# Explain Plink \# Explain that Plink is probably not what you want if you want to \# run an interactive session in a Command Prompt window \# Explain that Plink is really for batch-file use, and that \# therefore it works best with public-key authentication; link to \# that chapter \# Give instructions on how to set up Plink with CVS \i{Plink} (PuTTY Link), is a command-line connection tool similar to UNIX \c{ssh}. It is probably not what you want if you want to run an interactive session in a console window. \H{plink-starting} Starting Plink Plink is a command line application. This means that you cannot just double-click on its icon to run it and instead you have to bring up a \i{console window}. With Windows 95, 98, and ME, this is called an \q{MS-DOS Prompt} and with Windows NT and 2000 it is called a \q{Command Prompt}. It should be available from the Programs section of your Start Menu. To start Plink it will need either to be on your \i{\c{PATH}} or in your current directory. To add the directory containing Plink to your \c{PATH} environment variable, type into the console window: \c set PATH C:\path\to\putty\directory;%PATH% This will only work for the lifetime of that particular console window. To set your \c{PATH} more permanently on Windows NT, use the Environment tab of the System Control Panel. On Windows 95, 98, and ME, you will need to edit your \c{AUTOEXEC.BAT} to include a \c{set} command like the one above. \H{plink-usage} Plink Usage Once you've got a console window to type into, you can just type \c{plink} on its own to bring up a usage message. This tells you the version of Plink you're using, and gives you a brief summary of how to use Plink: \c Z:\sysosd>plink \c PuTTY Link: command-line connection utility \c Release 0.50 \c Usage: plink [options] [user@]host [command] \c Options: \c -v show verbose messages \c -ssh force use of ssh protocol \c -P port connect to specified port \c -pw passw login with specified password \S{plink-usage-basics} The basics \S{plink-usage-options} Options These are the command line options that Plink accepts. \H{plink-pubkey} Public key authentication \H{plink-batch} Using Plink in \i{batch files} and \i{scripts} \H{plink-cvs} Using Plink with \i{CVS} To use Plink with CVS, you need to do something like the following: \c set CVS_RSH=\path\to\plink.exe \c cvs -d :ext:user@hostname:/path/to/repository co module This should work, provided the command \c{plink hostname -l user} works without requiring a password. You can arrange for that to be the case by: \b running Pageant (see \k{pageant}) and putting a valid RSA key in it \b using a saved session name in place of \c{hostname}, and having that saved session specify a valid RSA key. (If you do this, you can also leave out \c{user@}, provided you specify it in the saved session.) \H{plink-whatelse} Using Plink with... ?