Apparently Vista's printf-like functions don't support %n by default.
[u/mdw/putty] / doc / config.but
CommitLineData
39a938f7 1\define{versionidconfig} \versionid $Id$
8f1529bc 2
e5b0d077 3\C{config} Configuring PuTTY
4
421406a4 5This chapter describes all the \i{configuration options} in PuTTY.
55ba634a 6
7PuTTY is configured using the control panel that comes up before you
8start a session. Some options can also be changed in the middle of a
d60c975d 9session, by selecting \q{Change Settings} from the window menu.
55ba634a 10
11\H{config-session} The Session panel
12
13The Session configuration panel contains the basic options you need
14to specify in order to open a session at all, and also allows you to
15save your settings to be reloaded later.
16
421406a4 17\S{config-hostname} The \i{host name} section
55ba634a 18
70133c0e 19\cfg{winhelp-topic}{session.hostname}
20
55ba634a 21The top box on the Session panel, labelled \q{Specify your
22connection by host name}, contains the details that need to be
23filled in before PuTTY can open a session at all.
24
421406a4 25\b The \q{Host Name} box is where you type the name, or the \i{IP
26address}, of the server you want to connect to.
55ba634a 27
7374c779 28\b The \q{Connection type} radio buttons let you choose what type of
421406a4 29connection you want to make: a \I{raw TCP connections}raw
7374c779 30connection, a \i{Telnet} connection, an \i{Rlogin} connection, an
31\i{SSH} connection, or a connection to a local \i{serial line}. (See
32\k{which-one} for a summary of the differences between SSH, Telnet
33and rlogin; see \k{using-rawprot} for an explanation of \q{raw}
34connections; see \k{using-serial} for information about using a
35serial line.)
36
37\b The \q{Port} box lets you specify which \i{port number} on the
38server to connect to. If you select Telnet, Rlogin, or SSH, this box
39will be filled in automatically to the usual value, and you will
40only need to change it if you have an unusual server. If you select
41Raw mode, you will almost certainly need to fill in the \q{Port} box
42yourself.
43
44If you select \q{Serial} from the \q{Connection type} radio buttons,
45the \q{Host Name} and \q{Port} boxes are replaced by \q{Serial line}
46and \q{Speed}; see \k{config-serial} for more details of these.
55ba634a 47
421406a4 48\S{config-saving} \ii{Loading and storing saved sessions}
55ba634a 49
70133c0e 50\cfg{winhelp-topic}{session.saved}
51
55ba634a 52The next part of the Session configuration panel allows you to save
53your preferred PuTTY options so they will appear automatically the
54next time you start PuTTY. It also allows you to create \e{saved
55sessions}, which contain a full set of configuration options plus a
56host name and protocol. A saved session contains all the information
57PuTTY needs to start exactly the session you want.
58
59\b To save your default settings: first set up the settings the way
60you want them saved. Then come back to the Session panel. Select the
421406a4 61\q{\i{Default Settings}} entry in the saved sessions list, with a single
d60c975d 62click. Then press the \q{Save} button.
55ba634a 63
e0cff44d 64If there is a specific host you want to store the details of how to
65connect to, you should create a saved session, which will be
66separate from the Default Settings.
67
55ba634a 68\b To save a session: first go through the rest of the configuration
69box setting up all the options you want. Then come back to the
d60c975d 70Session panel. Enter a name for the saved session in the \q{Saved
55ba634a 71Sessions} input box. (The server name is often a good choice for a
d60c975d 72saved session name.) Then press the \q{Save} button. Your saved
55ba634a 73session name should now appear in the list box.
74
3dc431eb 75\lcont{
76You can also save settings in mid-session, from the \q{Change Settings}
77dialog. Settings changed since the start of the session will be saved
78with their current values; as well as settings changed through the
79dialog, this includes changes in window size, window title changes
80sent by the server, and so on.
81}
82
55ba634a 83\b To reload a saved session: single-click to select the session
d60c975d 84name in the list box, and then press the \q{Load} button. Your saved
55ba634a 85settings should all appear in the configuration panel.
86
87\b To modify a saved session: first load it as described above. Then
5dce67f7 88make the changes you want. Come back to the Session panel, and press
d60c975d 89the \q{Save} button. The new settings will be saved over the top of
3dc431eb 90the old ones.
5dce67f7 91
92\lcont{
93To save the new settings under a different name, you can enter the new
94name in the \q{Saved Sessions} box, or single-click to select a
95session name in the list box to overwrite that session. To save
96\q{Default Settings}, you must single-click the name before saving.
97}
55ba634a 98
99\b To start a saved session immediately: double-click on the session
100name in the list box.
101
102\b To delete a saved session: single-click to select the session
d60c975d 103name in the list box, and then press the \q{Delete} button.
55ba634a 104
105Each saved session is independent of the Default Settings
106configuration. If you change your preferences and update Default
107Settings, you must also update every saved session separately.
108
421406a4 109Saved sessions are stored in the \i{Registry}, at the location
d39eea69 110
111\c HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions
112
113If you need to store them in a file, you could try the method
114described in \k{config-file}.
115
421406a4 116\S{config-closeonexit} \q{\ii{Close Window} on Exit}
55ba634a 117
70133c0e 118\cfg{winhelp-topic}{session.coe}
119
add788fc 120Finally in the Session panel, there is an option labelled \q{Close
421406a4 121Window on Exit}. This controls whether the PuTTY \i{terminal window}
add788fc 122disappears as soon as the session inside it terminates. If you are
123likely to want to copy and paste text out of the session after it
5dce67f7 124has terminated, or restart the session, you should arrange for this
125option to be off.
add788fc 126
127\q{Close Window On Exit} has three settings. \q{Always} means always
128close the window on exit; \q{Never} means never close on exit
5dce67f7 129(always leave the window open, but \I{inactive window}inactive). The
130third setting, and the default one, is \q{Only on clean exit}. In this
131mode, a session which terminates normally will cause its window to
132close, but one which is aborted unexpectedly by network trouble or a
133confusing message from the server will leave the window up.
add788fc 134
135\H{config-logging} The Logging panel
136
70133c0e 137\cfg{winhelp-topic}{logging.main}
138
421406a4 139The Logging configuration panel allows you to save \i{log file}s of your
add788fc 140PuTTY sessions, for debugging, analysis or future reference.
141
142The main option is a radio-button set that specifies whether PuTTY
9711106b 143will log anything at all. The options are:
add788fc 144
9711106b 145\b \q{None}. This is the default option; in this mode PuTTY will not
146create a log file at all.
add788fc 147
9711106b 148\b \q{Printable output}. In this mode, a log file will be
add788fc 149created and written to, but only printable text will be saved into
150it. The various terminal control codes that are typically sent down
151an interactive session alongside the printable text will be omitted.
152This might be a useful mode if you want to read a log file in a text
153editor and hope to be able to make sense of it.
154
9711106b 155\b \q{All session output}. In this mode, \e{everything} sent by
add788fc 156the server into your terminal session is logged. If you view the log
157file in a text editor, therefore, you may well find it full of
158strange control characters. This is a particularly useful mode if
159you are experiencing problems with PuTTY's terminal handling: you
160can record everything that went to the terminal, so that someone
161else can replay the session later in slow motion and watch to see
162what went wrong.
163
9711106b 164\b \I{SSH packet log}\q{SSH packets}. In this mode (which is only used
165by SSH connections), the SSH message packets sent over the encrypted
166connection are written to the log file (as well as \i{Event Log}
167entries). You might need this to debug a network-level problem, or
168more likely to send to the PuTTY authors as part of a bug report.
169\e{BE WARNED} that if you log in using a password, the password can
170appear in the log file; see \k{config-logssh} for options that may
171help to remove sensitive material from the log file before you send it
172to anyone else.
173
174\b \q{SSH packets and raw data}. In this mode, as well as the
175decrypted packets (as in the previous mode), the \e{raw} (encrypted,
176compressed, etc) packets are \e{also} logged. This could be useful to
177diagnose corruption in transit. (The same caveats as the previous mode
178apply, of course.)
00db133f 179
bcc94f67 180Note that the non-SSH logging options (\q{Printable output} and
181\q{All session output}) only work with PuTTY proper; in programs
182without terminal emulation (such as Plink), they will have no effect,
183even if enabled via saved settings.
184
add788fc 185\S{config-logfilename} \q{Log file name}
186
70133c0e 187\cfg{winhelp-topic}{logging.filename}
188
add788fc 189In this edit box you enter the name of the file you want to log the
190session to. The \q{Browse} button will let you look around your file
191system to find the right place to put the file; or if you already
192know exactly where you want it to go, you can just type a pathname
193into the edit box.
194
195There are a few special features in this box. If you use the \c{&}
196character in the file name box, PuTTY will insert details of the
197current session in the name of the file it actually opens. The
198precise replacements it will do are:
199
200\b \c{&Y} will be replaced by the current year, as four digits.
201
202\b \c{&M} will be replaced by the current month, as two digits.
203
204\b \c{&D} will be replaced by the current day of the month, as two
205digits.
206
207\b \c{&T} will be replaced by the current time, as six digits
208(HHMMSS) with no punctuation.
209
210\b \c{&H} will be replaced by the host name you are connecting to.
211
212For example, if you enter the host name
213\c{c:\\puttylogs\\log-&h-&y&m&d-&t.dat}, you will end up with files looking
214like
215
216\c log-server1.example.com-20010528-110859.dat
217\c log-unixbox.somewhere.org-20010611-221001.dat
218
219\S{config-logfileexists} \q{What to do if the log file already exists}
220
70133c0e 221\cfg{winhelp-topic}{logging.exists}
222
add788fc 223This control allows you to specify what PuTTY should do if it tries
224to start writing to a log file and it finds the file already exists.
225You might want to automatically destroy the existing log file and
226start a new one with the same name. Alternatively, you might want to
227open the existing log file and add data to the \e{end} of it.
228Finally (the default option), you might not want to have any
229automatic behaviour, but to ask the user every time the problem
230comes up.
55ba634a 231
421406a4 232\S{config-logflush} \I{log file, flushing}\q{Flush log file frequently}
6d60c791 233
234\cfg{winhelp-topic}{logging.flush}
235
236This option allows you to control how frequently logged data is
237flushed to disc. By default, PuTTY will flush data as soon as it is
238displayed, so that if you view the log file while a session is still
239open, it will be up to date; and if the client system crashes, there's
240a greater chance that the data will be preserved.
241
242However, this can incur a performance penalty. If PuTTY is running
243slowly with logging enabled, you could try unchecking this option. Be
244warned that the log file may not always be up to date as a result
245(although it will of course be flushed when it is closed, for instance
246at the end of a session).
247
421406a4 248\S{config-logssh} Options specific to \i{SSH packet log}ging
9a10ecf4 249
250These options only apply if SSH packet data is being logged.
251
252The following options allow particularly sensitive portions of
253unencrypted packets to be automatically left out of the log file.
254They are only intended to deter casual nosiness; an attacker could
255glean a lot of useful information from even these obfuscated logs
256(e.g., length of password).
257
258\S2{config-logssh-omitpw} \q{Omit known password fields}
259
260\cfg{winhelp-topic}{logging.ssh.omitpassword}
261
9711106b 262When checked, decrypted password fields are removed from the log of
263transmitted packets. (This includes any user responses to
264challenge-response authentication methods such as
265\q{keyboard-interactive}.) This does not include X11 authentication
266data if using X11 forwarding.
9a10ecf4 267
268Note that this will only omit data that PuTTY \e{knows} to be a
269password. However, if you start another login session within your
270PuTTY session, for instance, any password used will appear in the
271clear in the packet log. The next option may be of use to protect
272against this.
273
274This option is enabled by default.
275
276\S2{config-logssh-omitdata} \q{Omit session data}
277
278\cfg{winhelp-topic}{logging.ssh.omitdata}
279
9711106b 280When checked, all decrypted \q{session data} is omitted; this is
281defined as data in terminal sessions and in forwarded channels (TCP,
282X11, and authentication agent). This will usually substantially reduce
283the size of the resulting log file.
9a10ecf4 284
285This option is disabled by default.
286
55ba634a 287\H{config-terminal} The Terminal panel
288
289The Terminal configuration panel allows you to control the behaviour
421406a4 290of PuTTY's \i{terminal emulation}.
55ba634a 291
292\S{config-autowrap} \q{Auto wrap mode initially on}
293
70133c0e 294\cfg{winhelp-topic}{terminal.autowrap}
295
421406a4 296\ii{Auto wrap mode} controls what happens when text printed in a PuTTY
55ba634a 297window reaches the right-hand edge of the window.
298
299With auto wrap mode on, if a long line of text reaches the
300right-hand edge, it will wrap over on to the next line so you can
301still see all the text. With auto wrap mode off, the cursor will
302stay at the right-hand edge of the screen, and all the characters in
303the line will be printed on top of each other.
304
305If you are running a full-screen application and you occasionally
306find the screen scrolling up when it looks as if it shouldn't, you
307could try turning this option off.
308
421406a4 309Auto wrap mode can be turned on and off by \i{control sequence}s sent by
64734920 310the server. This configuration option controls the \e{default}
311state, which will be restored when you reset the terminal (see
312\k{reset-terminal}). However, if you modify this option in
313mid-session using \q{Change Settings}, it will take effect
314immediately.
55ba634a 315
316\S{config-decom} \q{DEC Origin Mode initially on}
317
70133c0e 318\cfg{winhelp-topic}{terminal.decom}
319
421406a4 320\i{DEC Origin Mode} is a minor option which controls how PuTTY
321interprets cursor-position \i{control sequence}s sent by the server.
55ba634a 322
421406a4 323The server can send a control sequence that restricts the \i{scrolling
324region} of the display. For example, in an editor, the server might
55ba634a 325reserve a line at the top of the screen and a line at the bottom,
326and might send a control sequence that causes scrolling operations
327to affect only the remaining lines.
328
421406a4 329With DEC Origin Mode on, \i{cursor coordinates} are counted from the top
55ba634a 330of the scrolling region. With it turned off, cursor coordinates are
331counted from the top of the whole screen regardless of the scrolling
332region.
333
334It is unlikely you would need to change this option, but if you find
335a full-screen application is displaying pieces of text in what looks
336like the wrong part of the screen, you could try turning DEC Origin
337Mode on to see whether that helps.
338
2f8d6d43 339DEC Origin Mode can be turned on and off by control sequences sent
64734920 340by the server. This configuration option controls the \e{default}
341state, which will be restored when you reset the terminal (see
342\k{reset-terminal}). However, if you modify this option in
343mid-session using \q{Change Settings}, it will take effect
344immediately.
55ba634a 345
346\S{config-crlf} \q{Implicit CR in every LF}
347
70133c0e 348\cfg{winhelp-topic}{terminal.lfhascr}
349
421406a4 350Most servers send two control characters, \i{CR} and \i{LF}, to start a
351\i{new line} of the screen. The CR character makes the cursor return to the
55ba634a 352left-hand side of the screen. The LF character makes the cursor move
353one line down (and might make the screen scroll).
354
355Some servers only send LF, and expect the terminal to move the
356cursor over to the left automatically. If you come across a server
421406a4 357that does this, you will see a \I{stair-stepping}stepped effect on the
358screen, like this:
55ba634a 359
360\c First line of text
361\c Second line
362\c Third line
363
364If this happens to you, try enabling the \q{Implicit CR in every LF}
365option, and things might go back to normal:
366
367\c First line of text
368\c Second line
369\c Third line
370
7612f22f 371\S{config-lfcr} \q{Implicit LF in every CR}
372
373\cfg{winhelp-topic}{terminal.crhaslf}
374
375Most servers send two control characters, \i{CR} and \i{LF}, to start a
376\i{new line} of the screen. The CR character makes the cursor return to the
377left-hand side of the screen. The LF character makes the cursor move
378one line down (and might make the screen scroll).
379
380Some servers only send CR, and so the newly
381written line is overwritten by the following line. This option causes
382a line feed so that all lines are displayed.
383
421406a4 384\S{config-erase} \q{Use \i{background colour} to erase screen}
55ba634a 385
70133c0e 386\cfg{winhelp-topic}{terminal.bce}
387
55ba634a 388Not all terminals agree on what colour to turn the screen when the
421406a4 389server sends a \q{\i{clear screen}} sequence. Some terminals believe the
55ba634a 390screen should always be cleared to the \e{default} background
391colour. Others believe the screen should be cleared to whatever the
392server has selected as a background colour.
393
394There exist applications that expect both kinds of behaviour.
395Therefore, PuTTY can be configured to do either.
396
397With this option disabled, screen clearing is always done in the
398default background colour. With this option enabled, it is done in
399the \e{current} background colour.
400
421406a4 401Background-colour erase can be turned on and off by \i{control
402sequences} sent by the server. This configuration option controls the
64734920 403\e{default} state, which will be restored when you reset the
404terminal (see \k{reset-terminal}). However, if you modify this
405option in mid-session using \q{Change Settings}, it will take effect
406immediately.
2f8d6d43 407
421406a4 408\S{config-blink} \q{Enable \i{blinking text}}
55ba634a 409
70133c0e 410\cfg{winhelp-topic}{terminal.blink}
411
55ba634a 412The server can ask PuTTY to display text that blinks on and off.
413This is very distracting, so PuTTY allows you to turn blinking text
414off completely.
415
2f8d6d43 416When blinking text is disabled and the server attempts to make some
421406a4 417text blink, PuTTY will instead display the text with a \I{background
418colour, bright}bolded background colour.
2f8d6d43 419
421406a4 420Blinking text can be turned on and off by \i{control sequence}s sent by
64734920 421the server. This configuration option controls the \e{default}
422state, which will be restored when you reset the terminal (see
423\k{reset-terminal}). However, if you modify this option in
424mid-session using \q{Change Settings}, it will take effect
425immediately.
2f8d6d43 426
421406a4 427\S{config-answerback} \q{\ii{Answerback} to ^E}
a5a6cb30 428
70133c0e 429\cfg{winhelp-topic}{terminal.answerback}
430
a5a6cb30 431This option controls what PuTTY will send back to the server if the
421406a4 432server sends it the ^E \i{enquiry character}. Normally it just sends
a5a6cb30 433the string \q{PuTTY}.
434
2f8d6d43 435If you accidentally write the contents of a binary file to your
436terminal, you will probably find that it contains more than one ^E
437character, and as a result your next command line will probably read
438\q{PuTTYPuTTYPuTTY...} as if you had typed the answerback string
439multiple times at the keyboard. If you set the answerback string to
440be empty, this problem should go away, but doing so might cause
441other problems.
442
fa5d6e5e 443Note that this is \e{not} the feature of PuTTY which the server will
444typically use to determine your terminal type. That feature is the
e81024f9 445\q{\ii{Terminal-type} string} in the Connection panel; see
fa5d6e5e 446\k{config-termtype} for details.
447
808c1216 448You can include control characters in the answerback string using
449\c{^C} notation. (Use \c{^~} to get a literal \c{^}.)
450
421406a4 451\S{config-localecho} \q{\ii{Local echo}}
55ba634a 452
70133c0e 453\cfg{winhelp-topic}{terminal.localecho}
454
add788fc 455With local echo disabled, characters you type into the PuTTY window
456are not echoed in the window \e{by PuTTY}. They are simply sent to
421406a4 457the server. (The \e{server} might choose to \I{remote echo}echo them
458back to you; this can't be controlled from the PuTTY control panel.)
55ba634a 459
add788fc 460Some types of session need local echo, and many do not. In its
461default mode, PuTTY will automatically attempt to deduce whether or
462not local echo is appropriate for the session you are working in. If
463you find it has made the wrong decision, you can use this
464configuration option to override its choice: you can force local
465echo to be turned on, or force it to be turned off, instead of
466relying on the automatic detection.
55ba634a 467
421406a4 468\S{config-localedit} \q{\ii{Local line editing}}
55ba634a 469
70133c0e 470\cfg{winhelp-topic}{terminal.localedit}
471
add788fc 472Normally, every character you type into the PuTTY window is sent
473immediately to the server the moment you type it.
474
475If you enable local line editing, this changes. PuTTY will let you
476edit a whole line at a time locally, and the line will only be sent
477to the server when you press Return. If you make a mistake, you can
478use the Backspace key to correct it before you press Return, and the
479server will never see the mistake.
480
481Since it is hard to edit a line locally without being able to see
421406a4 482it, local line editing is mostly used in conjunction with \i{local echo}
add788fc 483(\k{config-localecho}). This makes it ideal for use in raw mode
421406a4 484\#{FIXME} or when connecting to \i{MUD}s or \i{talker}s. (Although some more
add788fc 485advanced MUDs do occasionally turn local line editing on and turn
486local echo off, in order to accept a password from the user.)
487
488Some types of session need local line editing, and many do not. In
489its default mode, PuTTY will automatically attempt to deduce whether
490or not local line editing is appropriate for the session you are
491working in. If you find it has made the wrong decision, you can use
492this configuration option to override its choice: you can force
493local line editing to be turned on, or force it to be turned off,
494instead of relying on the automatic detection.
55ba634a 495
421406a4 496\S{config-printing} \ii{Remote-controlled printing}
b44b307a 497
498\cfg{winhelp-topic}{terminal.printing}
499
500A lot of VT100-compatible terminals support printing under control
501of the remote server. PuTTY supports this feature as well, but it is
502turned off by default.
503
504To enable remote-controlled printing, choose a printer from the
505\q{Printer to send ANSI printer output to} drop-down list box. This
506should allow you to select from all the printers you have installed
507drivers for on your computer. Alternatively, you can type the
508network name of a networked printer (for example,
509\c{\\\\printserver\\printer1}) even if you haven't already
510installed a driver for it on your own machine.
511
512When the remote server attempts to print some data, PuTTY will send
513that data to the printer \e{raw} - without translating it,
514attempting to format it, or doing anything else to it. It is up to
515you to ensure your remote server knows what type of printer it is
516talking to.
517
518Since PuTTY sends data to the printer raw, it cannot offer options
519such as portrait versus landscape, print quality, or paper tray
520selection. All these things would be done by your PC printer driver
521(which PuTTY bypasses); if you need them done, you will have to find
522a way to configure your remote server to do them.
523
524To disable remote printing again, choose \q{None (printing
525disabled)} from the printer selection list. This is the default
526state.
527
55ba634a 528\H{config-keyboard} The Keyboard panel
529
1630bb61 530The Keyboard configuration panel allows you to control the behaviour
e81024f9 531of the \i{keyboard} in PuTTY. The correct state for many of these
532settings depends on what the server to which PuTTY is connecting
533expects. With a \i{Unix} server, this is likely to depend on the
534\i\c{termcap} or \i\c{terminfo} entry it uses, which in turn is likely to
535be controlled by the \q{\ii{Terminal-type} string} setting in the Connection
536panel; see \k{config-termtype} for details. If none of the settings here
537seems to help, you may find \k{faq-keyboard} to be useful.
1630bb61 538
421406a4 539\S{config-backspace} Changing the action of the \ii{Backspace key}
55ba634a 540
70133c0e 541\cfg{winhelp-topic}{keyboard.backspace}
542
1630bb61 543Some terminals believe that the Backspace key should send the same
421406a4 544thing to the server as \i{Control-H} (ASCII code 8). Other terminals
1630bb61 545believe that the Backspace key should send ASCII code 127 (usually
421406a4 546known as \i{Control-?}) so that it can be distinguished from Control-H.
1630bb61 547This option allows you to choose which code PuTTY generates when you
548press Backspace.
549
c6ccd5c2 550If you are connecting over SSH, PuTTY by default tells the server
551the value of this option (see \k{config-ttymodes}), so you may find
552that the Backspace key does the right thing either way. Similarly,
553if you are connecting to a \i{Unix} system, you will probably find that
421406a4 554the Unix \i\c{stty} command lets you configure which the server
c6ccd5c2 555expects to see, so again you might not need to change which one PuTTY
1630bb61 556generates. On other systems, the server's expectation might be fixed
557and you might have no choice but to configure PuTTY.
558
559If you do have the choice, we recommend configuring PuTTY to
560generate Control-? and configuring the server to expect it, because
561that allows applications such as \c{emacs} to use Control-H for
562help.
563
5dce67f7 564(Typing \i{Shift-Backspace} will cause PuTTY to send whichever code
565isn't configured here as the default.)
566
157a4a1c 567\S{config-homeend} Changing the action of the \i{Home and End keys}
55ba634a 568
70133c0e 569\cfg{winhelp-topic}{keyboard.homeend}
570
421406a4 571The Unix terminal emulator \i\c{rxvt} disagrees with the rest of the
1630bb61 572world about what character sequences should be sent to the server by
573the Home and End keys.
574
421406a4 575\i\c{xterm}, and other terminals, send \c{ESC [1~} for the Home key,
1630bb61 576and \c{ESC [4~} for the End key. \c{rxvt} sends \c{ESC [H} for the
577Home key and \c{ESC [Ow} for the End key.
578
579If you find an application on which the Home and End keys aren't
580working, you could try switching this option to see if it helps.
581
421406a4 582\S{config-funkeys} Changing the action of the \i{function keys} and
583\i{keypad}
55ba634a 584
70133c0e 585\cfg{winhelp-topic}{keyboard.funkeys}
586
1630bb61 587This option affects the function keys (F1 to F12) and the top row of
588the numeric keypad.
589
590\b In the default mode, labelled \c{ESC [n~}, the function keys
591generate sequences like \c{ESC [11~}, \c{ESC [12~} and so on. This
592matches the general behaviour of Digital's terminals.
593
594\b In Linux mode, F6 to F12 behave just like the default mode, but
595F1 to F5 generate \c{ESC [[A} through to \c{ESC [[E}. This mimics the
421406a4 596\i{Linux virtual console}.
1630bb61 597
421406a4 598\b In \I{xterm}Xterm R6 mode, F5 to F12 behave like the default mode, but F1
1630bb61 599to F4 generate \c{ESC OP} through to \c{ESC OS}, which are the
600sequences produced by the top row of the \e{keypad} on Digital's
601terminals.
602
421406a4 603\b In \i{VT400} mode, all the function keys behave like the default
1630bb61 604mode, but the actual top row of the numeric keypad generates \c{ESC
605OP} through to \c{ESC OS}.
606
421406a4 607\b In \i{VT100+} mode, the function keys generate \c{ESC OP} through to
350ee898 608\c{ESC O[}
609
421406a4 610\b In \i{SCO} mode, the function keys F1 to F12 generate \c{ESC [M}
350ee898 611through to \c{ESC [X}. Together with shift, they generate \c{ESC [Y}
612through to \c{ESC [j}. With control they generate \c{ESC [k} through
613to \c{ESC [v}, and with shift and control together they generate
614\c{ESC [w} through to \c{ESC [\{}.
615
1630bb61 616If you don't know what any of this means, you probably don't need to
617fiddle with it.
618
421406a4 619\S{config-appcursor} Controlling \i{Application Cursor Keys} mode
55ba634a 620
70133c0e 621\cfg{winhelp-topic}{keyboard.appcursor}
622
1630bb61 623Application Cursor Keys mode is a way for the server to change the
624control sequences sent by the arrow keys. In normal mode, the arrow
625keys send \c{ESC [A} through to \c{ESC [D}. In application mode,
626they send \c{ESC OA} through to \c{ESC OD}.
627
628Application Cursor Keys mode can be turned on and off by the server,
629depending on the application. PuTTY allows you to configure the
0d2086c5 630initial state.
631
632You can also disable application cursor keys mode completely, using
633the \q{Features} configuration panel; see
634\k{config-features-application}.
1630bb61 635
421406a4 636\S{config-appkeypad} Controlling \i{Application Keypad} mode
55ba634a 637
70133c0e 638\cfg{winhelp-topic}{keyboard.appkeypad}
639
1630bb61 640Application Keypad mode is a way for the server to change the
641behaviour of the numeric keypad.
642
643In normal mode, the keypad behaves like a normal Windows keypad:
421406a4 644with \i{NumLock} on, the number keys generate numbers, and with NumLock
1630bb61 645off they act like the arrow keys and Home, End etc.
646
647In application mode, all the keypad keys send special control
648sequences, \e{including} Num Lock. Num Lock stops behaving like Num
649Lock and becomes another function key.
650
651Depending on which version of Windows you run, you may find the Num
652Lock light still flashes on and off every time you press Num Lock,
653even when application mode is active and Num Lock is acting like a
654function key. This is unavoidable.
655
656Application keypad mode can be turned on and off by the server,
657depending on the application. PuTTY allows you to configure the
0d2086c5 658initial state.
659
660You can also disable application keypad mode completely, using the
661\q{Features} configuration panel; see
662\k{config-features-application}.
1630bb61 663
421406a4 664\S{config-nethack} Using \i{NetHack keypad mode}
55ba634a 665
70133c0e 666\cfg{winhelp-topic}{keyboard.nethack}
667
1630bb61 668PuTTY has a special mode for playing NetHack. You can enable it by
669selecting \q{NetHack} in the \q{Initial state of numeric keypad}
670control.
671
672In this mode, the numeric keypad keys 1-9 generate the NetHack
673movement commands (\cw{hjklyubn}). The 5 key generates the \c{.}
674command (do nothing).
675
a988ce30 676In addition, pressing Shift or Ctrl with the keypad keys generate
677the Shift- or Ctrl-keys you would expect (e.g. keypad-7 generates
678\cq{y}, so Shift-keypad-7 generates \cq{Y} and Ctrl-keypad-7
679generates Ctrl-Y); these commands tell NetHack to keep moving you in
680the same direction until you encounter something interesting.
1630bb61 681
421406a4 682For some reason, this feature only works properly when \i{Num Lock} is
1630bb61 683on. We don't know why.
684
421406a4 685\S{config-compose} Enabling a DEC-like \ii{Compose key}
55ba634a 686
70133c0e 687\cfg{winhelp-topic}{keyboard.compose}
688
1630bb61 689DEC terminals have a Compose key, which provides an easy-to-remember
421406a4 690way of typing \i{accented characters}. You press Compose and then type
1630bb61 691two more characters. The two characters are \q{combined} to produce
692an accented character. The choices of character are designed to be
693easy to remember; for example, composing \q{e} and \q{`} produces
694the \q{\u00e8{e-grave}} character.
695
421406a4 696If your keyboard has a Windows \i{Application key}, it acts as a Compose
697key in PuTTY. Alternatively, if you enable the \q{\i{AltGr} acts as
3b7825af 698Compose key} option, the AltGr key will become a Compose key.
1630bb61 699
421406a4 700\S{config-ctrlalt} \q{Control-Alt is different from \i{AltGr}}
b5752f1b 701
70133c0e 702\cfg{winhelp-topic}{keyboard.ctrlalt}
703
add788fc 704Some old keyboards do not have an AltGr key, which can make it
705difficult to type some characters. PuTTY can be configured to treat
706the key combination Ctrl + Left Alt the same way as the AltGr key.
b5752f1b 707
add788fc 708By default, this checkbox is checked, and the key combination Ctrl +
709Left Alt does something completely different. PuTTY's usual handling
710of the left Alt key is to prefix the Escape (Control-\cw{[})
711character to whatever character sequence the rest of the keypress
712would generate. For example, Alt-A generates Escape followed by
713\c{a}. So Alt-Ctrl-A would generate Escape, followed by Control-A.
b5752f1b 714
add788fc 715If you uncheck this box, Ctrl-Alt will become a synonym for AltGr,
716so you can use it to type extra graphic characters if your keyboard
717has any.
b5752f1b 718
3b7825af 719(However, Ctrl-Alt will never act as a Compose key, regardless of the
720setting of \q{AltGr acts as Compose key} described in
721\k{config-compose}.)
722
a5a6cb30 723\H{config-bell} The Bell panel
724
421406a4 725The Bell panel controls the \i{terminal bell} feature: the server's
a5a6cb30 726ability to cause PuTTY to beep at you.
727
728In the default configuration, when the server sends the character
421406a4 729with ASCII code 7 (Control-G), PuTTY will play the \i{Windows Default
730Beep} sound. This is not always what you want the terminal bell
a5a6cb30 731feature to do; the Bell panel allows you to configure alternative
732actions.
733
734\S{config-bellstyle} \q{Set the style of bell}
735
70133c0e 736\cfg{winhelp-topic}{bell.style}
737
a5a6cb30 738This control allows you to select various different actions to occur
739on a terminal bell:
740
421406a4 741\b Selecting \q{None} \I{terminal bell, disabling}disables the bell
742completely. In this mode, the server can send as many Control-G
743characters as it likes and nothing at all will happen.
a5a6cb30 744
fe8abbf4 745\b \q{Make default system alert sound} is the default setting. It
746causes the Windows \q{Default Beep} sound to be played. To change
747what this sound is, or to test it if nothing seems to be happening,
748use the Sound configurer in the Windows Control Panel.
749
421406a4 750\b \q{\ii{Visual bell}} is a silent alternative to a beeping computer. In
fe8abbf4 751this mode, when the server sends a Control-G, the whole PuTTY window
752will flash white for a fraction of a second.
a5a6cb30 753
421406a4 754\b \q{Beep using the \i{PC speaker}} is self-explanatory.
cfe9ce14 755
421406a4 756\b \q{Play a custom \i{sound file}} allows you to specify a particular
a5a6cb30 757sound file to be used by PuTTY alone, or even by a particular
758individual PuTTY session. This allows you to distinguish your PuTTY
759beeps from any other beeps on the system. If you select this option,
760you will also need to enter the name of your sound file in the edit
761control \q{Custom sound file to play as a bell}.
762
421406a4 763\S{config-belltaskbar} \q{\ii{Taskbar}/\I{window caption}caption
764indication on bell}
a5a6cb30 765
70133c0e 766\cfg{winhelp-topic}{bell.taskbar}
767
a5a6cb30 768This feature controls what happens to the PuTTY window's entry in
769the Windows Taskbar if a bell occurs while the window does not have
770the input focus.
771
772In the default state (\q{Disabled}) nothing unusual happens.
773
774If you select \q{Steady}, then when a bell occurs and the window is
775not in focus, the window's Taskbar entry and its title bar will
776change colour to let you know that PuTTY session is asking for your
777attention. The change of colour will persist until you select the
778window, so you can leave several PuTTY windows minimised in your
779terminal, go away from your keyboard, and be sure not to have missed
780any important beeps when you get back.
781
782\q{Flashing} is even more eye-catching: the Taskbar entry will
783continuously flash on and off until you select the window.
784
421406a4 785\S{config-bellovl} \q{Control the \i{bell overload} behaviour}
a5a6cb30 786
70133c0e 787\cfg{winhelp-topic}{bell.overload}
788
a5a6cb30 789A common user error in a terminal session is to accidentally run the
790Unix command \c{cat} (or equivalent) on an inappropriate file type,
791such as an executable, image file, or ZIP file. This produces a huge
792stream of non-text characters sent to the terminal, which typically
793includes a lot of bell characters. As a result of this the terminal
794often doesn't stop beeping for ten minutes, and everybody else in
795the office gets annoyed.
796
797To try to avoid this behaviour, or any other cause of excessive
798beeping, PuTTY includes a bell overload management feature. In the
799default configuration, receiving more than five bell characters in a
800two-second period will cause the overload feature to activate. Once
421406a4 801the overload feature is active, further bells will \I{terminal bell,
802disabling} have no effect at all, so the rest of your binary file
803will be sent to the screen in silence. After a period of five seconds
804during which no further bells are received, the overload feature will
805turn itself off again and bells will be re-enabled.
a5a6cb30 806
807If you want this feature completely disabled, you can turn it off
808using the checkbox \q{Bell is temporarily disabled when over-used}.
809
810Alternatively, if you like the bell overload feature but don't agree
811with the settings, you can configure the details: how many bells
812constitute an overload, how short a time period they have to arrive
813in to do so, and how much silent time is required before the
814overload feature will deactivate itself.
815
2cb50250 816Bell overload mode is always deactivated by any keypress in the
817terminal. This means it can respond to large unexpected streams of
818data, but does not interfere with ordinary command-line activities
819that generate beeps (such as filename completion).
820
0d2086c5 821\H{config-features} The Features panel
822
421406a4 823PuTTY's \i{terminal emulation} is very highly featured, and can do a lot
0d2086c5 824of things under remote server control. Some of these features can
825cause problems due to buggy or strangely configured server
826applications.
827
828The Features configuration panel allows you to disable some of
829PuTTY's more advanced terminal features, in case they cause trouble.
830
831\S{config-features-application} Disabling application keypad and cursor keys
832
833\cfg{winhelp-topic}{features.application}
834
421406a4 835\I{Application Keypad}Application keypad mode (see
836\k{config-appkeypad}) and \I{Application Cursor Keys}application
0d2086c5 837cursor keys mode (see \k{config-appcursor}) alter the behaviour of
838the keypad and cursor keys. Some applications enable these modes but
839then do not deal correctly with the modified keys. You can force
840these modes to be permanently disabled no matter what the server
841tries to do.
842
421406a4 843\S{config-features-mouse} Disabling \cw{xterm}-style \i{mouse reporting}
c0d36a72 844
845\cfg{winhelp-topic}{features.mouse}
846
421406a4 847PuTTY allows the server to send \i{control codes} that let it take over
848the mouse and use it for purposes other than \i{copy and paste}.
c0d36a72 849Applications which use this feature include the text-mode web
421406a4 850browser \i\c{links}, the Usenet newsreader \i\c{trn} version 4, and the
851file manager \i\c{mc} (Midnight Commander).
c0d36a72 852
853If you find this feature inconvenient, you can disable it using the
854\q{Disable xterm-style mouse reporting} control. With this box
855ticked, the mouse will \e{always} do copy and paste in the normal
856way.
857
858Note that even if the application takes over the mouse, you can
859still manage PuTTY's copy and paste by holding down the Shift key
860while you select and paste, unless you have deliberately turned this
861feature off (see \k{config-mouseshift}).
862
421406a4 863\S{config-features-resize} Disabling remote \i{terminal resizing}
0d2086c5 864
865\cfg{winhelp-topic}{features.resize}
866
867PuTTY has the ability to change the terminal's size and position in
868response to commands from the server. If you find PuTTY is doing
869this unexpectedly or inconveniently, you can tell PuTTY not to
870respond to those server commands.
871
421406a4 872\S{config-features-altscreen} Disabling switching to the \i{alternate screen}
0d2086c5 873
874\cfg{winhelp-topic}{features.altscreen}
875
876Many terminals, including PuTTY, support an \q{alternate screen}.
877This is the same size as the ordinary terminal screen, but separate.
878Typically a screen-based program such as a text editor might switch
879the terminal to the alternate screen before starting up. Then at the
880end of the run, it switches back to the primary screen, and you see
881the screen contents just as they were before starting the editor.
882
883Some people prefer this not to happen. If you want your editor to
884run in the same screen as the rest of your terminal activity, you
885can disable the alternate screen feature completely.
886
421406a4 887\S{config-features-retitle} Disabling remote \i{window title} changing
0d2086c5 888
889\cfg{winhelp-topic}{features.retitle}
890
891PuTTY has the ability to change the window title in response to
892commands from the server. If you find PuTTY is doing this
893unexpectedly or inconveniently, you can tell PuTTY not to respond to
894those server commands.
895
e65096f2 896\S{config-features-qtitle} Response to remote \i{window title} querying
7fcdebd3 897
898\cfg{winhelp-topic}{features.qtitle}
899
900PuTTY can optionally provide the xterm service of allowing server
901applications to find out the local window title. This feature is
902disabled by default, but you can turn it on if you really want it.
903
421406a4 904NOTE that this feature is a \e{potential \i{security hazard}}. If a
7fcdebd3 905malicious application can write data to your terminal (for example,
906if you merely \c{cat} a file owned by someone else on the server
907machine), it can change your window title (unless you have disabled
908this as mentioned in \k{config-features-retitle}) and then use this
909service to have the new window title sent back to the server as if
910typed at the keyboard. This allows an attacker to fake keypresses
911and potentially cause your server-side applications to do things you
912didn't want. Therefore this feature is disabled by default, and we
e65096f2 913recommend you do not set it to \q{Window title} unless you \e{really}
914know what you are doing.
915
916There are three settings for this option:
917
918\dt \q{None}
919
920\dd PuTTY makes no response whatsoever to the relevant escape
921sequence. This may upset server-side software that is expecting some
922sort of response.
923
924\dt \q{Empty string}
925
926\dd PuTTY makes a well-formed response, but leaves it blank. Thus,
927server-side software that expects a response is kept happy, but an
928attacker cannot influence the response string. This is probably the
929setting you want if you have no better ideas.
930
931\dt \q{Window title}
932
933\dd PuTTY responds with the actual window title. This is dangerous for
934the reasons described above.
7fcdebd3 935
421406a4 936\S{config-features-dbackspace} Disabling \i{destructive backspace}
0d2086c5 937
938\cfg{winhelp-topic}{features.dbackspace}
939
940Normally, when PuTTY receives character 127 (^?) from the server, it
941will perform a \q{destructive backspace}: move the cursor one space
942left and delete the character under it. This can apparently cause
943problems in some applications, so PuTTY provides the ability to
944configure character 127 to perform a normal backspace (without
945deleting a character) instead.
946
421406a4 947\S{config-features-charset} Disabling remote \i{character set}
0d2086c5 948configuration
949
950\cfg{winhelp-topic}{features.charset}
951
952PuTTY has the ability to change its character set configuration in
953response to commands from the server. Some programs send these
421406a4 954commands unexpectedly or inconveniently. In particular, \I{BitchX} (an
0d2086c5 955IRC client) seems to have a habit of reconfiguring the character set
956to something other than the user intended.
957
958If you find that accented characters are not showing up the way you
959expect them to, particularly if you're running BitchX, you could try
960disabling the remote character set configuration commands.
961
421406a4 962\S{config-features-shaping} Disabling \i{Arabic text shaping}
f0fccd51 963
964\cfg{winhelp-topic}{features.arabicshaping}
965
966PuTTY supports shaping of Arabic text, which means that if your
421406a4 967server sends text written in the basic \i{Unicode} Arabic alphabet then
f0fccd51 968it will convert it to the correct display forms before printing it
969on the screen.
970
971If you are using full-screen software which was not expecting this
972to happen (especially if you are not an Arabic speaker and you
973unexpectedly find yourself dealing with Arabic text files in
974applications which are not Arabic-aware), you might find that the
421406a4 975\i{display becomes corrupted}. By ticking this box, you can disable
f0fccd51 976Arabic text shaping so that PuTTY displays precisely the characters
977it is told to display.
978
979You may also find you need to disable bidirectional text display;
34ef39bd 980see \k{config-features-bidi}.
f0fccd51 981
421406a4 982\S{config-features-bidi} Disabling \i{bidirectional text} display
f0fccd51 983
984\cfg{winhelp-topic}{features.bidi}
985
986PuTTY supports bidirectional text display, which means that if your
987server sends text written in a language which is usually displayed
421406a4 988from right to left (such as \i{Arabic} or \i{Hebrew}) then PuTTY will
f0fccd51 989automatically flip it round so that it is displayed in the right
990direction on the screen.
991
992If you are using full-screen software which was not expecting this
993to happen (especially if you are not an Arabic speaker and you
994unexpectedly find yourself dealing with Arabic text files in
995applications which are not Arabic-aware), you might find that the
421406a4 996\i{display becomes corrupted}. By ticking this box, you can disable
f0fccd51 997bidirectional text display, so that PuTTY displays text from left to
998right in all situations.
999
1000You may also find you need to disable Arabic text shaping;
34ef39bd 1001see \k{config-features-shaping}.
f0fccd51 1002
55ba634a 1003\H{config-window} The Window panel
1004
1630bb61 1005The Window configuration panel allows you to control aspects of the
421406a4 1006\i{PuTTY window}.
1630bb61 1007
421406a4 1008\S{config-winsize} Setting the \I{window size}size of the PuTTY window
55ba634a 1009
70133c0e 1010\cfg{winhelp-topic}{window.size}
1011
b8e45023 1012The \q{\ii{Columns}} and \q{\ii{Rows}} boxes let you set the PuTTY
421406a4 1013window to a precise size. Of course you can also \I{window resizing}drag
1014the window to a new size while a session is running.
1630bb61 1015
a5a6cb30 1016\S{config-winsizelock} What to do when the window is resized
add788fc 1017
70133c0e 1018\cfg{winhelp-topic}{window.resize}
1019
add788fc 1020These options allow you to control what happens when the user tries
421406a4 1021to \I{window resizing}resize the PuTTY window using its window furniture.
add788fc 1022
5dce67f7 1023There are four options here:
add788fc 1024
5dce67f7 1025\b \q{Change the number of rows and columns}: the font size will not
1026change. (This is the default.)
add788fc 1027
5dce67f7 1028\b \q{Change the size of the font}: the number of rows and columns in
421406a4 1029the terminal will stay the same, and the \i{font size} will change.
add788fc 1030
5dce67f7 1031\b \q{Change font size when maximised}: when the window is resized,
1032the number of rows and columns will change, \e{except} when the window
421406a4 1033is \i{maximise}d (or restored), when the font size will change.
a5a6cb30 1034
5dce67f7 1035\b \q{Forbid resizing completely}: the terminal will refuse to be
1036resized at all.
1630bb61 1037
421406a4 1038\S{config-scrollback} Controlling \i{scrollback}
55ba634a 1039
70133c0e 1040\cfg{winhelp-topic}{window.scrollback}
1041
fc5a8711 1042These options let you configure the way PuTTY keeps text after it
1043scrolls off the top of the screen (see \k{using-scrollback}).
1630bb61 1044
1045The \q{Lines of scrollback} box lets you configure how many lines of
a5a6cb30 1046text PuTTY keeps. The \q{Display scrollbar} options allow you to
421406a4 1047hide the \i{scrollbar} (although you can still view the scrollback using
01fe3d80 1048the keyboard as described in \k{using-scrollback}). You can separately
421406a4 1049configure whether the scrollbar is shown in \i{full-screen} mode and in
01fe3d80 1050normal modes.
1630bb61 1051
1052If you are viewing part of the scrollback when the server sends more
1053text to PuTTY, the screen will revert to showing the current
1054terminal contents. You can disable this behaviour by turning off
1055\q{Reset scrollback on display activity}. You can also make the
1056screen revert when you press a key, by turning on \q{Reset
1057scrollback on keypress}.
1058
ec3f19be 1059\S{config-erasetoscrollback} \q{Push erased text into scrollback}
876e5d5e 1060
1061\cfg{winhelp-topic}{window.erased}
1062
1063When this option is enabled, the contents of the terminal screen
1064will be pushed into the scrollback when a server-side application
1065clears the screen, so that your scrollback will contain a better
1066record of what was on your screen in the past.
1067
421406a4 1068If the application switches to the \i{alternate screen} (see
876e5d5e 1069\k{config-features-altscreen} for more about this), then the
1070contents of the primary screen will be visible in the scrollback
1071until the application switches back again.
1072
1073This option is enabled by default.
1074
55ba634a 1075\H{config-appearance} The Appearance panel
1076
1630bb61 1077The Appearance configuration panel allows you to control aspects of
421406a4 1078the appearance of \I{PuTTY window}PuTTY's window.
1630bb61 1079
421406a4 1080\S{config-cursor} Controlling the appearance of the \i{cursor}
55ba634a 1081
70133c0e 1082\cfg{winhelp-topic}{appearance.cursor}
1083
26c8f51a 1084The \q{Cursor appearance} option lets you configure the cursor to be
1085a block, an underline, or a vertical line. A block cursor becomes an
1086empty box when the window loses focus; an underline or a vertical
1087line becomes dotted.
1088
421406a4 1089The \q{\ii{Cursor blinks}} option makes the cursor blink on and off. This
26c8f51a 1090works in any of the cursor modes.
55ba634a 1091
421406a4 1092\S{config-font} Controlling the \i{font} used in the terminal window
55ba634a 1093
70133c0e 1094\cfg{winhelp-topic}{appearance.font}
1095
421406a4 1096This option allows you to choose what font, in what \I{font size}size,
1097the PuTTY terminal window uses to display the text in the session. You
1098will be offered a choice from all the fixed-width fonts installed on the
1099system. (VT100-style terminal handling can only deal with fixed-width
1100fonts.)
26c8f51a 1101
421406a4 1102\S{config-mouseptr} \q{Hide \i{mouse pointer} when typing in window}
add788fc 1103
70133c0e 1104\cfg{winhelp-topic}{appearance.hidemouse}
1105
add788fc 1106If you enable this option, the mouse pointer will disappear if the
1107PuTTY window is selected and you press a key. This way, it will not
1108obscure any of the text in the window while you work in your
1109session. As soon as you move the mouse, the pointer will reappear.
1110
1111This option is disabled by default, so the mouse pointer remains
1112visible at all times.
1113
421406a4 1114\S{config-winborder} Controlling the \i{window border}
add788fc 1115
70133c0e 1116\cfg{winhelp-topic}{appearance.border}
1117
add788fc 1118PuTTY allows you to configure the appearance of the window border to
1119some extent.
1120
1121The checkbox marked \q{Sunken-edge border} changes the appearance of
1122the window border to something more like a DOS box: the inside edge
1123of the border is highlighted as if it sank down to meet the surface
1124inside the window. This makes the border a little bit thicker as
1125well. It's hard to describe well. Try it and see if you like it.
1126
1127You can also configure a completely blank gap between the text in
1128the window and the border, using the \q{Gap between text and window
1129edge} control. By default this is set at one pixel. You can reduce
1130it to zero, or increase it further.
1131
a5a6cb30 1132\H{config-behaviour} The Behaviour panel
1133
1134The Behaviour configuration panel allows you to control aspects of
421406a4 1135the behaviour of \I{PuTTY window}PuTTY's window.
a5a6cb30 1136
421406a4 1137\S{config-title} Controlling the \i{window title}
fe8abbf4 1138
1139\cfg{winhelp-topic}{appearance.title}
1140
1141The \q{Window title} edit box allows you to set the title of the
421406a4 1142PuTTY window. By default the window title will contain the \i{host name}
fe8abbf4 1143followed by \q{PuTTY}, for example \c{server1.example.com - PuTTY}.
1144If you want a different window title, this is where to set it.
1145
421406a4 1146PuTTY allows the server to send \c{xterm} \i{control sequence}s which
bc0bbee2 1147modify the title of the window in mid-session (unless this is disabled -
1148see \k{config-features-retitle}); the title string set here
1149is therefore only the \e{initial} window title.
1150
421406a4 1151As well as the \e{window} title, there is also an \c{xterm}
1152sequence to modify the \I{icon title}title of the window's \e{icon}.
fe8abbf4 1153This makes sense in a windowing system where the window becomes an
1154icon when minimised, such as Windows 3.1 or most X Window System
1155setups; but in the Windows 95-like user interface it isn't as
1156applicable.
1157
1158By default, PuTTY only uses the server-supplied \e{window} title, and
1159ignores the icon title entirely. If for some reason you want to see
1160both titles, check the box marked \q{Separate window and icon titles}.
421406a4 1161If you do this, PuTTY's window title and Taskbar \I{window caption}caption will
1162change into the server-supplied icon title if you \i{minimise} the PuTTY
fe8abbf4 1163window, and change back to the server-supplied window title if you
1164restore it. (If the server has not bothered to supply a window or
1165icon title, none of this will happen.)
1166
421406a4 1167\S{config-warnonclose} \q{Warn before \i{closing window}}
a5a6cb30 1168
70133c0e 1169\cfg{winhelp-topic}{behaviour.closewarn}
1170
421406a4 1171If you press the \i{Close button} in a PuTTY window that contains a
a5a6cb30 1172running session, PuTTY will put up a warning window asking if you
1173really meant to close the window. A window whose session has already
1174terminated can always be closed without a warning.
1175
1176If you want to be able to close a window quickly, you can disable
1177the \q{Warn before closing window} option.
1178
421406a4 1179\S{config-altf4} \q{Window closes on \i{ALT-F4}}
a5a6cb30 1180
70133c0e 1181\cfg{winhelp-topic}{behaviour.altf4}
1182
421406a4 1183By default, pressing ALT-F4 causes the \I{closing window}window to
1184close (or a warning box to appear; see \k{config-warnonclose}). If you
1185disable the \q{Window closes on ALT-F4} option, then pressing ALT-F4
1186will simply send a key sequence to the server.
a5a6cb30 1187
421406a4 1188\S{config-altspace} \q{\ii{System menu} appears on \i{ALT-Space}}
a5a6cb30 1189
70133c0e 1190\cfg{winhelp-topic}{behaviour.altspace}
1191
a5a6cb30 1192If this option is enabled, then pressing ALT-Space will bring up the
1193PuTTY window's menu, like clicking on the top left corner. If it is
1194disabled, then pressing ALT-Space will just send \c{ESC SPACE} to
1195the server.
1196
421406a4 1197Some \i{accessibility} programs for Windows may need this option
a5a6cb30 1198enabling to be able to control PuTTY's window successfully. For
421406a4 1199instance, \i{Dragon NaturallySpeaking} requires it both to open the
a5a6cb30 1200system menu via voice, and to close, minimise, maximise and restore
1201the window.
1202
421406a4 1203\S{config-altonly} \q{\ii{System menu} appears on \i{Alt} alone}
a5a6cb30 1204
70133c0e 1205\cfg{winhelp-topic}{behaviour.altonly}
1206
a5a6cb30 1207If this option is enabled, then pressing and releasing ALT will
1208bring up the PuTTY window's menu, like clicking on the top left
1209corner. If it is disabled, then pressing and releasing ALT will have
1210no effect.
1211
421406a4 1212\S{config-alwaysontop} \q{Ensure window is \i{always on top}}
a5a6cb30 1213
70133c0e 1214\cfg{winhelp-topic}{behaviour.alwaysontop}
1215
a5a6cb30 1216If this option is enabled, the PuTTY window will stay on top of all
1217other windows.
1218
421406a4 1219\S{config-fullscreen} \q{\ii{Full screen} on Alt-Enter}
a5a6cb30 1220
70133c0e 1221\cfg{winhelp-topic}{behaviour.altenter}
1222
a5a6cb30 1223If this option is enabled, then pressing Alt-Enter will cause the
2f8d6d43 1224PuTTY window to become full-screen. Pressing Alt-Enter again will
1225restore the previous window size.
1226
421406a4 1227The full-screen feature is also available from the \ii{System menu}, even
2f8d6d43 1228when it is configured not to be available on the Alt-Enter key. See
1229\k{using-fullscreen}.
a5a6cb30 1230
55ba634a 1231\H{config-translation} The Translation panel
1232
1630bb61 1233The Translation configuration panel allows you to control the
421406a4 1234translation between the \i{character set} understood by the server and
1630bb61 1235the character set understood by PuTTY.
1236
add788fc 1237\S{config-charset} Controlling character set translation
1238
70133c0e 1239\cfg{winhelp-topic}{translation.codepage}
1240
add788fc 1241During an interactive session, PuTTY receives a stream of 8-bit
1242bytes from the server, and in order to display them on the screen it
1243needs to know what character set to interpret them in.
1244
1245There are a lot of character sets to choose from. The \q{Received
1246data assumed to be in which character set} option lets you select
1247one. By default PuTTY will attempt to choose a character set that is
421406a4 1248right for your \i{locale} as reported by Windows; if it gets it wrong,
add788fc 1249you can select a different one using this control.
1250
1251A few notable character sets are:
1252
421406a4 1253\b The \i{ISO-8859} series are all standard character sets that include
add788fc 1254various accented characters appropriate for different sets of
1255languages.
55ba634a 1256
421406a4 1257\b The \i{Win125x} series are defined by Microsoft, for similar
add788fc 1258purposes. In particular Win1252 is almost equivalent to ISO-8859-1,
1259but contains a few extra characters such as matched quotes and the
1260Euro symbol.
55ba634a 1261
add788fc 1262\b If you want the old IBM PC character set with block graphics and
421406a4 1263line-drawing characters, you can select \q{\i{CP437}}.
add788fc 1264
421406a4 1265\b PuTTY also supports \i{Unicode} mode, in which the data coming from
1266the server is interpreted as being in the \i{UTF-8} encoding of Unicode.
add788fc 1267If you select \q{UTF-8} as a character set you can use this mode.
1268Not all server-side applications will support it.
1269
421406a4 1270If you need support for a numeric \i{code page} which is not listed in
d8262877 1271the drop-down list, such as code page 866, then you can try entering
421406a4 1272its name manually (\c{\i{CP866}} for example) in the list box. If the
d8262877 1273underlying version of Windows has the appropriate translation table
1274installed, PuTTY will use it.
6c8727b2 1275
421406a4 1276\S{config-cjk-ambig-wide} \q{Treat \i{CJK} ambiguous characters as wide}
74790953 1277
1278\cfg{winhelp-topic}{translation.cjkambigwide}
1279
1280There are \I{East Asian Ambiguous characters}some Unicode characters
421406a4 1281whose \I{character width}width is not well-defined. In most contexts, such
1282characters should be treated as single-width for the purposes of \I{wrapping,
1283terminal}wrapping and so on; however, in some CJK contexts, they are better
1284treated as double-width for historical reasons, and some server-side
1285applications may expect them to be displayed as such. Setting this option
1286will cause PuTTY to take the double-width interpretation.
74790953 1287
1288If you use legacy CJK applications, and you find your lines are
1289wrapping in the wrong places, or you are having other display
1290problems, you might want to play with this setting.
1291
421406a4 1292This option only has any effect in \i{UTF-8} mode (see \k{config-charset}).
74790953 1293
421406a4 1294\S{config-cyr} \q{\i{Caps Lock} acts as \i{Cyrillic} switch}
add788fc 1295
70133c0e 1296\cfg{winhelp-topic}{translation.cyrillic}
1297
add788fc 1298This feature allows you to switch between a US/UK keyboard layout
1299and a Cyrillic keyboard layout by using the Caps Lock key, if you
421406a4 1300need to type (for example) \i{Russian} and English side by side in the
add788fc 1301same document.
1302
1303Currently this feature is not expected to work properly if your
1304native keyboard layout is not US or UK.
1305
421406a4 1306\S{config-linedraw} Controlling display of \i{line-drawing characters}
add788fc 1307
70133c0e 1308\cfg{winhelp-topic}{translation.linedraw}
1309
421406a4 1310VT100-series terminals allow the server to send \i{control sequence}s that
f80d4744 1311shift temporarily into a separate character set for drawing simple
1312lines and boxes. However, there are a variety of ways in which PuTTY
1313can attempt to find appropriate characters, and the right one to use
421406a4 1314depends on the locally configured \i{font}. In general you should probably
f80d4744 1315try lots of options until you find one that your particular font
1316supports.
1317
1318\b \q{Use Unicode line drawing code points} tries to use the box
421406a4 1319characters that are present in \i{Unicode}. For good Unicode-supporting
f80d4744 1320fonts this is probably the most reliable and functional option.
1321
1322\b \q{Poor man's line drawing} assumes that the font \e{cannot}
1323generate the line and box characters at all, so it will use the
1324\c{+}, \c{-} and \c{|} characters to draw approximations to boxes.
1325You should use this option if none of the other options works.
add788fc 1326
1327\b \q{Font has XWindows encoding} is for use with fonts that have a
1328special encoding, where the lowest 32 character positions (below the
1329ASCII printable range) contain the line-drawing characters. This is
1330unlikely to be the case with any standard Windows font; it will
1331probably only apply to custom-built fonts or fonts that have been
1332automatically converted from the X Window System.
1333
1334\b \q{Use font in both ANSI and OEM modes} tries to use the same
1335font in two different character sets, to obtain a wider range of
1336characters. This doesn't always work; some fonts claim to be a
1337different size depending on which character set you try to use.
1338
1339\b \q{Use font in OEM mode only} is more reliable than that, but can
1340miss out other characters from the main character set.
1341
421406a4 1342\S{config-linedrawpaste} Controlling \i{copy and paste} of line drawing
add788fc 1343characters
1344
70133c0e 1345\cfg{winhelp-topic}{selection.linedraw}
1346
add788fc 1347By default, when you copy and paste a piece of the PuTTY screen that
931e13e1 1348contains VT100 line and box drawing characters, PuTTY will paste
421406a4 1349them in the form they appear on the screen: either \i{Unicode} line
931e13e1 1350drawing code points, or the \q{poor man's} line-drawing characters
00381fc7 1351\c{+}, \c{-} and \c{|}. The checkbox \q{Copy and paste VT100 line
1352drawing chars as lqqqk} disables this feature, so line-drawing
421406a4 1353characters will be pasted as the \i{ASCII} characters that were printed
00381fc7 1354to produce them. This will typically mean they come out mostly as
1355\c{q} and \c{x}, with a scattering of \c{jklmntuvw} at the corners.
1356This might be useful if you were trying to recreate the same box
1357layout in another program, for example.
931e13e1 1358
1359Note that this option only applies to line-drawing characters which
1360\e{were} printed by using the VT100 mechanism. Line-drawing
f80d4744 1361characters that were received as Unicode code points will paste as
1362Unicode always.
add788fc 1363
00381fc7 1364\H{config-selection} The Selection panel
1365
421406a4 1366The Selection panel allows you to control the way \i{copy and paste}
00381fc7 1367work in the PuTTY window.
1368
421406a4 1369\S{config-rtfpaste} Pasting in \i{Rich Text Format}
a5a6cb30 1370
70133c0e 1371\cfg{winhelp-topic}{selection.rtf}
1372
a5a6cb30 1373If you enable \q{Paste to clipboard in RTF as well as plain text},
1374PuTTY will write formatting information to the clipboard as well as
f395fb46 1375the actual text you copy. The effect of this is
a5a6cb30 1376that if you paste into (say) a word processor, the text will appear
f395fb46 1377in the word processor in the same \i{font}, \i{colour}, and style
1378(e.g. bold, underline) PuTTY was using to display it.
a5a6cb30 1379
1380This option can easily be inconvenient, so by default it is
1381disabled.
1382
55ba634a 1383\S{config-mouse} Changing the actions of the mouse buttons
1384
70133c0e 1385\cfg{winhelp-topic}{selection.buttons}
1386
16fcd521 1387PuTTY's copy and paste mechanism is by default modelled on the Unix
1388\c{xterm} application. The X Window System uses a three-button mouse,
421406a4 1389and the convention is that the \i{left button} \I{selecting text}selects,
1390the \i{right button} extends an existing selection, and the
1391\i{middle button} pastes.
add788fc 1392
16fcd521 1393Windows often only has two mouse buttons, so in PuTTY's default
1394configuration (\q{Compromise}), the \e{right} button pastes, and the
421406a4 1395\e{middle} button (if you have one) \I{adjusting a selection}extends
1396a selection.
add788fc 1397
421406a4 1398If you have a \i{three-button mouse} and you are already used to the
add788fc 1399\c{xterm} arrangement, you can select it using the \q{Action of
1400mouse buttons} control.
1401
16fcd521 1402Alternatively, with the \q{Windows} option selected, the middle
421406a4 1403button extends, and the right button brings up a \i{context menu} (on
16fcd521 1404which one of the options is \q{Paste}). (This context menu is always
1405available by holding down Ctrl and right-clicking, regardless of the
1406setting of this option.)
1407
add788fc 1408\S{config-mouseshift} \q{Shift overrides application's use of mouse}
1409
70133c0e 1410\cfg{winhelp-topic}{selection.shiftdrag}
1411
421406a4 1412PuTTY allows the server to send \i{control codes} that let it
1413\I{mouse reporting}take over the mouse and use it for purposes other
1414than \i{copy and paste}.
add788fc 1415Applications which use this feature include the text-mode web
1416browser \c{links}, the Usenet newsreader \c{trn} version 4, and the
1417file manager \c{mc} (Midnight Commander).
1418
1419When running one of these applications, pressing the mouse buttons
1420no longer performs copy and paste. If you do need to copy and paste,
1421you can still do so if you hold down Shift while you do your mouse
1422clicks.
1423
1424However, it is possible in theory for applications to even detect
1425and make use of Shift + mouse clicks. We don't know of any
1426applications that do this, but in case someone ever writes one,
1427unchecking the \q{Shift overrides application's use of mouse}
1428checkbox will cause Shift + mouse clicks to go to the server as well
1429(so that mouse-driven copy and paste will be completely disabled).
1430
c0d36a72 1431If you want to prevent the application from taking over the mouse at
1432all, you can do this using the Features control panel; see
1433\k{config-features-mouse}.
1434
a5a6cb30 1435\S{config-rectselect} Default selection mode
1436
70133c0e 1437\cfg{winhelp-topic}{selection.rect}
1438
a5a6cb30 1439As described in \k{using-selection}, PuTTY has two modes of
1440selecting text to be copied to the clipboard. In the default mode
1441(\q{Normal}), dragging the mouse from point A to point B selects to
1442the end of the line containing A, all the lines in between, and from
1443the very beginning of the line containing B. In the other mode
1444(\q{Rectangular block}), dragging the mouse between two points
1445defines a rectangle, and everything within that rectangle is copied.
1446
1447Normally, you have to hold down Alt while dragging the mouse to
1448select a rectangular block. Using the \q{Default selection mode}
421406a4 1449control, you can set \i{rectangular selection} as the default, and then
a5a6cb30 1450you have to hold down Alt to get the \e{normal} behaviour.
1451
421406a4 1452\S{config-charclasses} Configuring \i{word-by-word selection}
55ba634a 1453
70133c0e 1454\cfg{winhelp-topic}{selection.charclasses}
1455
add788fc 1456PuTTY will select a word at a time in the terminal window if you
421406a4 1457\i{double-click} to begin the drag. This panel allows you to control
add788fc 1458precisely what is considered to be a word.
1459
1460Each character is given a \e{class}, which is a small number
1461(typically 0, 1 or 2). PuTTY considers a single word to be any
1462number of adjacent characters in the same class. So by modifying the
1463assignment of characters to classes, you can modify the word-by-word
1464selection behaviour.
1465
421406a4 1466In the default configuration, the \i{character classes} are:
add788fc 1467
421406a4 1468\b Class 0 contains \i{white space} and control characters.
add788fc 1469
421406a4 1470\b Class 1 contains most \i{punctuation}.
add788fc 1471
1472\b Class 2 contains letters, numbers and a few pieces of punctuation
1473(the double quote, minus sign, period, forward slash and
1474underscore).
1475
1476So, for example, if you assign the \c{@} symbol into character class
14772, you will be able to select an e-mail address with just a double
1478click.
1479
1480In order to adjust these assignments, you start by selecting a group
1481of characters in the list box. Then enter a class number in the edit
1482box below, and press the \q{Set} button.
1483
1484This mechanism currently only covers ASCII characters, because it
1485isn't feasible to expand the list to cover the whole of Unicode.
1486
421406a4 1487Character class definitions can be modified by \i{control sequence}s
64734920 1488sent by the server. This configuration option controls the
1489\e{default} state, which will be restored when you reset the
1490terminal (see \k{reset-terminal}). However, if you modify this
1491option in mid-session using \q{Change Settings}, it will take effect
1492immediately.
7b74af11 1493
55ba634a 1494\H{config-colours} The Colours panel
1495
421406a4 1496The Colours panel allows you to control PuTTY's use of \i{colour}.
1630bb61 1497
421406a4 1498\S{config-ansicolour} \q{Allow terminal to specify \i{ANSI colours}}
c6f1b8ed 1499
1500\cfg{winhelp-topic}{colours.ansi}
1501
1502This option is enabled by default. If it is disabled, PuTTY will
421406a4 1503ignore any \i{control sequence}s sent by the server to request coloured
c6f1b8ed 1504text.
1505
1506If you have a particularly garish application, you might want to
1507turn this option off and make PuTTY only use the default foreground
1508and background colours.
1509
421406a4 1510\S{config-xtermcolour} \q{Allow terminal to use xterm \i{256-colour mode}}
cecb13f6 1511
1512\cfg{winhelp-topic}{colours.xterm256}
1513
1514This option is enabled by default. If it is disabled, PuTTY will
1515ignore any control sequences sent by the server which use the
1516extended 256-colour mode supported by recent versions of \cw{xterm}.
1517
fa29f284 1518If you have an application which is supposed to use 256-colour mode
1519and it isn't working, you may find you need to tell your server that
1520your terminal supports 256 colours. On Unix, you do this by ensuring
421406a4 1521that the setting of \i\cw{TERM} describes a 256-colour-capable
fa29f284 1522terminal. You can check this using a command such as \c{infocmp}:
1523
1524\c $ infocmp | grep colors
1525\c colors#256, cols#80, it#8, lines#24, pairs#256,
1526\e bbbbbbbbbb
1527
1528If you do not see \cq{colors#256} in the output, you may need to
1529change your terminal setting. On modern Linux machines, you could
1530try \cq{xterm-256color}.
1531
55ba634a 1532\S{config-boldcolour} \q{Bolded text is a different colour}
1533
70133c0e 1534\cfg{winhelp-topic}{colours.bold}
1535
421406a4 1536When the server sends a \i{control sequence} indicating that some text
1537should be displayed in \i{bold}, PuTTY can handle this two ways. It can
1538either change the \i{font} for a bold version, or use the same font in a
add788fc 1539brighter colour. This control lets you choose which.
1540
1541By default the box is checked, so non-bold text is displayed in
1542light grey and bold text is displayed in bright white (and similarly
1543in other colours). If you uncheck the box, bold and non-bold text
1544will be displayed in the same colour, and instead the font will
1545change to indicate the difference.
1546
421406a4 1547\S{config-logpalette} \q{Attempt to use \i{logical palettes}}
55ba634a 1548
70133c0e 1549\cfg{winhelp-topic}{colours.logpal}
1550
add788fc 1551Logical palettes are a mechanism by which a Windows application
421406a4 1552running on an \i{8-bit colour} display can select precisely the colours
add788fc 1553it wants instead of going with the Windows standard defaults.
1554
1555If you are not getting the colours you ask for on an 8-bit display,
1556you can try enabling this option. However, be warned that it's never
1557worked very well.
1558
421406a4 1559\S{config-syscolour} \q{Use \i{system colours}}
26d1da7b 1560
1561\cfg{winhelp-topic}{colours.system}
1562
1563Enabling this option will cause PuTTY to ignore the configured colours
421406a4 1564for \I{default background}\I{default foreground}\q{Default
1565Background/Foreground} and \I{cursor colour}\q{Cursor Colour/Text} (see
26d1da7b 1566\k{config-colourcfg}), instead going with the system-wide defaults.
1567
421406a4 1568Note that non-bold and \i{bold text} will be the same colour if this
26d1da7b 1569option is enabled. You might want to change to indicating bold text
1570by font changes (see \k{config-boldcolour}).
1571
421406a4 1572\S{config-colourcfg} Adjusting the colours in the \i{terminal window}
55ba634a 1573
70133c0e 1574\cfg{winhelp-topic}{colours.config}
1575
add788fc 1576The main colour control allows you to specify exactly what colours
1577things should be displayed in. To modify one of the PuTTY colours,
421406a4 1578use the list box to select which colour you want to modify. The \i{RGB
1579values} for that colour will appear on the right-hand side of the
add788fc 1580list box. Now, if you press the \q{Modify} button, you will be
1581presented with a colour selector, in which you can choose a new
3d025d91 1582colour to go in place of the old one. (You may also edit the RGB
1583values directly in the edit boxes, if you wish; each value is an
1584integer from 0 to 255.)
add788fc 1585
421406a4 1586PuTTY allows you to set the \i{cursor colour}, the \i{default foreground}
1587and \I{default background}background, and the precise shades of all the
1588\I{ANSI colours}ANSI configurable colours (black, red, green, yellow, blue,
1589magenta, cyan, and white). You can also modify the precise shades used for
1590the \i{bold} versions of these colours; these are used to display bold text
1591if you have selected \q{Bolded text is a different colour}, and can also be
1592used if the server asks specifically to use them. (Note that \q{Default
5dce67f7 1593Bold Background} is \e{not} the background colour used for bold text;
1594it is only used if the server specifically asks for a bold
1595background.)
add788fc 1596
55ba634a 1597\H{config-connection} The Connection panel
1598
1630bb61 1599The Connection panel allows you to configure options that apply to
421406a4 1600more than one type of \i{connection}.
1630bb61 1601
421406a4 1602\S{config-keepalive} Using \i{keepalives} to prevent disconnection
55ba634a 1603
70133c0e 1604\cfg{winhelp-topic}{connection.keepalive}
1605
9d219e03 1606If you find your sessions are closing unexpectedly (most often with
1607\q{Connection reset by peer}) after they have been idle for a while,
1608you might want to try using this option.
c33f3243 1609
421406a4 1610Some network \i{routers} and \i{firewalls} need to keep track of all
c33f3243 1611connections through them. Usually, these firewalls will assume a
1612connection is dead if no data is transferred in either direction
1613after a certain time interval. This can cause PuTTY sessions to be
1614unexpectedly closed by the firewall if no traffic is seen in the
1615session for some time.
1616
1617The keepalive option (\q{Seconds between keepalives}) allows you to
1618configure PuTTY to send data through the session at regular
1619intervals, in a way that does not disrupt the actual terminal
421406a4 1620session. If you find your firewall is cutting \i{idle connections} off,
c33f3243 1621you can try entering a non-zero value in this field. The value is
1622measured in seconds; so, for example, if your firewall cuts
1623connections off after ten minutes then you might want to enter 300
1624seconds (5 minutes) in the box.
1625
1626Note that keepalives are not always helpful. They help if you have a
1627firewall which drops your connection after an idle period; but if
421406a4 1628the network between you and the server suffers from \i{breaks in
1629connectivity} then keepalives can actually make things worse. If a
c33f3243 1630session is idle, and connectivity is temporarily lost between the
1631endpoints, but the connectivity is restored before either side tries
1632to send anything, then there will be no problem - neither endpoint
1633will notice that anything was wrong. However, if one side does send
1634something during the break, it will repeatedly try to re-send, and
1635eventually give up and abandon the connection. Then when
1636connectivity is restored, the other side will find that the first
1637side doesn't believe there is an open connection any more.
1638Keepalives can make this sort of problem worse, because they
1639increase the probability that PuTTY will attempt to send data during
894a2d7b 1640a break in connectivity. (Other types of periodic network activity
cfc65cdc 1641can cause this behaviour; in particular, SSH-2 re-keys can have
894a2d7b 1642this effect. See \k{config-ssh-kex-rekey}.)
1643
1644Therefore, you might find that keepalives help
c33f3243 1645connection loss, or you might find they make it worse, depending on
1646what \e{kind} of network problems you have between you and the
1647server.
1648
1649Keepalives are only supported in Telnet and SSH; the Rlogin and Raw
79bf227b 1650protocols offer no way of implementing them. (For an alternative, see
1651\k{config-tcp-keepalives}.)
c33f3243 1652
421406a4 1653Note that if you are using \i{SSH-1} and the server has a bug that makes
2e85c969 1654it unable to deal with SSH-1 ignore messages (see
2c9c6388 1655\k{config-ssh-bug-ignore1}), enabling keepalives will have no effect.
1656
421406a4 1657\S{config-nodelay} \q{Disable \i{Nagle's algorithm}}
81e8bb1b 1658
70133c0e 1659\cfg{winhelp-topic}{connection.nodelay}
1660
81e8bb1b 1661Nagle's algorithm is a detail of TCP/IP implementations that tries
1662to minimise the number of small data packets sent down a network
421406a4 1663connection. With Nagle's algorithm enabled, PuTTY's \i{bandwidth} usage
81e8bb1b 1664will be slightly more efficient; with it disabled, you may find you
1665get a faster response to your keystrokes when connecting to some
1666types of server.
1667
421406a4 1668The Nagle algorithm is disabled by default for \i{interactive connections}.
81e8bb1b 1669
421406a4 1670\S{config-tcp-keepalives} \q{Enable \i{TCP keepalives}}
79bf227b 1671
1672\cfg{winhelp-topic}{connection.tcpkeepalive}
1673
1674\e{NOTE:} TCP keepalives should not be confused with the
1675application-level keepalives described in \k{config-keepalive}. If in
1676doubt, you probably want application-level keepalives; TCP keepalives
1677are provided for completeness.
1678
1679The idea of TCP keepalives is similar to application-level keepalives,
1680and the same caveats apply. The main differences are:
1681
1682\b TCP keepalives are available on \e{all} connection types, including
1683Raw and Rlogin.
1684
1685\b The interval between TCP keepalives is usually much longer,
1686typically two hours; this is set by the operating system, and cannot
1687be configured within PuTTY.
1688
1689\b If the operating system does not receive a response to a keepalive,
3e64ff65 1690it may send out more in quick succession and terminate the connection
79bf227b 1691if no response is received.
1692
421406a4 1693TCP keepalives may be more useful for ensuring that \i{half-open connections}
79bf227b 1694are terminated than for keeping a connection alive.
1695
1696TCP keepalives are disabled by default.
1697
421406a4 1698\S{config-address-family} \I{Internet protocol version}\q{Internet protocol}
05581745 1699
1700\cfg{winhelp-topic}{connection.ipversion}
1701
1702This option allows the user to select between the old and new
2e523aed 1703Internet protocols and addressing schemes (\i{IPv4} and \i{IPv6}).
1704The selected protocol will be used for most outgoing network
1705connections (including connections to \I{proxy}proxies); however,
1706tunnels have their own configuration, for which see
1707\k{config-ssh-portfwd-address-family}.
1708
1709The default setting is \q{Auto}, which means PuTTY will do something
05581745 1710sensible and try to guess which protocol you wanted. (If you specify
421406a4 1711a literal \i{Internet address}, it will use whichever protocol that
1712address implies. If you provide a \i{hostname}, it will see what kinds
05581745 1713of address exist for that hostname; it will use IPv6 if there is an
1714IPv6 address available, and fall back to IPv4 if not.)
1715
1716If you need to force PuTTY to use a particular protocol, you can
1717explicitly set this to \q{IPv4} or \q{IPv6}.
1718
1719\H{config-data} The Data panel
1720
1721The Data panel allows you to configure various pieces of data which
1722can be sent to the server to affect your connection at the far end.
1723
3e64ff65 1724Each option on this panel applies to more than one protocol.
05581745 1725Options which apply to only one protocol appear on that protocol's
1726configuration panels.
1727
421406a4 1728\S{config-username} \q{\ii{Auto-login username}}
05581745 1729
1730\cfg{winhelp-topic}{connection.username}
1731
1732All three of the SSH, Telnet and Rlogin protocols allow you to
1733specify what user name you want to log in as, without having to type
1734it explicitly every time. (Some Telnet servers don't support this.)
1735
1736In this box you can type that user name.
1737
421406a4 1738\S{config-termtype} \q{\ii{Terminal-type} string}
05581745 1739
1740\cfg{winhelp-topic}{connection.termtype}
1741
1742Most servers you might connect to with PuTTY are designed to be
1743connected to from lots of different types of terminal. In order to
421406a4 1744send the right \i{control sequence}s to each one, the server will need
05581745 1745to know what type of terminal it is dealing with. Therefore, each of
1746the SSH, Telnet and Rlogin protocols allow a text string to be sent
e81024f9 1747down the connection describing the terminal. On a \i{Unix} server,
1748this selects an entry from the \i\c{termcap} or \i\c{terminfo} database
1749that tells applications what \i{control sequences} to send to the
1750terminal, and what character sequences to expect the \i{keyboard}
1751to generate.
05581745 1752
421406a4 1753PuTTY attempts to emulate the Unix \i\c{xterm} program, and by default
05581745 1754it reflects this by sending \c{xterm} as a terminal-type string. If
1755you find this is not doing what you want - perhaps the remote
1756system reports \q{Unknown terminal type} - you could try setting
421406a4 1757this to something different, such as \i\c{vt220}.
05581745 1758
1759If you're not sure whether a problem is due to the terminal type
1760setting or not, you probably need to consult the manual for your
1761application or your server.
1762
421406a4 1763\S{config-termspeed} \q{\ii{Terminal speed}s}
05581745 1764
1765\cfg{winhelp-topic}{connection.termspeed}
1766
1767The Telnet, Rlogin, and SSH protocols allow the client to specify
1768terminal speeds to the server.
1769
1770This parameter does \e{not} affect the actual speed of the connection,
1771which is always \q{as fast as possible}; it is just a hint that is
1772sometimes used by server software to modify its behaviour. For
1773instance, if a slow speed is indicated, the server may switch to a
421406a4 1774less \i{bandwidth}-hungry display mode.
05581745 1775
1776The value is usually meaningless in a network environment, but
1777PuTTY lets you configure it, in case you find the server is reacting
1778badly to the default value.
1779
1780The format is a pair of numbers separated by a comma, for instance,
1781\c{38400,38400}. The first number represents the output speed
1782(\e{from} the server) in bits per second, and the second is the input
1783speed (\e{to} the server). (Only the first is used in the Rlogin
1784protocol.)
1785
1786This option has no effect on Raw connections.
1787
421406a4 1788\S{config-environ} Setting \i{environment variables} on the server
05581745 1789
1790\cfg{winhelp-topic}{telnet.environ}
1791
1792The Telnet protocol provides a means for the client to pass
1793environment variables to the server. Many Telnet servers have
1794stopped supporting this feature due to security flaws, but PuTTY
1795still supports it for the benefit of any servers which have found
1796other ways around the security problems than just disabling the
1797whole mechanism.
1798
1799Version 2 of the SSH protocol also provides a similar mechanism,
421406a4 1800which is easier to implement without security flaws. Newer \i{SSH-2}
05581745 1801servers are more likely to support it than older ones.
1802
2e85c969 1803This configuration data is not used in the SSH-1, rlogin or raw
05581745 1804protocols.
1805
1806To add an environment variable to the list transmitted down the
1807connection, you enter the variable name in the \q{Variable} box,
1808enter its value in the \q{Value} box, and press the \q{Add} button.
1809To remove one from the list, select it in the list box and press
1810\q{Remove}.
1811
0e8f4cda 1812\H{config-proxy} The Proxy panel
1813
15933a9b 1814\cfg{winhelp-topic}{proxy.main}
1815
421406a4 1816The \ii{Proxy} panel allows you to configure PuTTY to use various types
0e8f4cda 1817of proxy in order to make its network connections. The settings in
1818this panel affect the primary network connection forming your PuTTY
5dd29cf7 1819session, and also any extra connections made as a result of SSH \i{port
421406a4 1820forwarding} (see \k{using-port-forwarding}).
0e8f4cda 1821
b4e54c85 1822Note that unlike some software (such as web browsers), PuTTY does not
1823attempt to automatically determine whether to use a proxy and (if so)
1824which one to use for a given destination. If you need to use a proxy,
1825it must always be explicitly configured.
1826
0e8f4cda 1827\S{config-proxy-type} Setting the proxy type
1828
15933a9b 1829\cfg{winhelp-topic}{proxy.type}
1830
0e8f4cda 1831The \q{Proxy type} radio buttons allow you to configure what type of
1832proxy you want PuTTY to use for its network connections. The default
1833setting is \q{None}; in this mode no proxy is used for any
1834connection.
1835
421406a4 1836\b Selecting \I{HTTP proxy}\q{HTTP} allows you to proxy your connections
1837through a web server supporting the HTTP \cw{CONNECT} command, as documented
0e8f4cda 1838in \W{http://www.ietf.org/rfc/rfc2817.txt}{RFC 2817}.
1839
10068a0b 1840\b Selecting \q{SOCKS 4} or \q{SOCKS 5} allows you to proxy your
421406a4 1841connections through a \i{SOCKS server}.
0e8f4cda 1842
1843\b Many firewalls implement a less formal type of proxy in which a
1844user can make a Telnet connection directly to the firewall machine
1845and enter a command such as \c{connect myhost.com 22} to connect
421406a4 1846through to an external host. Selecting \I{Telnet proxy}\q{Telnet}
1847allows you to tell PuTTY to use this type of proxy.
0e8f4cda 1848
5dd29cf7 1849\b Selecting \I{Local proxy}\q{Local} allows you to specify an arbitrary
1850command on the local machine to act as a proxy. When the session is
1851started, instead of creating a TCP connection, PuTTY runs the command
1852(specified in \k{config-proxy-command}), and uses its standard input and
1853output streams.
1854
1855\lcont{
1856This could be used, for instance, to talk to some kind of network proxy
1857that PuTTY does not natively support; or you could tunnel a connection
1858over something other than TCP/IP entirely.
feb02b4e 1859
1860If you want your local proxy command to make a secondary SSH
1861connection to a proxy host and then tunnel the primary connection
1862over that, you might well want the \c{-nc} command-line option in
1863Plink. See \k{using-cmdline-ncmode} for more information.
5dd29cf7 1864}
1865
0e8f4cda 1866\S{config-proxy-exclude} Excluding parts of the network from proxying
1867
15933a9b 1868\cfg{winhelp-topic}{proxy.exclude}
1869
0e8f4cda 1870Typically you will only need to use a proxy to connect to non-local
1871parts of your network; for example, your proxy might be required for
1872connections outside your company's internal network. In the
1873\q{Exclude Hosts/IPs} box you can enter ranges of IP addresses, or
1874ranges of DNS names, for which PuTTY will avoid using the proxy and
1875make a direct connection instead.
1876
1877The \q{Exclude Hosts/IPs} box may contain more than one exclusion
1878range, separated by commas. Each range can be an IP address or a DNS
1879name, with a \c{*} character allowing wildcards. For example:
1880
1881\c *.example.com
1882
1883This excludes any host with a name ending in \c{.example.com} from
1884proxying.
1885
1886\c 192.168.88.*
1887
1888This excludes any host with an IP address starting with 192.168.88
1889from proxying.
1890
1891\c 192.168.88.*,*.example.com
1892
1893This excludes both of the above ranges at once.
1894
421406a4 1895Connections to the local host (the host name \i\c{localhost}, and any
1896\i{loopback IP address}) are never proxied, even if the proxy exclude
b804e1e5 1897list does not explicitly contain them. It is very unlikely that this
1898behaviour would ever cause problems, but if it does you can change
1899it by enabling \q{Consider proxying local host connections}.
1900
421406a4 1901Note that if you are doing \I{proxy DNS}DNS at the proxy (see
b7a189f3 1902\k{config-proxy-dns}), you should make sure that your proxy
1903exclusion settings do not depend on knowing the IP address of a
1904host. If the name is passed on to the proxy without PuTTY looking it
1905up, it will never know the IP address and cannot check it against
1906your list.
1907
421406a4 1908\S{config-proxy-dns} \I{proxy DNS}\ii{Name resolution} when using a proxy
b7a189f3 1909
1910\cfg{winhelp-topic}{proxy.dns}
1911
1912If you are using a proxy to access a private network, it can make a
421406a4 1913difference whether \i{DNS} name resolution is performed by PuTTY itself
b7a189f3 1914(on the client machine) or performed by the proxy.
1915
1916The \q{Do DNS name lookup at proxy end} configuration option allows
1917you to control this. If you set it to \q{No}, PuTTY will always do
1918its own DNS, and will always pass an IP address to the proxy. If you
1919set it to \q{Yes}, PuTTY will always pass host names straight to the
1920proxy without trying to look them up first.
1921
1922If you set this option to \q{Auto} (the default), PuTTY will do
c6e05bdc 1923something it considers appropriate for each type of proxy. Telnet,
1924HTTP, and SOCKS5 proxies will have host names passed straight to
1925them; SOCKS4 proxies will not.
b7a189f3 1926
1927Note that if you are doing DNS at the proxy, you should make sure
1928that your proxy exclusion settings (see \k{config-proxy-exclude}) do
1929not depend on knowing the IP address of a host. If the name is
1930passed on to the proxy without PuTTY looking it up, it will never
1931know the IP address and cannot check it against your list.
1932
1933The original SOCKS 4 protocol does not support proxy-side DNS. There
1934is a protocol extension (SOCKS 4A) which does support it, but not
1935all SOCKS 4 servers provide this extension. If you enable proxy DNS
1936and your SOCKS 4 server cannot deal with it, this might be why.
1937
421406a4 1938\S{config-proxy-auth} \I{proxy username}Username and \I{proxy password}password
0e8f4cda 1939
15933a9b 1940\cfg{winhelp-topic}{proxy.auth}
1941
421406a4 1942If your proxy requires \I{proxy authentication}authentication, you can
1943enter a username and a password in the \q{Username} and \q{Password} boxes.
0e8f4cda 1944
421406a4 1945\I{security hazard}Note that if you save your session, the proxy
1946password will be saved in plain text, so anyone who can access your PuTTY
1074abfd 1947configuration data will be able to discover it.
1948
0b6baa33 1949Authentication is not fully supported for all forms of proxy:
1549e076 1950
aab91a3e 1951\b Username and password authentication is supported for HTTP
1952proxies and SOCKS 5 proxies.
1549e076 1953
960e03a5 1954\lcont{
1955
1956\b With SOCKS 5, authentication is via \i{CHAP} if the proxy
1957supports it (this is not supported in \i{PuTTYtel}); otherwise the
421406a4 1958password is sent to the proxy in \I{plaintext password}plain text.
960e03a5 1959
1960\b With HTTP proxying, the only currently supported authentication
421406a4 1961method is \I{HTTP basic}\q{basic}, where the password is sent to the proxy
1962in \I{plaintext password}plain text.
960e03a5 1963
1964}
1965
1549e076 1966\b SOCKS 4 can use the \q{Username} field, but does not support
1967passwords.
1968
2d129d8e 1969\b You can specify a way to include a username and password in the
5dd29cf7 1970Telnet/Local proxy command (see \k{config-proxy-command}).
0e8f4cda 1971
5dd29cf7 1972\S{config-proxy-command} Specifying the Telnet or Local proxy command
0e8f4cda 1973
15933a9b 1974\cfg{winhelp-topic}{proxy.command}
1975
421406a4 1976If you are using the \i{Telnet proxy} type, the usual command required
0e8f4cda 1977by the firewall's Telnet server is \c{connect}, followed by a host
1978name and a port number. If your proxy needs a different command,
1979you can enter an alternative here.
1980
5dd29cf7 1981If you are using the \i{Local proxy} type, the local command to run
1982is specified here.
1983
0e8f4cda 1984In this string, you can use \c{\\n} to represent a new-line, \c{\\r}
1985to represent a carriage return, \c{\\t} to represent a tab
1986character, and \c{\\x} followed by two hex digits to represent any
1987other character. \c{\\\\} is used to encode the \c{\\} character
1988itself.
1989
1990Also, the special strings \c{%host} and \c{%port} will be replaced
2d129d8e 1991by the host name and port number you want to connect to. The strings
1992\c{%user} and \c{%pass} will be replaced by the proxy username and
5dd29cf7 1993password you specify. The strings \c{%proxyhost} and \c{%proxyport}
1994will be replaced by the host details specified on the \e{Proxy} panel,
1995if any (this is most likely to be useful for the Local proxy type).
1996To get a literal \c{%} sign, enter \c{%%}.
2d129d8e 1997
5dd29cf7 1998If a Telnet proxy server prompts for a username and password
2d129d8e 1999before commands can be sent, you can use a command such as:
2000
0b6baa33 2001\c %user\n%pass\nconnect %host %port\n
2d129d8e 2002
2003This will send your username and password as the first two lines to
2004the proxy, followed by a command to connect to the desired host and
2005port. Note that if you do not include the \c{%user} or \c{%pass}
2006tokens in the Telnet command, then the \q{Username} and \q{Password}
2007configuration fields will be ignored.
0e8f4cda 2008
421406a4 2009\H{config-telnet} The \i{Telnet} panel
55ba634a 2010
1630bb61 2011The Telnet panel allows you to configure options that only apply to
2012Telnet sessions.
2013
55ba634a 2014\S{config-oldenviron} \q{Handling of OLD_ENVIRON ambiguity}
2015
70133c0e 2016\cfg{winhelp-topic}{telnet.oldenviron}
2017
421406a4 2018The original Telnet mechanism for passing \i{environment variables} was
add788fc 2019badly specified. At the time the standard (RFC 1408) was written,
2020BSD telnet implementations were already supporting the feature, and
2021the intention of the standard was to describe the behaviour the BSD
2022implementations were already using.
2023
2024Sadly there was a typing error in the standard when it was issued,
2025and two vital function codes were specified the wrong way round. BSD
2026implementations did not change, and the standard was not corrected.
421406a4 2027Therefore, it's possible you might find either \i{BSD} or \i{RFC}-compliant
add788fc 2028implementations out there. This switch allows you to choose which
2029one PuTTY claims to be.
2030
2031The problem was solved by issuing a second standard, defining a new
421406a4 2032Telnet mechanism called \i\cw{NEW_ENVIRON}, which behaved exactly like
2033the original \i\cw{OLD_ENVIRON} but was not encumbered by existing
add788fc 2034implementations. Most Telnet servers now support this, and it's
2035unambiguous. This feature should only be needed if you have trouble
2036passing environment variables to quite an old server.
2037
421406a4 2038\S{config-ptelnet} Passive and active \i{Telnet negotiation} modes
add788fc 2039
70133c0e 2040\cfg{winhelp-topic}{telnet.passive}
2041
add788fc 2042In a Telnet connection, there are two types of data passed between
2043the client and the server: actual text, and \e{negotiations} about
2044which Telnet extra features to use.
2045
2046PuTTY can use two different strategies for negotiation:
2047
421406a4 2048\b In \I{active Telnet negotiation}\e{active} mode, PuTTY starts to send
2049negotiations as soon as the connection is opened.
add788fc 2050
421406a4 2051\b In \I{passive Telnet negotiation}\e{passive} mode, PuTTY will wait to
2052negotiate until it sees a negotiation from the server.
add788fc 2053
2054The obvious disadvantage of passive mode is that if the server is
2055also operating in a passive mode, then negotiation will never begin
2056at all. For this reason PuTTY defaults to active mode.
2057
2058However, sometimes passive mode is required in order to successfully
421406a4 2059get through certain types of firewall and \i{Telnet proxy} server. If
2060you have confusing trouble with a \i{firewall}, you could try enabling
add788fc 2061passive mode to see if it helps.
2062
421406a4 2063\S{config-telnetkey} \q{Keyboard sends \i{Telnet special commands}}
add788fc 2064
70133c0e 2065\cfg{winhelp-topic}{telnet.specialkeys}
2066
76d3d354 2067If this box is checked, several key sequences will have their normal
2068actions modified:
2069
2070\b the Backspace key on the keyboard will send the \I{Erase Character,
2071Telnet special command}Telnet special backspace code;
2072
2073\b Control-C will send the Telnet special \I{Interrupt Process, Telnet
2074special command}Interrupt Process code;
2075
2076\b Control-Z will send the Telnet special \I{Suspend Process, Telnet
2077special command}Suspend Process code.
2078
2079You probably shouldn't enable this
add788fc 2080unless you know what you're doing.
2081
421406a4 2082\S{config-telnetnl} \q{Return key sends \i{Telnet New Line} instead of ^M}
eee63b77 2083
2084\cfg{winhelp-topic}{telnet.newline}
2085
2086Unlike most other remote login protocols, the Telnet protocol has a
421406a4 2087special \q{\i{new line}} code that is not the same as the usual line
eee63b77 2088endings of Control-M or Control-J. By default, PuTTY sends the
2089Telnet New Line code when you press Return, instead of sending
2090Control-M as it does in most other protocols.
2091
2092Most Unix-style Telnet servers don't mind whether they receive
2093Telnet New Line or Control-M; some servers do expect New Line, and
2094some servers prefer to see ^M. If you are seeing surprising
2095behaviour when you press Return in a Telnet session, you might try
2096turning this option off to see if it helps.
2097
add788fc 2098\H{config-rlogin} The Rlogin panel
2099
421406a4 2100The \i{Rlogin} panel allows you to configure options that only apply to
add788fc 2101Rlogin sessions.
2102
421406a4 2103\S{config-rlogin-localuser} \I{local username in Rlogin}\q{Local username}
add788fc 2104
70133c0e 2105\cfg{winhelp-topic}{rlogin.localuser}
2106
add788fc 2107Rlogin allows an automated (password-free) form of login by means of
421406a4 2108a file called \i\c{.rhosts} on the server. You put a line in your
add788fc 2109\c{.rhosts} file saying something like \c{jbloggs@pc1.example.com},
2110and then when you make an Rlogin connection the client transmits the
2111username of the user running the Rlogin client. The server checks
2112the username and hostname against \c{.rhosts}, and if they match it
421406a4 2113\I{passwordless login}does not ask for a password.
add788fc 2114
2115This only works because Unix systems contain a safeguard to stop a
2116user from pretending to be another user in an Rlogin connection.
421406a4 2117Rlogin connections have to come from \I{privileged port}port numbers below
21181024, and Unix systems prohibit this to unprivileged processes; so when the
add788fc 2119server sees a connection from a low-numbered port, it assumes the
2120client end of the connection is held by a privileged (and therefore
2121trusted) process, so it believes the claim of who the user is.
2122
2123Windows does not have this restriction: \e{any} user can initiate an
2124outgoing connection from a low-numbered port. Hence, the Rlogin
2125\c{.rhosts} mechanism is completely useless for securely
2126distinguishing several different users on a Windows machine. If you
2127have a \c{.rhosts} entry pointing at a Windows PC, you should assume
421406a4 2128that \e{anyone} using that PC can \i{spoof} your username in
2129an Rlogin connection and access your account on the server.
add788fc 2130
2131The \q{Local username} control allows you to specify what user name
421406a4 2132PuTTY should claim you have, in case it doesn't match your \i{Windows
2133user name} (or in case you didn't bother to set up a Windows user
add788fc 2134name).
2135
55ba634a 2136\H{config-ssh} The SSH panel
2137
421406a4 2138The \i{SSH} panel allows you to configure options that only apply to
1630bb61 2139SSH sessions.
2140
55ba634a 2141\S{config-command} Executing a specific command on the server
2142
70133c0e 2143\cfg{winhelp-topic}{ssh.command}
2144
add788fc 2145In SSH, you don't have to run a general shell session on the server.
2146Instead, you can choose to run a single specific command (such as a
2147mail user agent, for example). If you want to do this, enter the
421406a4 2148command in the \q{\ii{Remote command}} box.
add788fc 2149
5fe29099 2150Note that most servers will close the session after executing the
2151command.
2152
421406a4 2153\S{config-ssh-noshell} \q{Don't start a \I{remote shell}shell or
2154\I{remote command}command at all}
0ed48730 2155
2156\cfg{winhelp-topic}{ssh.noshell}
2157
2158If you tick this box, PuTTY will not attempt to run a shell or
2159command after connecting to the remote server. You might want to use
421406a4 2160this option if you are only using the SSH connection for \i{port
2161forwarding}, and your user account on the server does not have the
0ed48730 2162ability to run a shell.
2163
421406a4 2164This feature is only available in \i{SSH protocol version 2} (since the
0ed48730 2165version 1 protocol assumes you will always want to run a shell).
2166
2167This feature can also be enabled using the \c{-N} command-line
2168option; see \k{using-cmdline-noshell}.
2169
2170If you use this feature in Plink, you will not be able to terminate
2171the Plink process by any graceful means; the only way to kill it
2172will be by pressing Control-C or sending a kill signal from another
2173program.
2174
421406a4 2175\S{config-ssh-comp} \q{Enable \i{compression}}
add788fc 2176
70133c0e 2177\cfg{winhelp-topic}{ssh.compress}
2178
add788fc 2179This enables data compression in the SSH connection: data sent by
2180the server is compressed before sending, and decompressed at the
2181client end. Likewise, data sent by PuTTY to the server is compressed
2182first and the server decompresses it at the other end. This can help
421406a4 2183make the most of a low-\i{bandwidth} connection.
add788fc 2184
421406a4 2185\S{config-ssh-prot} \q{Preferred \i{SSH protocol version}}
add788fc 2186
70133c0e 2187\cfg{winhelp-topic}{ssh.protocol}
2188
421406a4 2189This allows you to select whether you would like to use \i{SSH protocol
2190version 1} or \I{SSH-2}version 2. \#{FIXME: say something about this elsewhere?}
add788fc 2191
2192PuTTY will attempt to use protocol 1 if the server you connect to
2193does not offer protocol 2, and vice versa.
2194
e117a742 2195If you select \q{1 only} or \q{2 only} here, PuTTY will only connect
2196if the server you connect to offers the SSH protocol version you
2197have specified.
05a24552 2198
421406a4 2199\S{config-ssh-encryption} \ii{Encryption} algorithm selection
add788fc 2200
70133c0e 2201\cfg{winhelp-topic}{ssh.ciphers}
2202
421406a4 2203PuTTY supports a variety of different \i{encryption algorithm}s, and
add788fc 2204allows you to choose which one you prefer to use. You can do this by
a5a6cb30 2205dragging the algorithms up and down in the list box (or moving them
2206using the Up and Down buttons) to specify a preference order. When
2207you make an SSH connection, PuTTY will search down the list from the
2208top until it finds an algorithm supported by the server, and then
2209use that.
add788fc 2210
9ec95c23 2211PuTTY currently supports the following algorithms:
2212
c7a336a1 2213\b \i{AES} (Rijndael) - 256, 192, or 128-bit SDCTR or CBC (SSH-2 only)
9ec95c23 2214
a2add208 2215\b \i{Arcfour} (RC4) - 256 or 128-bit stream cipher (SSH-2 only)
2216
33f1c161 2217\b \i{Blowfish} - 256-bit SDCTR (SSH-2 only) or 128-bit CBC
9ec95c23 2218
33f1c161 2219\b \ii{Triple-DES} - 168-bit SDCTR (SSH-2 only) or CBC
9ec95c23 2220
421406a4 2221\b \ii{Single-DES} - 56-bit CBC (see below for SSH-2)
9ec95c23 2222
add788fc 2223If the algorithm PuTTY finds is below the \q{warn below here} line,
2224you will see a warning box when you make the connection:
2225
2226\c The first cipher supported by the server
2227\c is single-DES, which is below the configured
2228\c warning threshold.
2229\c Do you want to continue with this connection?
2230
2231This warns you that the first available encryption is not a very
2232secure one. Typically you would put the \q{warn below here} line
2233between the encryptions you consider secure and the ones you
a5a6cb30 2234consider substandard. By default, PuTTY supplies a preference order
2235intended to reflect a reasonable preference in terms of security and
2236speed.
add788fc 2237
2d24892b 2238In SSH-2, the encryption algorithm is negotiated independently for
2239each direction of the connection, although PuTTY does not support
2240separate configuration of the preference orders. As a result you may
2241get two warnings similar to the one above, possibly with different
2242encryptions.
2243
4f47cacf 2244Single-DES is not recommended in the SSH-2 protocol
8f161275 2245standards, but one or two server implementations do support it.
2246PuTTY can use single-DES to interoperate with
2247these servers if you enable the \q{Enable legacy use of single-DES in
2e85c969 2248SSH-2} option; by default this is disabled and PuTTY will stick to
183f0303 2249recommended ciphers.
81e8bb1b 2250
83e7d008 2251\H{config-ssh-kex} The Kex panel
2252
2253\# FIXME: This whole section is draft. Feel free to revise.
2254
421406a4 2255The Kex panel (short for \q{\i{key exchange}}) allows you to configure
83e7d008 2256options related to SSH-2 key exchange.
2257
2258Key exchange occurs at the start of an SSH connection (and
421406a4 2259occasionally thereafter); it establishes a \i{shared secret} that is used
83e7d008 2260as the basis for all of SSH's security features. It is therefore very
2261important for the security of the connection that the key exchange is
2262secure.
2263
2264Key exchange is a cryptographically intensive process; if either the
2265client or the server is a relatively slow machine, the slower methods
2266may take several tens of seconds to complete.
2267
2268If connection startup is too slow, or the connection hangs
2269periodically, you may want to try changing these settings.
2270
2271If you don't understand what any of this means, it's safe to leave
2272these settings alone.
2273
2274This entire panel is only relevant to SSH protocol version 2; none of
2275these settings affect SSH-1 at all.
2276
421406a4 2277\S{config-ssh-kex-order} \ii{Key exchange algorithm} selection
83e7d008 2278
2279\cfg{winhelp-topic}{ssh.kex.order}
2280
2281PuTTY supports a variety of SSH-2 key exchange methods, and allows you
2282to choose which one you prefer to use; configuration is similar to
2283cipher selection (see \k{config-ssh-encryption}).
2284
421406a4 2285PuTTY currently supports the following varieties of \i{Diffie-Hellman key
2286exchange}:
83e7d008 2287
2288\b \q{Group 14}: a well-known 2048-bit group.
2289
2290\b \q{Group 1}: a well-known 1024-bit group. This is less secure
2291\#{FIXME better words} than group 14, but may be faster with slow
2292client or server machines, and may be the only method supported by
2293older server software.
2294
421406a4 2295\b \q{\ii{Group exchange}}: with this method, instead of using a fixed
83e7d008 2296group, PuTTY requests that the server suggest a group to use for key
2297exchange; the server can avoid groups known to be weak, and possibly
2298invent new ones over time, without any changes required to PuTTY's
2299configuration. We recommend use of this method, if possible.
2300
fae1a71b 2301In addition, PuTTY supports \i{RSA key exchange}, which requires much less
2302computational effort on the part of the client, and somewhat less on
2303the part of the server, than Diffie-Hellman key exchange.
2304
83e7d008 2305If the first algorithm PuTTY finds is below the \q{warn below here}
2306line, you will see a warning box when you make the connection, similar
2307to that for cipher selection (see \k{config-ssh-encryption}).
2308
421406a4 2309\S{config-ssh-kex-rekey} \ii{Repeat key exchange}
83e7d008 2310
d57f70af 2311\cfg{winhelp-topic}{ssh.kex.repeat}
2312
2313If the session key negotiated at connection startup is used too much
2314or for too long, it may become feasible to mount attacks against the
2315SSH connection. Therefore, the SSH-2 protocol specifies that a new key
2316exchange should take place every so often; this can be initiated by
2317either the client or the server.
2318
2319While this renegotiation is taking place, no data can pass through
83e7d008 2320the SSH connection, so it may appear to \q{freeze}. (The occurrence of
2321repeat key exchange is noted in the Event Log; see
2322\k{using-eventlog}.) Usually the same algorithm is used as at the
2323start of the connection, with a similar overhead.
2324
d57f70af 2325These options control how often PuTTY will initiate a repeat key
2326exchange (\q{rekey}). You can also force a key exchange at any time
2327from the Special Commands menu (see \k{using-specials}).
2328
4f47cacf 2329\# FIXME: do we have any additions to the SSH-2 specs' advice on
d57f70af 2330these values? Do we want to enforce any limits?
2331
2332\b \q{Max minutes before rekey} specifies the amount of time that is
2333allowed to elapse before a rekey is initiated. If this is set to zero,
2334PuTTY will not rekey due to elapsed time. The SSH-2 protocol
2335specification recommends a timeout of at most 60 minutes.
2336
a4358604 2337You might have a need to disable time-based rekeys completely for the same
421406a4 2338reasons that \i{keepalives} aren't always helpful. If you anticipate
a4358604 2339suffering a network dropout of several hours in the middle of an SSH
2340connection, but were not actually planning to send \e{data} down
2341that connection during those hours, then an attempted rekey in the
2342middle of the dropout will probably cause the connection to be
2343abandoned, whereas if rekeys are disabled then the connection should
421406a4 2344in principle survive (in the absence of interfering \i{firewalls}). See
a4358604 2345\k{config-keepalive} for more discussion of these issues; for these
2346purposes, rekeys have much the same properties as keepalives.
2347(Except that rekeys have cryptographic value in themselves, so you
2348should bear that in mind when deciding whether to turn them off.)
2349Note, however, the the SSH \e{server} can still initiate rekeys.
2350
d57f70af 2351\b \q{Max data before rekey} specifies the amount of data (in bytes)
2352that is permitted to flow in either direction before a rekey is
2353initiated. If this is set to zero, PuTTY will not rekey due to
2354transferred data. The SSH-2 protocol specification recommends a limit
2355of at most 1 gigabyte.
2356
2357\lcont{
2358
2359As well as specifying a value in bytes, the following shorthand can be
2360used:
2361
2362\b \cq{1k} specifies 1 kilobyte (1024 bytes).
2363
2364\b \cq{1M} specifies 1 megabyte (1024 kilobytes).
2365
2366\b \cq{1G} specifies 1 gigabyte (1024 megabytes).
2367
2368}
2369
421406a4 2370Disabling data-based rekeys entirely is a bad idea. The \i{integrity},
2371and to a lesser extent, \i{confidentiality} of the SSH-2 protocol depend
a4358604 2372in part on rekeys occuring before a 32-bit packet sequence number
2373wraps around. Unlike time-based rekeys, data-based rekeys won't occur
2374when the SSH connection is idle, so they shouldn't cause the same
2375problems. The SSH-1 protocol, incidentally, has even weaker integrity
2376protection than SSH-2 without rekeys.
83e7d008 2377
add788fc 2378\H{config-ssh-auth} The Auth panel
2379
421406a4 2380The Auth panel allows you to configure \i{authentication} options for
add788fc 2381SSH sessions.
2382
a1a1fae4 2383\S{config-ssh-noauth} \q{Bypass authentication entirely}
2384
2385\cfg{winhelp-topic}{ssh.auth.bypass}
2386
2387In SSH-2, it is possible to establish a connection without using SSH's
2388mechanisms to identify or authenticate oneself to the server. Some
2389servers may prefer to handle authentication in the data channel, for
2390instance, or may simply require no authentication whatsoever.
2391
2392By default, PuTTY assumes the server requires authentication (most
2393do), and thus must provide a username. If you find you are getting
2394unwanted username prompts, you could try checking this option.
2395
2396This option only affects SSH-2 connections. SSH-1 connections always
2397require an authentication step.
2398
973612f5 2399\S{config-ssh-tryagent} \q{Attempt authentication using Pageant}
2400
2401\cfg{winhelp-topic}{ssh.auth.pageant}
2402
2403If this option is enabled, then PuTTY will look for Pageant (the SSH
2404private-key storage agent) and attempt to authenticate with any
2405suitable public keys Pageant currently holds.
2406
2407This behaviour is almost always desirable, and is therefore enabled
2408by default. In rare cases you might need to turn it off in order to
2409force authentication by some non-public-key method such as
2410passwords.
2411
2412This option can also be controlled using the \c{-noagent}
2413command-line option. See \k{using-cmdline-agentauth}.
2414
2415See \k{pageant} for more information about Pageant in general.
2416
421406a4 2417\S{config-ssh-tis} \q{Attempt \I{TIS authentication}TIS or
2418\i{CryptoCard authentication}}
add788fc 2419
70133c0e 2420\cfg{winhelp-topic}{ssh.auth.tis}
2421
d7266888 2422TIS and CryptoCard authentication are (despite their names) generic
2423forms of simple \I{challenge/response authentication}challenge/response
2424authentication available in SSH protocol version 1 only. You might use
2425them if you were using \i{S/Key} \i{one-time passwords}, for example,
2426or if you had a physical \i{security token} that generated responses
9c099835 2427to authentication challenges. They can even be used to prompt for
2428simple passwords.
add788fc 2429
2430With this switch enabled, PuTTY will attempt these forms of
2431authentication if the server is willing to try them. You will be
9c099835 2432presented with a challenge string (which may be different every
add788fc 2433time) and must supply the correct response in order to log in. If
2434your server supports this, you should talk to your system
2435administrator about precisely what form these challenges and
2436responses take.
2437
421406a4 2438\S{config-ssh-ki} \q{Attempt \i{keyboard-interactive authentication}}
81e8bb1b 2439
70133c0e 2440\cfg{winhelp-topic}{ssh.auth.ki}
2441
2e85c969 2442The SSH-2 equivalent of TIS authentication is called
81e8bb1b 2443\q{keyboard-interactive}. It is a flexible authentication method
2444using an arbitrary sequence of requests and responses; so it is not
421406a4 2445only useful for \I{challenge/response authentication}challenge/response
2446mechanisms such as \i{S/Key}, but it can also be used for (for example)
2447asking the user for a \I{password expiry}new password when the old one
2448has expired.
81e8bb1b 2449
2450PuTTY leaves this option enabled by default, but supplies a switch
2451to turn it off in case you should have trouble with it.
2452
421406a4 2453\S{config-ssh-agentfwd} \q{Allow \i{agent forwarding}}
add788fc 2454
70133c0e 2455\cfg{winhelp-topic}{ssh.auth.agentfwd}
2456
add788fc 2457This option allows the SSH server to open forwarded connections back
421406a4 2458to your local copy of \i{Pageant}. If you are not running Pageant, this
add788fc 2459option will do nothing.
2460
2461See \k{pageant} for general information on Pageant, and
2462\k{pageant-forward} for information on agent forwarding. Note that
2463there is a security risk involved with enabling this option; see
2464\k{pageant-security} for details.
2465
421406a4 2466\S{config-ssh-changeuser} \q{Allow attempted \i{changes of username} in SSH-2}
5bb641e1 2467
2468\cfg{winhelp-topic}{ssh.auth.changeuser}
2469
2e85c969 2470In the SSH-1 protocol, it is impossible to change username after
5bb641e1 2471failing to authenticate. So if you mis-type your username at the
2472PuTTY \q{login as:} prompt, you will not be able to change it except
2473by restarting PuTTY.
2474
2e85c969 2475The SSH-2 protocol \e{does} allow changes of username, in principle,
2476but does not make it mandatory for SSH-2 servers to accept them. In
421406a4 2477particular, \i{OpenSSH} does not accept a change of username; once you
5bb641e1 2478have sent one username, it will reject attempts to try to
2479authenticate as another user. (Depending on the version of OpenSSH,
2480it may quietly return failure for all login attempts, or it may send
2481an error message.)
2482
2483For this reason, PuTTY will by default not prompt you for your
2484username more than once, in case the server complains. If you know
2485your server can cope with it, you can enable the \q{Allow attempted
2486changes of username} option to modify PuTTY's behaviour.
2487
421406a4 2488\S{config-ssh-privkey} \q{\ii{Private key} file for authentication}
add788fc 2489
70133c0e 2490\cfg{winhelp-topic}{ssh.auth.privkey}
2491
add788fc 2492This box is where you enter the name of your private key file if you
421406a4 2493are using \i{public key authentication}. See \k{pubkey} for information
add788fc 2494about public key authentication in SSH.
2495
421406a4 2496This key must be in PuTTY's native format (\c{*.\i{PPK}}). If you have a
3e64ff65 2497private key in another format that you want to use with PuTTY, see
2498\k{puttygen-conversions}.
8cee3b72 2499
94cd7c3a 2500If a key file is specified here, and \i{Pageant} is running (see
2501\k{pageant}), PuTTY will first try asking Pageant to authenticate with
2502that key, and ignore any other keys Pageant may have. If that fails,
2503PuTTY will ask for a passphrase as normal.
2504
c6ccd5c2 2505\H{config-ssh-tty} The TTY panel
2506
2507The TTY panel lets you configure the remote pseudo-terminal.
2508
2509\S{config-ssh-pty} \I{pseudo-terminal allocation}\q{Don't allocate
2510a pseudo-terminal}
2511
2512\cfg{winhelp-topic}{ssh.nopty}
2513
2514When connecting to a \i{Unix} system, most \I{interactive
2515connections}interactive shell sessions are run in a \e{pseudo-terminal},
2516which allows the Unix system to pretend it's talking to a real physical
2517terminal device but allows the SSH server to catch all the data coming
2518from that fake device and send it back to the client.
2519
2520Occasionally you might find you have a need to run a session \e{not}
2521in a pseudo-terminal. In PuTTY, this is generally only useful for
2522very specialist purposes; although in Plink (see \k{plink}) it is
2523the usual way of working.
2524
2525\S{config-ttymodes} Sending \i{terminal modes}
2526
2527\cfg{winhelp-topic}{ssh.ttymodes}
2528
2529The SSH protocol allows the client to send \q{terminal modes} for
2530the remote pseudo-terminal. These usually control the server's
2531expectation of the local terminal's behaviour.
2532
2533If your server does not have sensible defaults for these modes, you
2534may find that changing them here helps. If you don't understand any of
2535this, it's safe to leave these settings alone.
2536
2537(None of these settings will have any effect if no pseudo-terminal
2538is requested or allocated.)
2539
2540You can add or modify a mode by selecting it from the drop-down list,
2541choosing whether it's set automatically or to a specific value with
2542the radio buttons and edit box, and hitting \q{Add}. A mode (or
2543several) can be removed from the list by selecting them and hitting
2544\q{Remove}. The effect of the mode list is as follows:
2545
2546\b If a mode is not on the list, it will not be specified to the
2547server under any circumstances.
2548
2549\b If a mode is on the list:
2550
2551\lcont{
2552
2553\b If the \q{Auto} option is selected, the PuTTY tools will decide
2554whether to specify that mode to the server, and if so, will send
2555a sensible value.
2556
2557\lcont{
2558
2559PuTTY proper will send modes that it has an opinion on (currently only
2560the code for the Backspace key, \cw{ERASE}). Plink on Unix
2561will propagate appropriate modes from the local terminal, if any.
2562
2563}
2564
2565\b If a value is specified, it will be sent to the server under all
2566circumstances. The precise syntax of the value box depends on the
2567mode.
2568
2569}
2570
2571By default, all of the available modes are listed as \q{Auto},
2572which should do the right thing in most circumstances.
2573
2574The precise effect of each setting, if any, is up to the server. Their
2575names come from \i{POSIX} and other Unix systems, and they are most
2576likely to have a useful effect on such systems. (These are the same
2577settings that can usually be changed using the \i\c{stty} command once
2578logged in to such servers.)
2579
2580Some notable modes are described below; for fuller explanations, see
2581your server documentation.
2582
2583\b \I{ERASE special character}\cw{ERASE} is the character that when typed
2584by the user will delete one space to the left. When set to \q{Auto}
2585(the default setting), this follows the setting of the local Backspace
2586key in PuTTY (see \k{config-backspace}).
2587
2588\lcont{
2589This and other \i{special character}s are specified using \c{^C} notation
2590for Ctrl-C, and so on. Use \c{^<27>} or \c{^<0x1B>} to specify a
2591character numerically, and \c{^~} to get a literal \c{^}. Other
2592non-control characters are denoted by themselves. Leaving the box
2593entirely blank indicates that \e{no} character should be assigned to
2594the specified function, although this may not be supported by all
2595servers.
2596}
2597
2598\b \I{QUIT special character}\cw{QUIT} is a special character that
2599usually forcefully ends the current process on the server
2600(\cw{SIGQUIT}). On many servers its default setting is Ctrl-backslash
2601(\c{^\\}), which is easy to accidentally invoke on many keyboards. If
2602this is getting in your way, you may want to change it to another
2603character or turn it off entirely.
2604
2605\b Boolean modes such as \cw{ECHO} and \cw{ICANON} can be specified in
2606PuTTY in a variety of ways, such as \cw{true}/\cw{false},
2607\cw{yes}/\cw{no}, and \cw{0}/\cw{1}.
2608
2609\b Terminal speeds are configured elsewhere; see \k{config-termspeed}.
2610
05581745 2611\H{config-ssh-x11} The X11 panel
add788fc 2612
70133c0e 2613\cfg{winhelp-topic}{ssh.tunnels.x11}
2614
421406a4 2615The X11 panel allows you to configure \i{forwarding of X11} over an
05581745 2616SSH connection.
2617
add788fc 2618If your server lets you run X Window System applications, X11
2619forwarding allows you to securely give those applications access to
2620a local X display on your PC.
2621
add788fc 2622To enable X11 forwarding, check the \q{Enable X11 forwarding} box.
46ed7b64 2623If your X display is somewhere unusual, you will need to enter its
2624location in the \q{X display location} box; if this is left blank,
3e64ff65 2625PuTTY will try to find a sensible default in the environment, or use the
46ed7b64 2626primary local display (\c{:0}) if that fails.
add788fc 2627
2f8d6d43 2628See \k{using-x-forwarding} for more information about X11
2629forwarding.
add788fc 2630
421406a4 2631\S{config-ssh-x11auth} Remote \i{X11 authentication}
b3ebaa28 2632
2633\cfg{winhelp-topic}{ssh.tunnels.x11auth}
2634
2635If you are using X11 forwarding, the virtual X server created on the
2636SSH server machine will be protected by authorisation data. This
2637data is invented, and checked, by PuTTY.
2638
2639The usual authorisation method used for this is called
421406a4 2640\i\cw{MIT-MAGIC-COOKIE-1}. This is a simple password-style protocol:
b3ebaa28 2641the X client sends some cookie data to the server, and the server
2642checks that it matches the real cookie. The cookie data is sent over
2643an unencrypted X11 connection; so if you allow a client on a third
2644machine to access the virtual X server, then the cookie will be sent
2645in the clear.
2646
421406a4 2647PuTTY offers the alternative protocol \i\cw{XDM-AUTHORIZATION-1}. This
b3ebaa28 2648is a cryptographically authenticated protocol: the data sent by the
2649X client is different every time, and it depends on the IP address
2650and port of the client's end of the connection and is also stamped
2651with the current time. So an eavesdropper who captures an
2652\cw{XDM-AUTHORIZATION-1} string cannot immediately re-use it for
2653their own X connection.
2654
2655PuTTY's support for \cw{XDM-AUTHORIZATION-1} is a somewhat
2656experimental feature, and may encounter several problems:
2657
2658\b Some X clients probably do not even support
2659\cw{XDM-AUTHORIZATION-1}, so they will not know what to do with the
2660data PuTTY has provided.
2661
186aace2 2662\b This authentication mechanism will only work in SSH-2. In SSH-1,
2663the SSH server does not tell the client the source address of
b3ebaa28 2664a forwarded connection in a machine-readable format, so it's
2665impossible to verify the \cw{XDM-AUTHORIZATION-1} data.
2666
2667\b You may find this feature causes problems with some SSH servers,
2668which will not clean up \cw{XDM-AUTHORIZATION-1} data after a
2669session, so that if you then connect to the same server using
2670a client which only does \cw{MIT-MAGIC-COOKIE-1} and are allocated
2671the same remote display number, you might find that out-of-date
2672authentication data is still present on your server and your X
2673connections fail.
2674
2675PuTTY's default is \cw{MIT-MAGIC-COOKIE-1}. If you change it, you
2676should be sure you know what you're doing.
2677
421406a4 2678\H{config-ssh-portfwd} \I{port forwarding}The Tunnels panel
add788fc 2679
70133c0e 2680\cfg{winhelp-topic}{ssh.tunnels.portfwd}
2681
05581745 2682The Tunnels panel allows you to configure tunnelling of arbitrary
2683connection types through an SSH connection.
2684
421406a4 2685Port forwarding allows you to tunnel other types of \i{network
2686connection} down an SSH session. See \k{using-port-forwarding} for a
2f8d6d43 2687general discussion of port forwarding and how it works.
2688
2689The port forwarding section in the Tunnels panel shows a list of all
2690the port forwardings that PuTTY will try to set up when it connects
2691to the server. By default no port forwardings are set up, so this
2692list is empty.
2693
2694To add a port forwarding:
2695
2696\b Set one of the \q{Local} or \q{Remote} radio buttons, depending
421406a4 2697on whether you want to \I{local port forwarding}forward a local port
2698to a remote destination (\q{Local}) or \I{remote port forwarding}forward
2699a remote port to a local destination (\q{Remote}). Alternatively,
2700select \q{Dynamic} if you want PuTTY to \I{dynamic port forwarding}provide
5193e45c 2701a local SOCKS 4/4A/5 proxy on a local port (note that this proxy only
2702supports TCP connections; the SSH protocol does not support forwarding
2703\i{UDP}).
2f8d6d43 2704
421406a4 2705\b Enter a source \i{port number} into the \q{Source port} box. For
2f8d6d43 2706local forwardings, PuTTY will listen on this port of your PC. For
2707remote forwardings, your SSH server will listen on this port of the
2708remote machine. Note that most servers will not allow you to listen
421406a4 2709on \I{privileged port}port numbers less than 1024.
2f8d6d43 2710
48b7c4b2 2711\b If you have selected \q{Local} or \q{Remote} (this step is not
2712needed with \q{Dynamic}), enter a hostname and port number separated
2713by a colon, in the \q{Destination} box. Connections received on the
2714source port will be directed to this destination. For example, to
2715connect to a POP-3 server, you might enter
2716\c{popserver.example.com:110}.
2f8d6d43 2717
2718\b Click the \q{Add} button. Your forwarding details should appear
2719in the list box.
2720
2721To remove a port forwarding, simply select its details in the list
2722box, and click the \q{Remove} button.
37c6fce1 2723
421406a4 2724In the \q{Source port} box, you can also optionally enter an \I{listen
2725address}IP address to listen on, by specifying (for instance)
2726\c{127.0.0.5:79}.
dbe6c525 2727See \k{using-port-forwarding} for more information on how this
2728works and its restrictions.
6ee9b735 2729
421406a4 2730In place of port numbers, you can enter \i{service names}, if they are
d56f5878 2731known to the local system. For instance, in the \q{Destination} box,
2732you could enter \c{popserver.example.com:pop3}.
2733
9711106b 2734You can \I{port forwarding, changing mid-session}modify the currently
2735active set of port forwardings in mid-session using \q{Change
2736Settings} (see \k{using-changesettings}). If you delete a local or
2737dynamic port forwarding in mid-session, PuTTY will stop listening for
2738connections on that port, so it can be re-used by another program. If
2739you delete a remote port forwarding, note that:
fda2feb1 2740
2e85c969 2741\b The SSH-1 protocol contains no mechanism for asking the server to
fda2feb1 2742stop listening on a remote port.
2743
2e85c969 2744\b The SSH-2 protocol does contain such a mechanism, but not all SSH
421406a4 2745servers support it. (In particular, \i{OpenSSH} does not support it in
fda2feb1 2746any version earlier than 3.9.)
2747
2748If you ask to delete a remote port forwarding and PuTTY cannot make
2749the server actually stop listening on the port, it will instead just
2750start refusing incoming connections on that port. Therefore,
2751although the port cannot be reused by another program, you can at
2752least be reasonably sure that server-side programs can no longer
2753access the service at your end of the port forwarding.
2754
d56f5878 2755If you delete a forwarding, any existing connections established using
2756that forwarding remain open. Similarly, changes to global settings
2757such as \q{Local ports accept connections from other hosts} only take
2758effect on new forwardings.
2759
beefa433 2760\S{config-ssh-portfwd-localhost} Controlling the visibility of
2761forwarded ports
2762
2763\cfg{winhelp-topic}{ssh.tunnels.portfwd.localhost}
2764
2765The source port for a forwarded connection usually does not accept
421406a4 2766connections from any machine except the \I{localhost}SSH client or
2767server machine itself (for local and remote forwardings respectively).
2768There are controls in the Tunnels panel to change this:
beefa433 2769
2770\b The \q{Local ports accept connections from other hosts} option
2771allows you to set up local-to-remote port forwardings in such a way
2772that machines other than your client PC can connect to the forwarded
48b7c4b2 2773port. (This also applies to dynamic SOCKS forwarding.)
beefa433 2774
2775\b The \q{Remote ports do the same} option does the same thing for
2776remote-to-local port forwardings (so that machines other than the
2777SSH server machine can connect to the forwarded port.) Note that
2e85c969 2778this feature is only available in the SSH-2 protocol, and not all
421406a4 2779SSH-2 servers support it (\i{OpenSSH} 3.0 does not, for example).
beefa433 2780
421406a4 2781\S{config-ssh-portfwd-address-family} Selecting \i{Internet protocol
2782version} for forwarded ports
05581745 2783
2784\cfg{winhelp-topic}{ssh.tunnels.portfwd.ipversion}
2785
421406a4 2786This switch allows you to select a specific Internet protocol (\i{IPv4}
2787or \i{IPv6}) for the local end of a forwarded port. By default, it is
05581745 2788set on \q{Auto}, which means that:
2789
2790\b for a local-to-remote port forwarding, PuTTY will listen for
2791incoming connections in both IPv4 and (if available) IPv6
2792
2793\b for a remote-to-local port forwarding, PuTTY will choose a
2794sensible protocol for the outgoing connection.
2795
2e523aed 2796This overrides the general Internet protocol version preference
2797on the Connection panel (see \k{config-address-family}).
2798
ae400b95 2799Note that some operating systems may listen for incoming connections
2800in IPv4 even if you specifically asked for IPv6, because their IPv4
421406a4 2801and IPv6 protocol stacks are linked together. Apparently \i{Linux} does
ae400b95 2802this, and Windows does not. So if you're running PuTTY on Windows
2803and you tick \q{IPv6} for a local or dynamic port forwarding, it
2804will \e{only} be usable by connecting to it using IPv6; whereas if
2805you do the same on Linux, you can also use it with IPv4. However,
2806ticking \q{Auto} should always give you a port which you can connect
2807to using either protocol.
05581745 2808
421406a4 2809\H{config-ssh-bugs} \I{SSH server bugs}The Bugs panel
2c9c6388 2810
2811Not all SSH servers work properly. Various existing servers have
2812bugs in them, which can make it impossible for a client to talk to
2813them unless it knows about the bug and works around it.
2814
2815Since most servers announce their software version number at the
2816beginning of the SSH connection, PuTTY will attempt to detect which
2817bugs it can expect to see in the server and automatically enable
2818workarounds. However, sometimes it will make mistakes; if the server
2819has been deliberately configured to conceal its version number, or
2820if the server is a version which PuTTY's bug database does not know
2821about, then PuTTY will not know what bugs to expect.
2822
2823The Bugs panel allows you to manually configure the bugs PuTTY
2824expects to see in the server. Each bug can be configured in three
2825states:
2826
2827\b \q{Off}: PuTTY will assume the server does not have the bug.
2828
2829\b \q{On}: PuTTY will assume the server \e{does} have the bug.
2830
2831\b \q{Auto}: PuTTY will use the server's version number announcement
2832to try to guess whether or not the server has the bug.
2833
421406a4 2834\S{config-ssh-bug-ignore1} \q{Chokes on SSH-1 \i{ignore message}s}
2c9c6388 2835
2836\cfg{winhelp-topic}{ssh.bugs.ignore1}
2837
2838An ignore message (SSH_MSG_IGNORE) is a message in the SSH protocol
2839which can be sent from the client to the server, or from the server
2840to the client, at any time. Either side is required to ignore the
bf982899 2841message whenever it receives it. PuTTY uses ignore messages to
2842\I{password camouflage}hide the password packet in SSH-1, so that
2843a listener cannot tell the length of the user's password; it also
2844uses ignore messages for connection \i{keepalives} (see
2845\k{config-keepalive}).
2c9c6388 2846
2847If this bug is detected, PuTTY will stop using ignore messages. This
2848means that keepalives will stop working, and PuTTY will have to fall
2e85c969 2849back to a secondary defence against SSH-1 password-length
2c9c6388 2850eavesdropping. See \k{config-ssh-bug-plainpw1}. If this bug is
2851enabled when talking to a correct server, the session will succeed,
2852but keepalives will not work and the session might be more
2853vulnerable to eavesdroppers than it could be.
2854
2e85c969 2855This is an SSH-1-specific bug. No known SSH-2 server fails to deal
2856with SSH-2 ignore messages.
2c9c6388 2857
421406a4 2858\S{config-ssh-bug-plainpw1} \q{Refuses all SSH-1 \i{password camouflage}}
2c9c6388 2859
2860\cfg{winhelp-topic}{ssh.bugs.plainpw1}
2861
2e85c969 2862When talking to an SSH-1 server which cannot deal with ignore
2c9c6388 2863messages (see \k{config-ssh-bug-ignore1}), PuTTY will attempt to
2864disguise the length of the user's password by sending additional
2865padding \e{within} the password packet. This is technically a
2e85c969 2866violation of the SSH-1 specification, and so PuTTY will only do it
2c9c6388 2867when it cannot use standards-compliant ignore messages as
2868camouflage. In this sense, for a server to refuse to accept a padded
2869password packet is not really a bug, but it does make life
2870inconvenient if the server can also not handle ignore messages.
2871
bf982899 2872If this \q{bug} is detected, PuTTY will assume that neither ignore
2873messages nor padding are acceptable, and that it thus has no choice
2874but to send the user's password with no form of camouflage, so that
2875an eavesdropping user will be easily able to find out the exact length
2c9c6388 2876of the password. If this bug is enabled when talking to a correct
2877server, the session will succeed, but will be more vulnerable to
2878eavesdroppers than it could be.
2879
2e85c969 2880This is an SSH-1-specific bug. SSH-2 is secure against this type of
2c9c6388 2881attack.
2882
421406a4 2883\S{config-ssh-bug-rsa1} \q{Chokes on SSH-1 \i{RSA} authentication}
2c9c6388 2884
2885\cfg{winhelp-topic}{ssh.bugs.rsa1}
2886
2e85c969 2887Some SSH-1 servers cannot deal with RSA authentication messages at
421406a4 2888all. If \i{Pageant} is running and contains any SSH-1 keys, PuTTY will
2c9c6388 2889normally automatically try RSA authentication before falling back to
2890passwords, so these servers will crash when they see the RSA attempt.
2891
2892If this bug is detected, PuTTY will go straight to password
2893authentication. If this bug is enabled when talking to a correct
2894server, the session will succeed, but of course RSA authentication
2895will be impossible.
2896
2e85c969 2897This is an SSH-1-specific bug.
2c9c6388 2898
2e85c969 2899\S{config-ssh-bug-hmac2} \q{Miscomputes SSH-2 HMAC keys}
2c9c6388 2900
2901\cfg{winhelp-topic}{ssh.bugs.hmac2}
2902
2903Versions 2.3.0 and below of the SSH server software from
421406a4 2904\cw{ssh.com} compute the keys for their \i{HMAC} \i{message authentication
2905code}s incorrectly. A typical symptom of this problem is that PuTTY
2c9c6388 2906dies unexpectedly at the beginning of the session, saying
2907\q{Incorrect MAC received on packet}.
2908
2909If this bug is detected, PuTTY will compute its HMAC keys in the
2910same way as the buggy server, so that communication will still be
2911possible. If this bug is enabled when talking to a correct server,
2912communication will fail.
2913
2e85c969 2914This is an SSH-2-specific bug.
2c9c6388 2915
421406a4 2916\S{config-ssh-bug-derivekey2} \q{Miscomputes SSH-2 \i{encryption} keys}
2c9c6388 2917
2918\cfg{winhelp-topic}{ssh.bugs.derivekey2}
2919
421406a4 2920Versions below 2.0.11 of the SSH server software from \i\cw{ssh.com}
2c9c6388 2921compute the keys for the session encryption incorrectly. This
2922problem can cause various error messages, such as \q{Incoming packet
2923was garbled on decryption}, or possibly even \q{Out of memory}.
2924
2925If this bug is detected, PuTTY will compute its encryption keys in
2926the same way as the buggy server, so that communication will still
2927be possible. If this bug is enabled when talking to a correct
2928server, communication will fail.
2929
2e85c969 2930This is an SSH-2-specific bug.
2c9c6388 2931
421406a4 2932\S{config-ssh-bug-sig} \q{Requires padding on SSH-2 \i{RSA} \i{signatures}}
2c9c6388 2933
2934\cfg{winhelp-topic}{ssh.bugs.rsapad2}
2935
421406a4 2936Versions below 3.3 of \i{OpenSSH} require SSH-2 RSA signatures to be
2c9c6388 2937padded with zero bytes to the same length as the RSA key modulus.
4f47cacf 2938The SSH-2 specification says that an unpadded signature MUST be
2c9c6388 2939accepted, so this is a bug. A typical symptom of this problem is
2940that PuTTY mysteriously fails RSA authentication once in every few
2941hundred attempts, and falls back to passwords.
2942
2943If this bug is detected, PuTTY will pad its signatures in the way
2944OpenSSH expects. If this bug is enabled when talking to a correct
2945server, it is likely that no damage will be done, since correct
2946servers usually still accept padded signatures because they're used
2947to talking to OpenSSH.
2948
2e85c969 2949This is an SSH-2-specific bug.
2c9c6388 2950
421406a4 2951\S{config-ssh-bug-pksessid2} \q{Misuses the \i{session ID} in SSH-2 PK auth}
dda87a28 2952
739c28d0 2953\cfg{winhelp-topic}{ssh.bugs.pksessid2}
dda87a28 2954
421406a4 2955Versions below 2.3 of \i{OpenSSH} require SSH-2 \i{public-key authentication}
dda87a28 2956to be done slightly differently: the data to be signed by the client
2957contains the session ID formatted in a different way. If public-key
2958authentication mysteriously does not work but the Event Log (see
2959\k{using-eventlog}) thinks it has successfully sent a signature, it
2960might be worth enabling the workaround for this bug to see if it
2961helps.
2962
2963If this bug is detected, PuTTY will sign data in the way OpenSSH
2964expects. If this bug is enabled when talking to a correct server,
2e85c969 2965SSH-2 public-key authentication will fail.
dda87a28 2966
2e85c969 2967This is an SSH-2-specific bug.
dda87a28 2968
19f47a7d 2969\S{config-ssh-bug-rekey} \q{Handles SSH-2 key re-exchange badly}
f382c87d 2970
2971\cfg{winhelp-topic}{ssh.bugs.rekey2}
2972
421406a4 2973Some SSH servers cannot cope with \i{repeat key exchange} at
f382c87d 2974all, and will ignore attempts by the client to start one. Since
2975PuTTY pauses the session while performing a repeat key exchange, the
2976effect of this would be to cause the session to hang after an hour
2977(unless you have your rekey timeout set differently; see
2978\k{config-ssh-kex-rekey} for more about rekeys).
e12d95a5 2979Other, very old, SSH servers handle repeat key exchange even more
2980badly, and disconnect upon receiving a repeat key exchange request.
f382c87d 2981
2982If this bug is detected, PuTTY will never initiate a repeat key
2983exchange. If this bug is enabled when talking to a correct server,
2984the session should still function, but may be less secure than you
2985would expect.
2986
2e85c969 2987This is an SSH-2-specific bug.
f382c87d 2988
1cb8218f 2989\S{config-ssh-bug-maxpkt2} \q{Ignores SSH-2 \i{maximum packet size}}
c9739dba 2990
2991\cfg{winhelp-topic}{ssh.bugs.maxpkt2}
2992
2993When an SSH-2 channel is set up, each end announces the maximum size
2994of data packet that it is willing to receive for that channel. Some
2995servers ignore PuTTY's announcement and send packets larger than PuTTY
2996is willing to accept, causing it to report \q{Incoming packet was
2997garbled on decryption}.
2998
2999If this bug is detected, PuTTY never allows the channel's
3000\i{flow-control window} to grow large enough to allow the server to
3001send an over-sized packet. If this bug is enabled when talking to a
3002correct server, the session will work correctly, but download
3003performance will be less than it could be.
3004
7374c779 3005\H{config-serial} The Serial panel
3006
3007The \i{Serial} panel allows you to configure options that only apply
3008when PuTTY is connecting to a local \I{serial port}\i{serial line}.
3009
3010\S{config-serial-line} Selecting a serial line to connect to
3011
3012\cfg{winhelp-topic}{serial.line}
3013
3014The \q{Serial line to connect to} box allows you to choose which
3015serial line you want PuTTY to talk to, if your computer has more
3016than one serial port.
3017
14ff41e7 3018On Windows, the first serial line is called \i\cw{COM1}, and if there
934dbf05 3019is a second it is called \cw{COM2}, and so on.
7374c779 3020
3021This configuration setting is also visible on the Session panel,
3022where it replaces the \q{Host Name} box (see \k{config-hostname}) if
3023the connection type is set to \q{Serial}.
3024
3025\S{config-serial-speed} Selecting the speed of your serial line
3026
3027\cfg{winhelp-topic}{serial.speed}
3028
3029The \q{Speed} box allows you to choose the speed (or \q{baud rate})
3030at which to talk to the serial line. Typical values might be 9600,
303119200, 38400 or 57600. Which one you need will depend on the device
3032at the other end of the serial cable; consult the manual for that
3033device if you are in doubt.
3034
3035This configuration setting is also visible on the Session panel,
3036where it replaces the \q{Port} box (see \k{config-hostname}) if the
3037connection type is set to \q{Serial}.
3038
3039\S{config-serial-databits} Selecting the number of data bits
3040
3041\cfg{winhelp-topic}{serial.databits}
3042
3043The \q{Data bits} box allows you to choose how many data bits are
3044transmitted in each byte sent or received through the serial line.
3045Typical values are 7 or 8.
3046
3047\S{config-serial-stopbits} Selecting the number of stop bits
3048
3049\cfg{winhelp-topic}{serial.stopbits}
3050
3051The \q{Stop bits} box allows you to choose how many stop bits are
3052used in the serial line protocol. Typical values are 1, 1.5 or 2.
3053
3054\S{config-serial-parity} Selecting the serial parity checking scheme
3055
3056\cfg{winhelp-topic}{serial.parity}
3057
3058The \q{Parity} box allows you to choose what type of parity checking
3059is used on the serial line. The settings are:
3060
3061\b \q{None}: no parity bit is sent at all.
3062
3063\b \q{Odd}: an extra parity bit is sent alongside each byte, and
3064arranged so that the total number of 1 bits is odd.
3065
3066\b \q{Even}: an extra parity bit is sent alongside each byte, and
3067arranged so that the total number of 1 bits is even.
3068
3069\b \q{Mark}: an extra parity bit is sent alongside each byte, and
3070always set to 1.
3071
3072\b \q{Space}: an extra parity bit is sent alongside each byte, and
3073always set to 0.
3074
3075\S{config-serial-flow} Selecting the serial flow control scheme
3076
3077\cfg{winhelp-topic}{serial.flow}
3078
3079The \q{Flow control} box allows you to choose what type of flow
3080control checking is used on the serial line. The settings are:
3081
3082\b \q{None}: no flow control is done. Data may be lost if either
3083side attempts to send faster than the serial line permits.
3084
3085\b \q{XON/XOFF}: flow control is done by sending XON and XOFF
3086characters within the data stream.
3087
3088\b \q{RTS/CTS}: flow control is done using the RTS and CTS wires on
3089the serial line.
3090
3091\b \q{DSR/DTR}: flow control is done using the DSR and DTR wires on
3092the serial line.
3093
421406a4 3094\H{config-file} \ii{Storing configuration in a file}
37c6fce1 3095
3096PuTTY does not currently support storing its configuration in a file
421406a4 3097instead of the \i{Registry}. However, you can work around this with a
3098couple of \i{batch file}s.
37c6fce1 3099
3100You will need a file called (say) \c{PUTTY.BAT} which imports the
3101contents of a file into the Registry, then runs PuTTY, exports the
3102contents of the Registry back into the file, and deletes the
3103Registry entries. This can all be done using the Regedit command
3104line options, so it's all automatic. Here is what you need in
3105\c{PUTTY.BAT}:
3106
3107\c @ECHO OFF
3108\c regedit /s putty.reg
3109\c regedit /s puttyrnd.reg
3110\c start /w putty.exe
35cffede 3111\c regedit /ea new.reg HKEY_CURRENT_USER\Software\SimonTatham\PuTTY
3112\c copy new.reg putty.reg
3113\c del new.reg
37c6fce1 3114\c regedit /s puttydel.reg
3115
3116This batch file needs two auxiliary files: \c{PUTTYRND.REG} which
3117sets up an initial safe location for the \c{PUTTY.RND} random seed
3118file, and \c{PUTTYDEL.REG} which destroys everything in the Registry
3119once it's been successfully saved back to the file.
3120
3121Here is \c{PUTTYDEL.REG}:
3122
3123\c REGEDIT4
3124\c
3125\c [-HKEY_CURRENT_USER\Software\SimonTatham\PuTTY]
3126
3127Here is an example \c{PUTTYRND.REG} file:
3128
3129\c REGEDIT4
3130\c
3131\c [HKEY_CURRENT_USER\Software\SimonTatham\PuTTY]
5f9857d0 3132\c "RandSeedFile"="a:\\putty.rnd"
37c6fce1 3133
3134You should replace \c{a:\\putty.rnd} with the location where you
3135want to store your random number data. If the aim is to carry around
3136PuTTY and its settings on one floppy, you probably want to store it
3137on the floppy.