o
3.8.3.14 -nc: make a remote network connection in place of a remote shell or command
o
3.8.3.15 -C: enable compression
o
3.8.3.16 -1 and -2: specify an SSH protocol version
o
3.8.3.17 -4 and -6: specify an Internet protocol version
o
3.8.3.18 -i: specify an SSH private key
o
3.8.3.19 -loghost: specify a logical host name
o
3.8.3.20 -hostkey: manually specify an expected host key
o
3.8.3.21 -pgpfp: display PGP key fingerprints
o
3.8.3.22 -sercfg: specify serial port configuration
o
3.8.3.23 -sessionlog, -sshlog, -sshrawlog: specify session logging
3.8.1 Starting a session from the command line
These options allow you to bypass the configuration window and launch straight into a session.
To start a connection to a server called host:
putty.exe [-ssh | -telnet | -rlogin | -raw] [user@]host
If this syntax is used, settings are taken from the Default Settings (see
section 4.1.2
); user overrides these settings if supplied.
Also, you can specify a protocol, which will override the default protocol (see
section 3.8.3.2
).
For telnet sessions, the following alternative syntax is supported (this makes PuTTY suitable for use as a URL handler for telnet URLs in web browsers):
putty.exe telnet://host[:port]/
To start a connection to a serial port, e.g. COM1:
putty.exe -serial com1
In order to start an existing saved session called sessionname, use the -load option (described in
section 3.8.3.1
).
putty.exe -load "session name"
3.8.2 -cleanup
If invoked with the -cleanup option, rather than running as normal, PuTTY will remove its registry entries and random seed file from the local machine (after confirming with the user).
Note that on multi-user systems, -cleanup only removes registry entries and files associated with the currently logged-in user.
3.8.3 Standard command-line options
PuTTY and its associated tools support a range of command-line options, most of which are consistent across all the tools. This section lists the available options in all tools. Options which are specific to a particular tool are covered in the chapter about that tool.
•
3.8.3.1 -load: load a saved session
•
3.8.3.2 Selecting a protocol: -ssh, -telnet, -rlogin, -raw -serial
•
3.8.3.3 -v: increase verbosity
•
3.8.3.4 -l: specify a login name
•
3.8.3.5 -L, -R and -D: set up port forwardings
•
3.8.3.6 -m: read a remote command or script from a file
•
3.8.3.7 -P: specify a port number
•
3.8.3.8 -pw: specify a password
•
3.8.3.9 -agent and -noagent: control use of Pageant for authentication
•
3.8.3.10 -A and -a: control agent forwarding
•
3.8.3.11 -X and -x: control X11 forwarding