File: Chapter4.html

package info (click to toggle)
putty 0.83-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 13,216 kB
  • sloc: ansic: 148,476; python: 8,466; perl: 1,830; makefile: 128; sh: 117
file content (2813 lines) | stat: -rw-r--r-- 239,213 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=US-ASCII">
<title>Configuring PuTTY</title>
<link rel="previous" href="Chapter3.html">
<link rel="ToC" href="index.html">
<link rel="up" href="index.html">
<link rel="index" href="IndexPage.html">
<link rel="next" href="Chapter5.html">
</head>
<body>
<p><a href="Chapter3.html">Previous</a> | <a href="index.html">Contents</a> | <a href="IndexPage.html">Index</a> | <a href="Chapter5.html">Next</a></p>

<ul>
<li><a href="#config">Chapter 4: Configuring PuTTY</a>
<ul>
<li><a href="#config-session">4.1 The Session panel</a>
<ul>
<li><a href="#config-hostname">4.1.1 The host name section</a></li>
<li><a href="#config-saving">4.1.2 Loading and storing saved sessions</a></li>
<li><a href="#config-closeonexit">4.1.3 &#8216;Close window on exit&#8217;</a></li>
</ul></li>
<li><a href="#config-logging">4.2 The Logging panel</a>
<ul>
<li><a href="#config-logfilename">4.2.1 &#8216;Log file name&#8217;</a></li>
<li><a href="#config-logfileexists">4.2.2 &#8216;What to do if the log file already exists&#8217;</a></li>
<li><a href="#config-logflush">4.2.3 &#8216;Flush log file frequently&#8217;</a></li>
<li><a href="#config-logheader">4.2.4 &#8216;Include header&#8217;</a></li>
<li><a href="#config-logssh">4.2.5 Options specific to SSH packet logging</a></li>
</ul></li>
<li><a href="#config-terminal">4.3 The Terminal panel</a>
<ul>
<li><a href="#config-autowrap">4.3.1 &#8216;Auto wrap mode initially on&#8217;</a></li>
<li><a href="#config-decom">4.3.2 &#8216;DEC Origin Mode initially on&#8217;</a></li>
<li><a href="#config-crlf">4.3.3 &#8216;Implicit CR in every LF&#8217;</a></li>
<li><a href="#config-lfcr">4.3.4 &#8216;Implicit LF in every CR&#8217;</a></li>
<li><a href="#config-erase">4.3.5 &#8216;Use background colour to erase screen&#8217;</a></li>
<li><a href="#config-blink">4.3.6 &#8216;Enable blinking text&#8217;</a></li>
<li><a href="#config-answerback">4.3.7 &#8216;Answerback to ^E&#8217;</a></li>
<li><a href="#config-localecho">4.3.8 &#8216;Local echo&#8217;</a></li>
<li><a href="#config-localedit">4.3.9 &#8216;Local line editing&#8217;</a></li>
<li><a href="#config-printing">4.3.10 Remote-controlled printing</a></li>
</ul></li>
<li><a href="#config-keyboard">4.4 The Keyboard panel</a>
<ul>
<li><a href="#config-backspace">4.4.1 Changing the action of the Backspace key</a></li>
<li><a href="#config-homeend">4.4.2 Changing the action of the Home and End keys</a></li>
<li><a href="#config-funkeys">4.4.3 Changing the action of the function keys and keypad</a></li>
<li><a href="#config-sharrow">4.4.4 Changing the action of the shifted arrow keys</a></li>
<li><a href="#config-appcursor">4.4.5 Controlling Application Cursor Keys mode</a></li>
<li><a href="#config-appkeypad">4.4.6 Controlling Application Keypad mode</a></li>
<li><a href="#config-nethack">4.4.7 Using NetHack keypad mode</a></li>
<li><a href="#config-compose">4.4.8 Enabling a DEC-like Compose key</a></li>
<li><a href="#config-ctrlalt">4.4.9 &#8216;Control-Alt is different from AltGr&#8217;</a></li>
</ul></li>
<li><a href="#config-bell">4.5 The Bell panel</a>
<ul>
<li><a href="#config-bellstyle">4.5.1 &#8216;Set the style of bell&#8217;</a></li>
<li><a href="#config-belltaskbar">4.5.2 &#8216;Taskbar/caption indication on bell&#8217;</a></li>
<li><a href="#config-bellovl">4.5.3 &#8216;Control the bell overload behaviour&#8217;</a></li>
</ul></li>
<li><a href="#config-features">4.6 The Features panel</a>
<ul>
<li><a href="#config-features-application">4.6.1 Disabling application keypad and cursor keys</a></li>
<li><a href="#config-features-mouse">4.6.2 Disabling <code>xterm</code>-style mouse reporting</a></li>
<li><a href="#config-features-resize">4.6.3 Disabling remote terminal resizing</a></li>
<li><a href="#config-features-altscreen">4.6.4 Disabling switching to the alternate screen</a></li>
<li><a href="#config-features-retitle">4.6.5 Disabling remote window title changing</a></li>
<li><a href="#config-features-qtitle">4.6.6 Response to remote window title querying</a></li>
<li><a href="#config-features-clearscroll">4.6.7 Disabling remote scrollback clearing</a></li>
<li><a href="#config-features-dbackspace">4.6.8 Disabling destructive backspace</a></li>
<li><a href="#config-features-charset">4.6.9 Disabling remote character set configuration</a></li>
<li><a href="#config-features-shaping">4.6.10 Disabling Arabic text shaping</a></li>
<li><a href="#config-features-bidi">4.6.11 Disabling bidirectional text display</a></li>
<li><a href="#config-features-bracketedpaste">4.6.12 Disabling bracketed paste mode</a></li>
</ul></li>
<li><a href="#config-window">4.7 The Window panel</a>
<ul>
<li><a href="#config-winsize">4.7.1 Setting the size of the PuTTY window</a></li>
<li><a href="#config-winsizelock">4.7.2 What to do when the window is resized</a></li>
<li><a href="#config-scrollback">4.7.3 Controlling scrollback</a></li>
<li><a href="#config-erasetoscrollback">4.7.4 &#8216;Push erased text into scrollback&#8217;</a></li>
</ul></li>
<li><a href="#config-appearance">4.8 The Appearance panel</a>
<ul>
<li><a href="#config-cursor">4.8.1 Controlling the appearance of the cursor</a></li>
<li><a href="#config-font">4.8.2 Controlling the font used in the terminal window</a></li>
<li><a href="#config-mouseptr">4.8.3 &#8216;Hide mouse pointer when typing in window&#8217;</a></li>
<li><a href="#config-winborder">4.8.4 Controlling the window border</a></li>
</ul></li>
<li><a href="#config-behaviour">4.9 The Behaviour panel</a>
<ul>
<li><a href="#config-title">4.9.1 Controlling the window title</a></li>
<li><a href="#config-warnonclose">4.9.2 &#8216;Warn before closing window&#8217;</a></li>
<li><a href="#config-altf4">4.9.3 &#8216;Window closes on ALT-F4&#8217;</a></li>
<li><a href="#config-altspace">4.9.4 &#8216;System menu appears on ALT-Space&#8217;</a></li>
<li><a href="#config-altonly">4.9.5 &#8216;System menu appears on Alt alone&#8217;</a></li>
<li><a href="#config-alwaysontop">4.9.6 &#8216;Ensure window is always on top&#8217;</a></li>
<li><a href="#config-fullscreen">4.9.7 &#8216;Full screen on Alt-Enter&#8217;</a></li>
</ul></li>
<li><a href="#config-translation">4.10 The Translation panel</a>
<ul>
<li><a href="#config-charset">4.10.1 Controlling character set translation</a></li>
<li><a href="#config-cjk-ambig-wide">4.10.2 &#8216;Treat CJK ambiguous characters as wide&#8217;</a></li>
<li><a href="#config-cyr">4.10.3 &#8216;Caps Lock acts as Cyrillic switch&#8217;</a></li>
<li><a href="#config-linedraw">4.10.4 Controlling display of line-drawing characters</a></li>
<li><a href="#config-linedrawpaste">4.10.5 Controlling copy and paste of line drawing characters</a></li>
<li><a href="#config-utf8linedraw">4.10.6 Combining VT100 line-drawing with UTF-8</a></li>
</ul></li>
<li><a href="#config-selection">4.11 The Selection panel</a>
<ul>
<li><a href="#config-mouse">4.11.1 Changing the actions of the mouse buttons</a></li>
<li><a href="#config-mouseshift">4.11.2 &#8216;Shift overrides application's use of mouse&#8217;</a></li>
<li><a href="#config-rectselect">4.11.3 Default selection mode</a></li>
<li><a href="#config-clipboards">4.11.4 Assigning copy and paste actions to clipboards</a></li>
<li><a href="#config-paste-ctrl-char">4.11.5 &#8216;Permit control characters in pasted text&#8217;</a></li>
</ul></li>
<li><a href="#config-selection-copy">4.12 The Copy panel</a>
<ul>
<li><a href="#config-charclasses">4.12.1 Character classes</a></li>
<li><a href="#config-rtfcopy">4.12.2 Copying in Rich Text Format</a></li>
</ul></li>
<li><a href="#config-colours">4.13 The Colours panel</a>
<ul>
<li><a href="#config-ansicolour">4.13.1 &#8216;Allow terminal to specify ANSI colours&#8217;</a></li>
<li><a href="#config-xtermcolour">4.13.2 &#8216;Allow terminal to use xterm 256-colour mode&#8217;</a></li>
<li><a href="#config-truecolour">4.13.3 &#8216;Allow terminal to use 24-bit colour&#8217;</a></li>
<li><a href="#config-boldcolour">4.13.4 &#8216;Indicate bolded text by changing...&#8217;</a></li>
<li><a href="#config-logpalette">4.13.5 &#8216;Attempt to use logical palettes&#8217;</a></li>
<li><a href="#config-syscolour">4.13.6 &#8216;Use system colours&#8217;</a></li>
<li><a href="#config-colourcfg">4.13.7 Adjusting the colours in the terminal window</a></li>
</ul></li>
<li><a href="#config-connection">4.14 The Connection panel</a>
<ul>
<li><a href="#config-keepalive">4.14.1 Using keepalives to prevent disconnection</a></li>
<li><a href="#config-nodelay">4.14.2 &#8216;Disable Nagle's algorithm&#8217;</a></li>
<li><a href="#config-tcp-keepalives">4.14.3 &#8216;Enable TCP keepalives&#8217;</a></li>
<li><a href="#config-address-family">4.14.4 &#8216;Internet protocol version&#8217;</a></li>
<li><a href="#config-loghost">4.14.5 &#8216;Logical name of remote host&#8217;</a></li>
</ul></li>
<li><a href="#config-data">4.15 The Data panel</a>
<ul>
<li><a href="#config-username">4.15.1 &#8216;Auto-login username&#8217;</a></li>
<li><a href="#config-username-from-env">4.15.2 Use of system username</a></li>
<li><a href="#config-termtype">4.15.3 &#8216;Terminal-type string&#8217;</a></li>
<li><a href="#config-termspeed">4.15.4 &#8216;Terminal speeds&#8217;</a></li>
<li><a href="#config-environ">4.15.5 Setting environment variables on the server</a></li>
</ul></li>
<li><a href="#config-proxy">4.16 The Proxy panel</a>
<ul>
<li><a href="#config-proxy-type">4.16.1 Setting the proxy type</a></li>
<li><a href="#config-proxy-exclude">4.16.2 Excluding parts of the network from proxying</a></li>
<li><a href="#config-proxy-dns">4.16.3 Name resolution when using a proxy</a></li>
<li><a href="#config-proxy-auth">4.16.4 Username and password</a></li>
<li><a href="#config-proxy-command">4.16.5 Specifying the Telnet, SSH, or Local proxy command</a></li>
<li><a href="#config-proxy-logging">4.16.6 Controlling proxy logging</a></li>
</ul></li>
<li><a href="#config-ssh">4.17 The SSH panel</a>
<ul>
<li><a href="#config-command">4.17.1 Executing a specific command on the server</a></li>
<li><a href="#config-ssh-noshell">4.17.2 &#8216;Don't start a shell or command at all&#8217;</a></li>
<li><a href="#config-ssh-comp">4.17.3 &#8216;Enable compression&#8217;</a></li>
<li><a href="#config-ssh-prot">4.17.4 &#8216;SSH protocol version&#8217;</a></li>
<li><a href="#config-ssh-sharing">4.17.5 Sharing an SSH connection between PuTTY tools</a></li>
</ul></li>
<li><a href="#config-ssh-kex">4.18 The Kex panel</a>
<ul>
<li><a href="#config-ssh-kex-order">4.18.1 Key exchange algorithm selection</a></li>
<li><a href="#config-ssh-kex-rekey">4.18.2 Repeat key exchange</a></li>
</ul></li>
<li><a href="#config-ssh-hostkey">4.19 The Host Keys panel</a>
<ul>
<li><a href="#config-ssh-hostkey-order">4.19.1 Host key type selection</a></li>
<li><a href="#config-ssh-prefer-known-hostkeys">4.19.2 Preferring known host keys</a></li>
<li><a href="#config-ssh-kex-manual-hostkeys">4.19.3 Manually configuring host keys</a></li>
<li><a href="#config-ssh-kex-cert">4.19.4 Configuring PuTTY to accept host certificates</a></li>
</ul></li>
<li><a href="#config-ssh-encryption">4.20 The Cipher panel</a></li>
<li><a href="#config-ssh-auth">4.21 The Auth panel</a>
<ul>
<li><a href="#config-ssh-banner">4.21.1 &#8216;Display pre-authentication banner&#8217;</a></li>
<li><a href="#config-ssh-noauth">4.21.2 &#8216;Bypass authentication entirely&#8217;</a></li>
<li><a href="#config-ssh-notrivialauth">4.21.3 &#8216;Disconnect if authentication succeeds trivially&#8217;</a></li>
<li><a href="#config-ssh-tryagent">4.21.4 &#8216;Attempt authentication using Pageant&#8217;</a></li>
<li><a href="#config-ssh-tis">4.21.5 &#8216;Attempt TIS or CryptoCard authentication&#8217;</a></li>
<li><a href="#config-ssh-ki">4.21.6 &#8216;Attempt keyboard-interactive authentication&#8217;</a></li>
<li><a href="#config-ssh-agentfwd">4.21.7 &#8216;Allow agent forwarding&#8217;</a></li>
<li><a href="#config-ssh-changeuser">4.21.8 &#8216;Allow attempted changes of username in SSH-2&#8217;</a></li>
</ul></li>
<li><a href="#config-ssh-auth-creds">4.22 The Credentials panel</a>
<ul>
<li><a href="#config-ssh-privkey">4.22.1 &#8216;Private key file for authentication&#8217;</a></li>
<li><a href="#config-ssh-cert">4.22.2 &#8216;Certificate to use with the private key&#8217;</a></li>
<li><a href="#config-ssh-authplugin">4.22.3 &#8216;Plugin to provide authentication responses&#8217;</a></li>
</ul></li>
<li><a href="#config-ssh-auth-gssapi">4.23 The GSSAPI panel</a>
<ul>
<li><a href="#config-ssh-auth-gssapi-delegation">4.23.1 &#8216;Allow GSSAPI credential delegation&#8217;</a></li>
<li><a href="#config-ssh-auth-gssapi-libraries">4.23.2 Preference order for GSSAPI libraries</a></li>
</ul></li>
<li><a href="#config-ssh-tty">4.24 The TTY panel</a>
<ul>
<li><a href="#config-ssh-pty">4.24.1 &#8216;Don't allocate a pseudo-terminal&#8217;</a></li>
<li><a href="#config-ttymodes">4.24.2 Sending terminal modes</a></li>
</ul></li>
<li><a href="#config-ssh-x11">4.25 The X11 panel</a>
<ul>
<li><a href="#config-ssh-x11auth">4.25.1 Remote X11 authentication</a></li>
<li><a href="#config-ssh-xauthority">4.25.2 X authority file for local display</a></li>
</ul></li>
<li><a href="#config-ssh-portfwd">4.26 The Tunnels panel</a>
<ul>
<li><a href="#config-ssh-portfwd-localhost">4.26.1 Controlling the visibility of forwarded ports</a></li>
<li><a href="#config-ssh-portfwd-address-family">4.26.2 Selecting Internet protocol version for forwarded ports</a></li>
</ul></li>
<li><a href="#config-ssh-bugs">4.27 The Bugs and More Bugs panels</a>
<ul>
<li><a href="#config-ssh-bug-ignore2">4.27.1 &#8216;Chokes on SSH-2 ignore messages&#8217;</a></li>
<li><a href="#config-ssh-bug-rekey">4.27.2 &#8216;Handles SSH-2 key re-exchange badly&#8217;</a></li>
<li><a href="#config-ssh-bug-winadj">4.27.3 &#8216;Chokes on PuTTY's SSH-2 &#8216;<code>winadj</code>&#8217; requests&#8217;</a></li>
<li><a href="#config-ssh-bug-chanreq">4.27.4 &#8216;Replies to requests on closed channels&#8217;</a></li>
<li><a href="#config-ssh-bug-maxpkt2">4.27.5 &#8216;Ignores SSH-2 maximum packet size&#8217;</a></li>
<li><a href="#config-ssh-bug-dropstart">4.27.6 &#8216;Discards data sent before its greeting&#8217;</a></li>
<li><a href="#config-ssh-bug-filter-kexinit">4.27.7 &#8216;Chokes on PuTTY's full <code>KEXINIT</code>&#8217;</a></li>
<li><a href="#config-ssh-bug-rsa-sha2-cert-userauth">4.27.8 &#8216;Old RSA/SHA2 cert algorithm naming&#8217;</a></li>
<li><a href="#config-ssh-bug-sig">4.27.9 &#8216;Requires padding on SSH-2 RSA signatures&#8217;</a></li>
<li><a href="#config-ssh-bug-oldgex2">4.27.10 &#8216;Only supports pre-RFC4419 SSH-2 DH GEX&#8217;</a></li>
<li><a href="#config-ssh-bug-hmac2">4.27.11 &#8216;Miscomputes SSH-2 HMAC keys&#8217;</a></li>
<li><a href="#config-ssh-bug-pksessid2">4.27.12 &#8216;Misuses the session ID in SSH-2 PK auth&#8217;</a></li>
<li><a href="#config-ssh-bug-derivekey2">4.27.13 &#8216;Miscomputes SSH-2 encryption keys&#8217;</a></li>
<li><a href="#config-ssh-bug-ignore1">4.27.14 &#8216;Chokes on SSH-1 ignore messages&#8217;</a></li>
<li><a href="#config-ssh-bug-plainpw1">4.27.15 &#8216;Refuses all SSH-1 password camouflage&#8217;</a></li>
<li><a href="#config-ssh-bug-rsa1">4.27.16 &#8216;Chokes on SSH-1 RSA authentication&#8217;</a></li>
</ul></li>
<li><a href="#config-psusan">4.28 The &#8216;Bare <code>ssh-connection</code>&#8217; protocol</a></li>
<li><a href="#config-serial">4.29 The Serial panel</a>
<ul>
<li><a href="#config-serial-line">4.29.1 Selecting a serial line to connect to</a></li>
<li><a href="#config-serial-speed">4.29.2 Selecting the speed of your serial line</a></li>
<li><a href="#config-serial-databits">4.29.3 Selecting the number of data bits</a></li>
<li><a href="#config-serial-stopbits">4.29.4 Selecting the number of stop bits</a></li>
<li><a href="#config-serial-parity">4.29.5 Selecting the serial parity checking scheme</a></li>
<li><a href="#config-serial-flow">4.29.6 Selecting the serial flow control scheme</a></li>
</ul></li>
<li><a href="#config-telnet">4.30 The Telnet panel</a>
<ul>
<li><a href="#config-oldenviron">4.30.1 &#8216;Handling of OLD_ENVIRON ambiguity&#8217;</a></li>
<li><a href="#config-ptelnet">4.30.2 Passive and active Telnet negotiation modes</a></li>
<li><a href="#config-telnetkey">4.30.3 &#8216;Keyboard sends Telnet special commands&#8217;</a></li>
<li><a href="#config-telnetnl">4.30.4 &#8216;Return key sends Telnet New Line instead of ^M&#8217;</a></li>
</ul></li>
<li><a href="#config-rlogin">4.31 The Rlogin panel</a>
<ul>
<li><a href="#config-rlogin-localuser">4.31.1 &#8216;Local username&#8217;</a></li>
</ul></li>
<li><a href="#config-supdup">4.32 The SUPDUP panel</a>
<ul>
<li><a href="#supdup-location">4.32.1 &#8216;Location string&#8217;</a></li>
<li><a href="#supdup-ascii">4.32.2 &#8216;Extended ASCII Character set&#8217;</a></li>
<li><a href="#supdup-more">4.32.3 &#8216;**MORE** processing&#8217;</a></li>
<li><a href="#supdup-scroll">4.32.4 &#8216;Terminal scrolling&#8217;</a></li>
</ul></li>
<li><a href="#config-file">4.33 Storing configuration in a file</a></li>
</ul></li>
</ul>
<h1><a name="config"></a><a name="C4"></a>Chapter 4: Configuring PuTTY</h1>
<p>
This chapter describes all the <a name="i0"></a>configuration options in PuTTY.
</p>
<p>
PuTTY is configured using the control panel that comes up before you start a session. Some options can also be changed in the middle of a session, by selecting &#8216;Change Settings&#8217; from the window menu.
</p>
<h2><a name="config-session"></a><a name="S4.1"></a>4.1 The Session panel</h2>
<p>
The Session configuration panel contains the basic options you need to specify in order to open a session at all, and also allows you to save your settings to be reloaded later.
</p>
<h3><a name="config-hostname"></a><a name="S4.1.1"></a>4.1.1 The <a name="i1"></a>host name section</h3>
<p>
The top box on the Session panel, labelled &#8216;Specify the destination you want to connect to&#8217;, contains the details that need to be filled in before PuTTY can open a session at all.
</p>
<ul><li>
The &#8216;Host Name&#8217; box is where you type the name, or the <a name="i2"></a>IP address, of the server you want to connect to.
</li>
<li>
The &#8216;Connection type&#8217; controls let you choose what type of connection you want to make: an <a name="i3"></a>SSH network connection, a connection to a local <a name="i4"></a>serial line, or various other kinds of network connection.
<ul><li>
See <a href="Chapter1.html#which-one">section 1.2</a> for a summary of the differences between the network remote login protocols SSH, Telnet, Rlogin, and SUPDUP.
</li>
<li>
See <a href="Chapter3.html#using-serial">section 3.6</a> for information about using a serial line.
</li>
<li>
See <a href="Chapter3.html#using-rawprot">section 3.7</a> for an explanation of &#8216;raw&#8217; connections.
</li>
<li>
See <a href="Chapter3.html#using-telnet">section 3.8</a> for a little information about Telnet.
</li>
<li>
See <a href="Chapter3.html#using-rlogin">section 3.9</a> for information about using Rlogin.
</li>
<li>
See <a href="Chapter3.html#using-supdup">section 3.10</a> for information about using SUPDUP.
</li>
<li>
The &#8216;Bare ssh-connection&#8217; option in the &#8216;Connection type&#8217; control is intended for specialist uses not involving network connections. See <a href="#config-psusan">section 4.28</a> for some information about it.
</li>
</ul>

</li>
<li>
The &#8216;Port&#8217; box lets you specify which <a name="i5"></a>port number on the server to connect to. If you select Telnet, Rlogin, SUPDUP, or SSH, this box will be filled in automatically to the usual value, and you will only need to change it if you have an unusual server. If you select Raw mode, you will almost certainly need to fill in the &#8216;Port&#8217; box yourself.
</li>
</ul>
<p>
If you select &#8216;Serial&#8217; from the &#8216;Connection type&#8217; radio buttons, the &#8216;Host Name&#8217; and &#8216;Port&#8217; boxes are replaced by &#8216;Serial line&#8217; and &#8216;Speed&#8217;; see <a href="#config-serial">section 4.29</a> for more details of these.
</p>
<h3><a name="config-saving"></a><a name="S4.1.2"></a>4.1.2 <a name="i6"></a>Loading and storing saved sessions</h3>
<p>
The next part of the Session configuration panel allows you to save your preferred PuTTY options so they will appear automatically the next time you start PuTTY. It also allows you to create <em>saved sessions</em>, which contain a full set of configuration options plus a host name and protocol. A saved session contains all the information PuTTY needs to start exactly the session you want.
</p>
<ul><li>
To save your default settings: first set up the settings the way you want them saved. Then come back to the Session panel. Select the &#8216;<a name="i7"></a>Default Settings&#8217; entry in the saved sessions list, with a single click. Then press the &#8216;Save&#8217; button.
</li>
</ul>
<p>
If there is a specific host you want to store the details of how to connect to, you should create a saved session, which will be separate from the Default Settings.
</p>
<ul><li>
To save a session: first go through the rest of the configuration box setting up all the options you want. Then come back to the Session panel. Enter a name for the saved session in the &#8216;Saved Sessions&#8217; input box. (The server name is often a good choice for a saved session name.) Then press the &#8216;Save&#8217; button. Your saved session name should now appear in the list box.
<p>
You can also save settings in mid-session, from the &#8216;Change Settings&#8217; dialog. Settings changed since the start of the session will be saved with their current values; as well as settings changed through the dialog, this includes changes in window size, window title changes sent by the server, and so on. 
</p>

</li>
<li>
To reload a saved session: single-click to select the session name in the list box, and then press the &#8216;Load&#8217; button. Your saved settings should all appear in the configuration panel.
</li>
<li>
To modify a saved session: first load it as described above. Then make the changes you want. Come back to the Session panel, and press the &#8216;Save&#8217; button. The new settings will be saved over the top of the old ones.
<p>
To save the new settings under a different name, you can enter the new name in the &#8216;Saved Sessions&#8217; box, or single-click to select a session name in the list box to overwrite that session. To save &#8216;Default Settings&#8217;, you must single-click the name before saving. 
</p>

</li>
<li>
To start a saved session immediately: double-click on the session name in the list box.
</li>
<li>
To delete a saved session: single-click to select the session name in the list box, and then press the &#8216;Delete&#8217; button.
</li>
</ul>
<p>
Each saved session is independent of the Default Settings configuration. If you change your preferences and update Default Settings, you must also update every saved session separately.
</p>
<p>
Saved sessions are stored in the <a name="i8"></a>Registry, at the location
</p>
<pre><code>HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions
</code></pre>
<p>
If you need to store them in a file, you could try the method described in <a href="#config-file">section 4.33</a>.
</p>
<h3><a name="config-closeonexit"></a><a name="S4.1.3"></a>4.1.3 &#8216;<a name="i9"></a>Close window on exit&#8217;</h3>
<p>
Finally in the Session panel, there is an option labelled &#8216;Close window on exit&#8217;. This controls whether the PuTTY <a name="i10"></a>terminal window disappears as soon as the session inside it terminates. If you are likely to want to copy and paste text out of the session after it has terminated, or restart the session, you should arrange for this option to be off.
</p>
<p>
&#8216;Close window on exit&#8217; has three settings. &#8216;Always&#8217; means always close the window on exit; &#8216;Never&#8217; means never close on exit (always leave the window open, but <a name="i11"></a>inactive). The third setting, and the default one, is &#8216;Only on clean exit&#8217;. In this mode, a session which terminates normally will cause its window to close, but one which is aborted unexpectedly by network trouble or a confusing message from the server will leave the window up.
</p>
<h2><a name="config-logging"></a><a name="S4.2"></a>4.2 The Logging panel</h2>
<p>
The Logging configuration panel allows you to save <a name="i12"></a>log files of your PuTTY sessions, for debugging, analysis or future reference.
</p>
<p>
The main option is a radio-button set that specifies whether PuTTY will log anything at all. The options are:
</p>
<ul><li>
&#8216;None&#8217;. This is the default option; in this mode PuTTY will not create a log file at all.
</li>
<li>
&#8216;Printable output&#8217;. In this mode, a log file will be created and written to, but only printable text will be saved into it. The various terminal control codes that are typically sent down an interactive session alongside the printable text will be omitted. This might be a useful mode if you want to read a log file in a text editor and hope to be able to make sense of it.
</li>
<li>
&#8216;All session output&#8217;. In this mode, <em>everything</em> sent by the server into your terminal session is logged. If you view the log file in a text editor, therefore, you may well find it full of strange control characters. This is a particularly useful mode if you are experiencing problems with PuTTY's terminal handling: you can record everything that went to the terminal, so that someone else can replay the session later in slow motion and watch to see what went wrong.
</li>
<li>
<a name="i13"></a>&#8216;SSH packets&#8217;. In this mode (which is only used by SSH connections), the SSH message packets sent over the encrypted connection are written to the log file (as well as <a name="i14"></a>Event Log entries). You might need this to debug a network-level problem, or more likely to send to the PuTTY authors as part of a bug report. <em>BE WARNED</em> that if you log in using a password, the password can appear in the log file; see <a href="#config-logssh">section 4.2.5</a> for options that may help to remove sensitive material from the log file before you send it to anyone else.
</li>
<li>
&#8216;SSH packets and raw data&#8217;. In this mode, as well as the decrypted packets (as in the previous mode), the <em>raw</em> (encrypted, compressed, etc) packets are <em>also</em> logged. This could be useful to diagnose corruption in transit. (The same caveats as the previous mode apply, of course.)
</li>
</ul>
<p>
Note that the non-SSH logging options (&#8216;Printable output&#8217; and &#8216;All session output&#8217;) only work with PuTTY proper; in programs without terminal emulation (such as Plink), they will have no effect, even if enabled via saved settings.
</p>
<h3><a name="config-logfilename"></a><a name="S4.2.1"></a>4.2.1 &#8216;Log file name&#8217;</h3>
<p>
In this edit box you enter the name of the file you want to log the session to. The &#8216;Browse&#8217; button will let you look around your file system to find the right place to put the file; or if you already know exactly where you want it to go, you can just type a pathname into the edit box.
</p>
<p>
There are a few special features in this box. If you use the <code>&amp;</code> character in the file name box, PuTTY will insert details of the current session in the name of the file it actually opens. The precise replacements it will do are:
</p>
<ul><li>
<code>&amp;Y</code> will be replaced by the current year, as four digits.
</li>
<li>
<code>&amp;M</code> will be replaced by the current month, as two digits.
</li>
<li>
<code>&amp;D</code> will be replaced by the current day of the month, as two digits.
</li>
<li>
<code>&amp;T</code> will be replaced by the current time, as six digits (HHMMSS) with no punctuation.
</li>
<li>
<code>&amp;H</code> will be replaced by the host name you are connecting to (or the serial line, for a serial connection).
</li>
<li>
<code>&amp;P</code> will be replaced by the port number you are connecting to on the target host.
</li>
</ul>
<p>
(These are all case-insensitive.)
</p>
<p>
For example, if you enter the file name <code>c:\puttylogs\log-&amp;h-&amp;y&amp;m&amp;d-&amp;t.dat</code>, you will end up with files looking like
</p>
<pre><code>log-server1.example.com-20010528-110859.dat
log-unixbox.somewhere.org-20010611-221001.dat
</code></pre>
<h3><a name="config-logfileexists"></a><a name="S4.2.2"></a>4.2.2 &#8216;What to do if the log file already exists&#8217;</h3>
<p>
This control allows you to specify what PuTTY should do if it tries to start writing to a log file and it finds the file already exists. You might want to automatically destroy the existing log file and start a new one with the same name. Alternatively, you might want to open the existing log file and add data to the <em>end</em> of it. Finally (the default option), you might not want to have any automatic behaviour, but to ask the user every time the problem comes up.
</p>
<h3><a name="config-logflush"></a><a name="S4.2.3"></a>4.2.3 <a name="i15"></a>&#8216;Flush log file frequently&#8217;</h3>
<p>
This option allows you to control how frequently logged data is flushed to disc. By default, PuTTY will flush data as soon as it is displayed, so that if you view the log file while a session is still open, it will be up to date; and if the client system crashes, there's a greater chance that the data will be preserved.
</p>
<p>
However, this can incur a performance penalty. If PuTTY is running slowly with logging enabled, you could try unchecking this option. Be warned that the log file may not always be up to date as a result (although it will of course be flushed when it is closed, for instance at the end of a session).
</p>
<h3><a name="config-logheader"></a><a name="S4.2.4"></a>4.2.4 <a name="i16"></a>&#8216;Include header&#8217;</h3>
<p>
This option allows you to choose whether to include a header line with the date and time when the log file is opened. It may be useful to disable this if the log file is being used as realtime input to other programs that don't expect the header line.
</p>
<h3><a name="config-logssh"></a><a name="S4.2.5"></a>4.2.5 Options specific to <a name="i17"></a>SSH packet logging</h3>
<p>
These options only apply if SSH packet data is being logged.
</p>
<p>
The following options allow particularly sensitive portions of unencrypted packets to be automatically left out of the log file. They are only intended to deter casual nosiness; an attacker could glean a lot of useful information from even these obfuscated logs (e.g., length of password).
</p>
<h4><a name="config-logssh-omitpw"></a><a name="S4.2.5.1"></a>4.2.5.1 &#8216;Omit known password fields&#8217;</h4>
<p>
When checked, decrypted password fields are removed from the log of transmitted packets. (This includes any user responses to challenge-response authentication methods such as &#8216;keyboard-interactive&#8217;.) This does not include X11 authentication data if using X11 forwarding.
</p>
<p>
Note that this will only omit data that PuTTY <em>knows</em> to be a password. However, if you start another login session within your PuTTY session, for instance, any password used will appear in the clear in the packet log. The next option may be of use to protect against this.
</p>
<p>
This option is enabled by default.
</p>
<h4><a name="config-logssh-omitdata"></a><a name="S4.2.5.2"></a>4.2.5.2 &#8216;Omit session data&#8217;</h4>
<p>
When checked, all decrypted &#8216;session data&#8217; is omitted; this is defined as data in terminal sessions and in forwarded channels (TCP, X11, and authentication agent). This will usually substantially reduce the size of the resulting log file.
</p>
<p>
This option is disabled by default.
</p>
<h2><a name="config-terminal"></a><a name="S4.3"></a>4.3 The Terminal panel</h2>
<p>
The Terminal configuration panel allows you to control the behaviour of PuTTY's <a name="i18"></a>terminal emulation.
</p>
<h3><a name="config-autowrap"></a><a name="S4.3.1"></a>4.3.1 &#8216;Auto wrap mode initially on&#8217;</h3>
<p>
<a name="i19"></a>Auto wrap mode controls what happens when text printed in a PuTTY window reaches the right-hand edge of the window.
</p>
<p>
With auto wrap mode on, if a long line of text reaches the right-hand edge, it will wrap over on to the next line so you can still see all the text. With auto wrap mode off, the cursor will stay at the right-hand edge of the screen, and all the characters in the line will be printed on top of each other.
</p>
<p>
If you are running a full-screen application and you occasionally find the screen scrolling up when it looks as if it shouldn't, you could try turning this option off.
</p>
<p>
Auto wrap mode can be turned on and off by <a name="i20"></a>control sequences sent by the server. This configuration option controls the <em>default</em> state, which will be restored when you reset the terminal (see <a href="Chapter3.html#reset-terminal">section 3.1.3.6</a>). However, if you modify this option in mid-session using &#8216;Change Settings&#8217;, it will take effect immediately.
</p>
<h3><a name="config-decom"></a><a name="S4.3.2"></a>4.3.2 &#8216;DEC Origin Mode initially on&#8217;</h3>
<p>
<a name="i21"></a>DEC Origin Mode is a minor option which controls how PuTTY interprets cursor-position <a name="i22"></a>control sequences sent by the server.
</p>
<p>
The server can send a control sequence that restricts the <a name="i23"></a>scrolling region of the display. For example, in an editor, the server might reserve a line at the top of the screen and a line at the bottom, and might send a control sequence that causes scrolling operations to affect only the remaining lines.
</p>
<p>
With DEC Origin Mode on, <a name="i24"></a>cursor coordinates are counted from the top of the scrolling region. With it turned off, cursor coordinates are counted from the top of the whole screen regardless of the scrolling region.
</p>
<p>
It is unlikely you would need to change this option, but if you find a full-screen application is displaying pieces of text in what looks like the wrong part of the screen, you could try turning DEC Origin Mode on to see whether that helps.
</p>
<p>
DEC Origin Mode can be turned on and off by control sequences sent by the server. This configuration option controls the <em>default</em> state, which will be restored when you reset the terminal (see <a href="Chapter3.html#reset-terminal">section 3.1.3.6</a>). However, if you modify this option in mid-session using &#8216;Change Settings&#8217;, it will take effect immediately.
</p>
<h3><a name="config-crlf"></a><a name="S4.3.3"></a>4.3.3 &#8216;Implicit CR in every LF&#8217;</h3>
<p>
Most servers send two control characters, <a name="i25"></a>CR and <a name="i26"></a>LF, to start a <a name="i27"></a>new line of the screen. The CR character makes the cursor return to the left-hand side of the screen. The LF character makes the cursor move one line down (and might make the screen scroll).
</p>
<p>
Some servers only send LF, and expect the terminal to move the cursor over to the left automatically. If you come across a server that does this, you will see a <a name="i28"></a>stepped effect on the screen, like this:
</p>
<pre><code>First line of text
                  Second line
                             Third line
</code></pre>
<p>
If this happens to you, try enabling the &#8216;Implicit CR in every LF&#8217; option, and things might go back to normal:
</p>
<pre><code>First line of text
Second line
Third line
</code></pre>
<h3><a name="config-lfcr"></a><a name="S4.3.4"></a>4.3.4 &#8216;Implicit LF in every CR&#8217;</h3>
<p>
Most servers send two control characters, <a name="i29"></a>CR and <a name="i30"></a>LF, to start a <a name="i31"></a>new line of the screen. The CR character makes the cursor return to the left-hand side of the screen. The LF character makes the cursor move one line down (and might make the screen scroll).
</p>
<p>
Some servers only send CR, and so the newly written line is overwritten by the following line. This option causes a line feed so that all lines are displayed.
</p>
<h3><a name="config-erase"></a><a name="S4.3.5"></a>4.3.5 &#8216;Use <a name="i32"></a>background colour to erase screen&#8217;</h3>
<p>
Not all terminals agree on what colour to turn the screen when the server sends a &#8216;<a name="i33"></a>clear screen&#8217; sequence. Some terminals believe the screen should always be cleared to the <em>default</em> background colour. Others believe the screen should be cleared to whatever the server has selected as a background colour.
</p>
<p>
There exist applications that expect both kinds of behaviour. Therefore, PuTTY can be configured to do either.
</p>
<p>
With this option disabled, screen clearing is always done in the default background colour. With this option enabled, it is done in the <em>current</em> background colour.
</p>
<p>
Background-colour erase can be turned on and off by <a name="i34"></a>control sequences sent by the server. This configuration option controls the <em>default</em> state, which will be restored when you reset the terminal (see <a href="Chapter3.html#reset-terminal">section 3.1.3.6</a>). However, if you modify this option in mid-session using &#8216;Change Settings&#8217;, it will take effect immediately.
</p>
<h3><a name="config-blink"></a><a name="S4.3.6"></a>4.3.6 &#8216;Enable <a name="i35"></a>blinking text&#8217;</h3>
<p>
The server can ask PuTTY to display text that blinks on and off. This is very distracting, so PuTTY allows you to turn blinking text off completely.
</p>
<p>
When blinking text is disabled and the server attempts to make some text blink, PuTTY will instead display the text with a <a name="i36"></a>bolded background colour.
</p>
<p>
Blinking text can be turned on and off by <a name="i37"></a>control sequences sent by the server. This configuration option controls the <em>default</em> state, which will be restored when you reset the terminal (see <a href="Chapter3.html#reset-terminal">section 3.1.3.6</a>). However, if you modify this option in mid-session using &#8216;Change Settings&#8217;, it will take effect immediately.
</p>
<h3><a name="config-answerback"></a><a name="S4.3.7"></a>4.3.7 &#8216;<a name="i38"></a>Answerback to ^E&#8217;</h3>
<p>
This option controls what PuTTY will send back to the server if the server sends it the ^E <a name="i39"></a>enquiry character. Normally it just sends the string &#8216;PuTTY&#8217;.
</p>
<p>
If you accidentally write the contents of a binary file to your terminal, you will probably find that it contains more than one ^E character, and as a result your next command line will probably read &#8216;PuTTYPuTTYPuTTY...&#8217; as if you had typed the answerback string multiple times at the keyboard. If you set the answerback string to be empty, this problem should go away, but doing so might cause other problems.
</p>
<p>
Note that this is <em>not</em> the feature of PuTTY which the server will typically use to determine your terminal type. That feature is the &#8216;<a name="i40"></a>Terminal-type string&#8217; in the Connection panel; see <a href="#config-termtype">section 4.15.3</a> for details.
</p>
<p>
You can include control characters in the answerback string using <code>^C</code> notation. (Use <code>^~</code> to get a literal <code>^</code>.)
</p>
<h3><a name="config-localecho"></a><a name="S4.3.8"></a>4.3.8 &#8216;<a name="i41"></a>Local echo&#8217;</h3>
<p>
With local echo disabled, characters you type into the PuTTY window are not echoed in the window <em>by PuTTY</em>. They are simply sent to the server. (The <em>server</em> might choose to <a name="i42"></a>echo them back to you; this can't be controlled from the PuTTY control panel.)
</p>
<p>
Some types of session need local echo, and many do not. In its default mode, PuTTY will automatically attempt to deduce whether or not local echo is appropriate for the session you are working in. If you find it has made the wrong decision, you can use this configuration option to override its choice: you can force local echo to be turned on, or force it to be turned off, instead of relying on the automatic detection.
</p>
<h3><a name="config-localedit"></a><a name="S4.3.9"></a>4.3.9 &#8216;<a name="i43"></a>Local line editing&#8217;</h3>
<p>
Normally, every character you type into the PuTTY window is sent immediately to the server the moment you type it.
</p>
<p>
If you enable local line editing, this changes. PuTTY will let you edit a whole line at a time locally, and the line will only be sent to the server when you press Return. If you make a mistake, you can use the Backspace key to correct it before you press Return, and the server will never see the mistake.
</p>
<p>
Since it is hard to edit a line locally without being able to see it, local line editing is mostly used in conjunction with <a name="i44"></a>local echo (<a href="#config-localecho">section 4.3.8</a>). This makes it ideal for use in raw mode or when connecting to <a name="i45"></a>MUDs or <a name="i46"></a>talkers. (Although some more advanced MUDs do occasionally turn local line editing on and turn local echo off, in order to accept a password from the user.)
</p>
<p>
Some types of session need local line editing, and many do not. In its default mode, PuTTY will automatically attempt to deduce whether or not local line editing is appropriate for the session you are working in. If you find it has made the wrong decision, you can use this configuration option to override its choice: you can force local line editing to be turned on, or force it to be turned off, instead of relying on the automatic detection.
</p>
<h3><a name="config-printing"></a><a name="S4.3.10"></a>4.3.10 <a name="i47"></a>Remote-controlled printing</h3>
<p>
A lot of VT100-compatible terminals support printing under control of the remote server (sometimes called &#8216;passthrough printing&#8217;). PuTTY supports this feature as well, but it is turned off by default.
</p>
<p>
To enable remote-controlled printing, choose a printer from the &#8216;Printer to send ANSI printer output to&#8217; drop-down list box. This should allow you to select from all the printers you have installed drivers for on your computer. Alternatively, you can type the network name of a networked printer (for example, <code>\\printserver\printer1</code>) even if you haven't already installed a driver for it on your own machine.
</p>
<p>
When the remote server attempts to print some data, PuTTY will send that data to the printer <em>raw</em> - without translating it, attempting to format it, or doing anything else to it. It is up to you to ensure your remote server knows what type of printer it is talking to.
</p>
<p>
Since PuTTY sends data to the printer raw, it cannot offer options such as portrait versus landscape, print quality, or paper tray selection. All these things would be done by your PC printer driver (which PuTTY bypasses); if you need them done, you will have to find a way to configure your remote server to do them.
</p>
<p>
To disable remote printing again, choose &#8216;None (printing disabled)&#8217; from the printer selection list. This is the default state.
</p>
<h2><a name="config-keyboard"></a><a name="S4.4"></a>4.4 The Keyboard panel</h2>
<p>
The Keyboard configuration panel allows you to control the behaviour of the <a name="i48"></a>keyboard in PuTTY. The correct state for many of these settings depends on what the server to which PuTTY is connecting expects. With a <a name="i49"></a>Unix server, this is likely to depend on the <a name="i50"></a><code>termcap</code> or <a name="i51"></a><code>terminfo</code> entry it uses, which in turn is likely to be controlled by the &#8216;<a name="i52"></a>Terminal-type string&#8217; setting in the Connection panel; see <a href="#config-termtype">section 4.15.3</a> for details. If none of the settings here seems to help, you may find <a href="AppendixA.html#faq-keyboard">question A.7.13</a> to be useful.
</p>
<h3><a name="config-backspace"></a><a name="S4.4.1"></a>4.4.1 Changing the action of the <a name="i53"></a>Backspace key</h3>
<p>
Some terminals believe that the Backspace key should send the same thing to the server as <a name="i54"></a>Control-H (ASCII code 8). Other terminals believe that the Backspace key should send ASCII code 127 (usually known as <a name="i55"></a>Control-?) so that it can be distinguished from Control-H. This option allows you to choose which code PuTTY generates when you press Backspace.
</p>
<p>
If you are connecting over SSH, PuTTY by default tells the server the value of this option (see <a href="#config-ttymodes">section 4.24.2</a>), so you may find that the Backspace key does the right thing either way. Similarly, if you are connecting to a <a name="i56"></a>Unix system, you will probably find that the Unix <a name="i57"></a><code>stty</code> command lets you configure which the server expects to see, so again you might not need to change which one PuTTY generates. On other systems, the server's expectation might be fixed and you might have no choice but to configure PuTTY.
</p>
<p>
If you do have the choice, we recommend configuring PuTTY to generate Control-? and configuring the server to expect it, because that allows applications such as <code>emacs</code> to use Control-H for help.
</p>
<p>
(Typing <a name="i58"></a>Shift-Backspace will cause PuTTY to send whichever code isn't configured here as the default.)
</p>
<h3><a name="config-homeend"></a><a name="S4.4.2"></a>4.4.2 Changing the action of the <a name="i59"></a>Home and End keys</h3>
<p>
The Unix terminal emulator <a name="i60"></a><code>rxvt</code> disagrees with the rest of the world about what character sequences should be sent to the server by the Home and End keys.
</p>
<p>
<a name="i61"></a><code>xterm</code>, and other terminals, send <code>ESC [1~</code> for the Home key, and <code>ESC [4~</code> for the End key. <code>rxvt</code> sends <code>ESC [H</code> for the Home key and <code>ESC [Ow</code> for the End key.
</p>
<p>
If you find an application on which the Home and End keys aren't working, you could try switching this option to see if it helps.
</p>
<h3><a name="config-funkeys"></a><a name="S4.4.3"></a>4.4.3 Changing the action of the <a name="i62"></a>function keys and <a name="i63"></a>keypad</h3>
<p>
This option affects the function keys (F1 to F12) and the top row of the numeric keypad.
</p>
<ul><li>
In the default mode, labelled <code>ESC [n~</code>, the function keys generate sequences like <code>ESC [11~</code>, <code>ESC [12~</code> and so on. This matches the general behaviour of Digital's terminals.
</li>
<li>
In Linux mode, F6 to F12 behave just like the default mode, but F1 to F5 generate <code>ESC [[A</code> through to <code>ESC [[E</code>. This mimics the <a name="i64"></a>Linux virtual console.
</li>
<li>
In <a name="i65"></a>Xterm R6 mode, F5 to F12 behave like the default mode, but F1 to F4 generate <code>ESC OP</code> through to <code>ESC OS</code>, which are the sequences produced by the top row of the <em>keypad</em> on Digital's terminals.
</li>
<li>
In <a name="i66"></a>VT400 mode, all the function keys behave like the default mode, but the actual top row of the numeric keypad generates <code>ESC OP</code> through to <code>ESC OS</code>.
</li>
<li>
In <a name="i67"></a>VT100+ mode, the function keys generate <code>ESC OP</code> through to <code>ESC O[</code>
</li>
<li>
In <a name="i68"></a>SCO mode, the function keys F1 to F12 generate <code>ESC [M</code> through to <code>ESC [X</code>. Together with shift, they generate <code>ESC [Y</code> through to <code>ESC [j</code>. With control they generate <code>ESC [k</code> through to <code>ESC [v</code>, and with shift and control together they generate <code>ESC [w</code> through to <code>ESC [{</code>.
</li>
<li>
In <a name="i69"></a>Xterm 216 mode, the unshifted function keys behave the same as Xterm R6 mode. But pressing a function key together with Shift or Alt or Ctrl generates a different sequence containing an extra numeric parameter of the form (1 for Shift) + (2 for Alt) + (4 for Ctrl) + 1. For F1-F4, the basic sequences like <code>ESC OP</code> become <code>ESC [1;</code><em>bitmap</em><code>P</code> and similar; for F5 and above, <code>ESC[</code><em>index</em><code>~</code> becomes <code>ESC[</code><em>index</em><code>;</code><em>bitmap</em><code>~</code>.
</li>
</ul>
<p>
If you don't know what any of this means, you probably don't need to fiddle with it.
</p>
<h3><a name="config-sharrow"></a><a name="S4.4.4"></a>4.4.4 Changing the action of the <a name="i70"></a>shifted arrow keys</h3>
<p>
This option affects the arrow keys, if you press one with any of the modifier keys Shift, Ctrl or Alt held down.
</p>
<ul><li>
In the default mode, labelled <code>Ctrl toggles app mode</code>, the Ctrl key toggles between the default arrow-key sequences like <code>ESC [A</code> and <code>ESC [B</code>, and the sequences Digital's terminals generate in &#8216;application cursor keys&#8217; mode, i.e. <code>ESC O A</code> and so on. Shift and Alt have no effect.
</li>
<li>
In the &#8216;xterm-style bitmap&#8217; mode, Shift, Ctrl and Alt all generate different sequences, with a number indicating which set of modifiers is active.
</li>
</ul>
<p>
If you don't know what any of this means, you probably don't need to fiddle with it.
</p>
<h3><a name="config-appcursor"></a><a name="S4.4.5"></a>4.4.5 Controlling <a name="i71"></a>Application Cursor Keys mode</h3>
<p>
Application Cursor Keys mode is a way for the server to change the control sequences sent by the arrow keys. In normal mode, the arrow keys send <code>ESC [A</code> through to <code>ESC [D</code>. In application mode, they send <code>ESC OA</code> through to <code>ESC OD</code>.
</p>
<p>
Application Cursor Keys mode can be turned on and off by the server, depending on the application. PuTTY allows you to configure the initial state.
</p>
<p>
You can also disable application cursor keys mode completely, using the &#8216;Features&#8217; configuration panel; see <a href="#config-features-application">section 4.6.1</a>.
</p>
<h3><a name="config-appkeypad"></a><a name="S4.4.6"></a>4.4.6 Controlling <a name="i72"></a>Application Keypad mode</h3>
<p>
Application Keypad mode is a way for the server to change the behaviour of the numeric keypad.
</p>
<p>
In normal mode, the keypad behaves like a normal Windows keypad: with <a name="i73"></a>NumLock on, the number keys generate numbers, and with NumLock off they act like the arrow keys and Home, End etc.
</p>
<p>
In application mode, all the keypad keys send special control sequences, <em>including</em> Num Lock. Num Lock stops behaving like Num Lock and becomes another function key.
</p>
<p>
Depending on which version of Windows you run, you may find the Num Lock light still flashes on and off every time you press Num Lock, even when application mode is active and Num Lock is acting like a function key. This is unavoidable.
</p>
<p>
Application keypad mode can be turned on and off by the server, depending on the application. PuTTY allows you to configure the initial state.
</p>
<p>
You can also disable application keypad mode completely, using the &#8216;Features&#8217; configuration panel; see <a href="#config-features-application">section 4.6.1</a>.
</p>
<h3><a name="config-nethack"></a><a name="S4.4.7"></a>4.4.7 Using <a name="i74"></a>NetHack keypad mode</h3>
<p>
PuTTY has a special mode for playing NetHack. You can enable it by selecting &#8216;NetHack&#8217; in the &#8216;Initial state of numeric keypad&#8217; control.
</p>
<p>
In this mode, the numeric keypad keys 1-9 generate the NetHack movement commands (<code>hjklyubn</code>). The 5 key generates the <code>.</code> command (do nothing).
</p>
<p>
In addition, pressing Shift or Ctrl with the keypad keys generate the Shift- or Ctrl-keys you would expect (e.g. keypad-7 generates &#8216;<code>y</code>&#8217;, so Shift-keypad-7 generates &#8216;<code>Y</code>&#8217; and Ctrl-keypad-7 generates Ctrl-Y); these commands tell NetHack to keep moving you in the same direction until you encounter something interesting.
</p>
<p>
For some reason, this feature only works properly when <a name="i75"></a>Num Lock is on. We don't know why.
</p>
<h3><a name="config-compose"></a><a name="S4.4.8"></a>4.4.8 Enabling a DEC-like <a name="i76"></a>Compose key</h3>
<p>
DEC terminals have a Compose key, which provides an easy-to-remember way of typing <a name="i77"></a>accented characters. You press Compose and then type two more characters. The two characters are &#8216;combined&#8217; to produce an accented character. The choices of character are designed to be easy to remember; for example, composing &#8216;e&#8217; and &#8216;`&#8217; produces the &#8216;&#232;&#8217; character.
</p>
<p>
If your keyboard has a Windows <a name="i78"></a>Application key, it acts as a Compose key in PuTTY. Alternatively, if you enable the &#8216;<a name="i79"></a>AltGr acts as Compose key&#8217; option, the AltGr key will become a Compose key.
</p>
<h3><a name="config-ctrlalt"></a><a name="S4.4.9"></a>4.4.9 &#8216;Control-Alt is different from <a name="i80"></a>AltGr&#8217;</h3>
<p>
Some old keyboards do not have an AltGr key, which can make it difficult to type some characters. PuTTY can be configured to treat the key combination Ctrl + Left Alt the same way as the AltGr key.
</p>
<p>
By default, this checkbox is checked, and the key combination Ctrl + Left Alt does something completely different. PuTTY's usual handling of the left Alt key is to prefix the Escape (Control-<code>[</code>) character to whatever character sequence the rest of the keypress would generate. For example, Alt-A generates Escape followed by <code>a</code>. So Alt-Ctrl-A would generate Escape, followed by Control-A.
</p>
<p>
If you uncheck this box, Ctrl-Alt will become a synonym for AltGr, so you can use it to type extra graphic characters if your keyboard has any.
</p>
<p>
(However, Ctrl-Alt will never act as a Compose key, regardless of the setting of &#8216;AltGr acts as Compose key&#8217; described in <a href="#config-compose">section 4.4.8</a>.)
</p>
<h2><a name="config-bell"></a><a name="S4.5"></a>4.5 The Bell panel</h2>
<p>
The Bell panel controls the <a name="i81"></a>terminal bell feature: the server's ability to cause PuTTY to beep at you.
</p>
<p>
In the default configuration, when the server sends the character with ASCII code 7 (Control-G), PuTTY will play the <a name="i82"></a>Windows Default Beep sound. This is not always what you want the terminal bell feature to do; the Bell panel allows you to configure alternative actions.
</p>
<h3><a name="config-bellstyle"></a><a name="S4.5.1"></a>4.5.1 &#8216;Set the style of bell&#8217;</h3>
<p>
This control allows you to select various different actions to occur on a terminal bell:
</p>
<ul><li>
Selecting &#8216;None&#8217; <a name="i83"></a>disables the bell completely. In this mode, the server can send as many Control-G characters as it likes and nothing at all will happen.
</li>
<li>
&#8216;Make default system alert sound&#8217; is the default setting. It causes the Windows &#8216;Default Beep&#8217; sound to be played. To change what this sound is, or to test it if nothing seems to be happening, use the Sound configurer in the Windows Control Panel.
</li>
<li>
&#8216;<a name="i84"></a>Visual bell&#8217; is a silent alternative to a beeping computer. In this mode, when the server sends a Control-G, the whole PuTTY window will flash white for a fraction of a second.
</li>
<li>
&#8216;Beep using the <a name="i85"></a>PC speaker&#8217; is self-explanatory.
</li>
<li>
&#8216;Play a custom <a name="i86"></a>sound file&#8217; allows you to specify a particular sound file to be used by PuTTY alone, or even by a particular individual PuTTY session. This allows you to distinguish your PuTTY beeps from any other beeps on the system. If you select this option, you will also need to enter the name of your sound file in the edit control &#8216;Custom sound file to play as a bell&#8217;.
</li>
</ul>
<h3><a name="config-belltaskbar"></a><a name="S4.5.2"></a>4.5.2 &#8216;<a name="i87"></a>Taskbar/<a name="i88"></a>caption indication on bell&#8217;</h3>
<p>
This feature controls what happens to the PuTTY window's entry in the Windows Taskbar if a bell occurs while the window does not have the input focus.
</p>
<p>
In the default state (&#8216;Disabled&#8217;) nothing unusual happens.
</p>
<p>
If you select &#8216;Steady&#8217;, then when a bell occurs and the window is not in focus, the window's Taskbar entry and its title bar will change colour to let you know that PuTTY session is asking for your attention. The change of colour will persist until you select the window, so you can leave several PuTTY windows minimised in your terminal, go away from your keyboard, and be sure not to have missed any important beeps when you get back.
</p>
<p>
&#8216;Flashing&#8217; is even more eye-catching: the Taskbar entry will continuously flash on and off until you select the window.
</p>
<h3><a name="config-bellovl"></a><a name="S4.5.3"></a>4.5.3 &#8216;Control the <a name="i89"></a>bell overload behaviour&#8217;</h3>
<p>
A common user error in a terminal session is to accidentally run the Unix command <code>cat</code> (or equivalent) on an inappropriate file type, such as an executable, image file, or ZIP file. This produces a huge stream of non-text characters sent to the terminal, which typically includes a lot of bell characters. As a result of this the terminal often doesn't stop beeping for ten minutes, and everybody else in the office gets annoyed.
</p>
<p>
To try to avoid this behaviour, or any other cause of excessive beeping, PuTTY includes a bell overload management feature. In the default configuration, receiving more than five bell characters in a two-second period will cause the overload feature to activate. Once the overload feature is active, further bells will <a name="i90"></a> have no effect at all, so the rest of your binary file will be sent to the screen in silence. After a period of five seconds during which no further bells are received, the overload feature will turn itself off again and bells will be re-enabled.
</p>
<p>
If you want this feature completely disabled, you can turn it off using the checkbox &#8216;Bell is temporarily disabled when over-used&#8217;.
</p>
<p>
Alternatively, if you like the bell overload feature but don't agree with the settings, you can configure the details: how many bells constitute an overload, how short a time period they have to arrive in to do so, and how much silent time is required before the overload feature will deactivate itself.
</p>
<p>
Bell overload mode is always deactivated by any keypress in the terminal. This means it can respond to large unexpected streams of data, but does not interfere with ordinary command-line activities that generate beeps (such as filename completion).
</p>
<h2><a name="config-features"></a><a name="S4.6"></a>4.6 The Features panel</h2>
<p>
PuTTY's <a name="i91"></a>terminal emulation is very highly featured, and can do a lot of things under remote server control. Some of these features can cause problems due to buggy or strangely configured server applications.
</p>
<p>
The Features configuration panel allows you to disable some of PuTTY's more advanced terminal features, in case they cause trouble.
</p>
<h3><a name="config-features-application"></a><a name="S4.6.1"></a>4.6.1 Disabling application keypad and cursor keys</h3>
<p>
<a name="i92"></a>Application keypad mode (see <a href="#config-appkeypad">section 4.4.6</a>) and <a name="i93"></a>application cursor keys mode (see <a href="#config-appcursor">section 4.4.5</a>) alter the behaviour of the keypad and cursor keys. Some applications enable these modes but then do not deal correctly with the modified keys. You can force these modes to be permanently disabled no matter what the server tries to do.
</p>
<h3><a name="config-features-mouse"></a><a name="S4.6.2"></a>4.6.2 Disabling <code>xterm</code>-style <a name="i94"></a>mouse reporting</h3>
<p>
PuTTY allows the server to send <a name="i95"></a>control codes that let it take over the mouse and use it for purposes other than <a name="i96"></a>copy and paste. Applications which use this feature include the text-mode web browser <a name="i97"></a><code>links</code>, the Usenet newsreader <a name="i98"></a><code>trn</code> version 4, and the file manager <a name="i99"></a><code>mc</code> (Midnight Commander).
</p>
<p>
If you find this feature inconvenient, you can disable it using the &#8216;Disable xterm-style mouse reporting&#8217; control. With this box ticked, the mouse will <em>always</em> do copy and paste in the normal way.
</p>
<p>
Note that even if the application takes over the mouse, you can still manage PuTTY's copy and paste by holding down the Shift key while you select and paste, unless you have deliberately turned this feature off (see <a href="#config-mouseshift">section 4.11.2</a>).
</p>
<h3><a name="config-features-resize"></a><a name="S4.6.3"></a>4.6.3 Disabling remote <a name="i100"></a>terminal resizing</h3>
<p>
PuTTY has the ability to change the terminal's size and position in response to commands from the server. If you find PuTTY is doing this unexpectedly or inconveniently, you can tell PuTTY not to respond to those server commands.
</p>
<h3><a name="config-features-altscreen"></a><a name="S4.6.4"></a>4.6.4 Disabling switching to the <a name="i101"></a>alternate screen</h3>
<p>
Many terminals, including PuTTY, support an &#8216;alternate screen&#8217;. This is the same size as the ordinary terminal screen, but separate. Typically a screen-based program such as a text editor might switch the terminal to the alternate screen before starting up. Then at the end of the run, it switches back to the primary screen, and you see the screen contents just as they were before starting the editor.
</p>
<p>
Some people prefer this not to happen. If you want your editor to run in the same screen as the rest of your terminal activity, you can disable the alternate screen feature completely.
</p>
<h3><a name="config-features-retitle"></a><a name="S4.6.5"></a>4.6.5 Disabling remote <a name="i102"></a>window title changing</h3>
<p>
PuTTY has the ability to change the window title in response to commands from the server. If you find PuTTY is doing this unexpectedly or inconveniently, you can tell PuTTY not to respond to those server commands.
</p>
<h3><a name="config-features-qtitle"></a><a name="S4.6.6"></a>4.6.6 Response to remote <a name="i103"></a>window title querying</h3>
<p>
PuTTY can optionally provide the xterm service of allowing server applications to find out the local window title. This feature is disabled by default, but you can turn it on if you really want it.
</p>
<p>
NOTE that this feature is a <em>potential <a name="i104"></a>security hazard</em>. If a malicious application can write data to your terminal (for example, if you merely <code>cat</code> a file owned by someone else on the server machine), it can change your window title (unless you have disabled this as mentioned in <a href="#config-features-retitle">section 4.6.5</a>) and then use this service to have the new window title sent back to the server as if typed at the keyboard. This allows an attacker to fake keypresses and potentially cause your server-side applications to do things you didn't want. Therefore this feature is disabled by default, and we recommend you do not set it to &#8216;Window title&#8217; unless you <em>really</em> know what you are doing.
</p>
<p>
There are three settings for this option:
</p>
<dl><dt>
&#8216;None&#8217;
</dt>
<dd>
PuTTY makes no response whatsoever to the relevant escape sequence. This may upset server-side software that is expecting some sort of response.
</dd>
<dt>
&#8216;Empty string&#8217;
</dt>
<dd>
PuTTY makes a well-formed response, but leaves it blank. Thus, server-side software that expects a response is kept happy, but an attacker cannot influence the response string. This is probably the setting you want if you have no better ideas.
</dd>
<dt>
&#8216;Window title&#8217;
</dt>
<dd>
PuTTY responds with the actual window title. This is dangerous for the reasons described above.
</dd>
</dl>
<h3><a name="config-features-clearscroll"></a><a name="S4.6.7"></a>4.6.7 Disabling remote <a name="i105"></a>scrollback clearing</h3>
<p>
PuTTY has the ability to clear the terminal's scrollback buffer in response to a command from the server. If you find PuTTY is doing this unexpectedly or inconveniently, you can tell PuTTY not to respond to that server command.
</p>
<h3><a name="config-features-dbackspace"></a><a name="S4.6.8"></a>4.6.8 Disabling <a name="i106"></a>destructive backspace</h3>
<p>
Normally, when PuTTY receives character 127 (^?) from the server, it will perform a &#8216;destructive backspace&#8217;: move the cursor one space left and delete the character under it. This can apparently cause problems in some applications, so PuTTY provides the ability to configure character 127 to perform a normal backspace (without deleting a character) instead.
</p>
<h3><a name="config-features-charset"></a><a name="S4.6.9"></a>4.6.9 Disabling remote <a name="i107"></a>character set configuration</h3>
<p>
PuTTY has the ability to change its character set configuration in response to commands from the server. Some programs send these commands unexpectedly or inconveniently. In particular, <a name="i108"></a>BitchX (an IRC client) seems to have a habit of reconfiguring the character set to something other than the user intended.
</p>
<p>
If you find that accented characters are not showing up the way you expect them to, particularly if you're running BitchX, you could try disabling the remote character set configuration commands.
</p>
<h3><a name="config-features-shaping"></a><a name="S4.6.10"></a>4.6.10 Disabling <a name="i109"></a>Arabic text shaping</h3>
<p>
PuTTY supports shaping of Arabic text, which means that if your server sends text written in the basic <a name="i110"></a>Unicode Arabic alphabet then it will convert it to the correct display forms before printing it on the screen.
</p>
<p>
If you are using full-screen software which was not expecting this to happen (especially if you are not an Arabic speaker and you unexpectedly find yourself dealing with Arabic text files in applications which are not Arabic-aware), you might find that the <a name="i111"></a>display becomes corrupted. By ticking this box, you can disable Arabic text shaping so that PuTTY displays precisely the characters it is told to display.
</p>
<p>
You may also find you need to disable bidirectional text display; see <a href="#config-features-bidi">section 4.6.11</a>.
</p>
<h3><a name="config-features-bidi"></a><a name="S4.6.11"></a>4.6.11 Disabling <a name="i112"></a>bidirectional text display</h3>
<p>
PuTTY supports bidirectional text display, which means that if your server sends text written in a language which is usually displayed from right to left (such as <a name="i113"></a>Arabic or <a name="i114"></a>Hebrew) then PuTTY will automatically flip it round so that it is displayed in the right direction on the screen.
</p>
<p>
If you are using full-screen software which was not expecting this to happen (especially if you are not an Arabic speaker and you unexpectedly find yourself dealing with Arabic text files in applications which are not Arabic-aware), you might find that the <a name="i115"></a>display becomes corrupted. By ticking this box, you can disable bidirectional text display, so that PuTTY displays text from left to right in all situations.
</p>
<p>
You may also find you need to disable Arabic text shaping; see <a href="#config-features-shaping">section 4.6.10</a>.
</p>
<h3><a name="config-features-bracketedpaste"></a><a name="S4.6.12"></a>4.6.12 Disabling <a name="i116"></a>bracketed paste mode</h3>
<p>
By default, when you paste text into the terminal window, it's sent to the server as terminal input, exactly as if you'd typed the same text into the terminal window using the keyboard (except that it's all sent at once, much faster than you could type it).
</p>
<p>
However, a terminal application can change that, by asking the terminal to enable &#8216;bracketed paste mode&#8217;. In this mode, pasted data is marked in the input stream, by sending a special control sequence before the paste, and another one at the end.
</p>
<p>
A terminal application can use this information to treat pasted data differently from keyboard input. For example, a terminal-based text editor can treat the input as literal data, even if some of its characters would normally trigger special editor functions. A shell can treat pasted input as less trusted, in case another application somehow sneaked a malicious shell command into your clipboard: modern versions of <code>bash</code> will highlight pasted data on the command line, and not run it until you've confirmed it by pressing Return, even if the pasted data contained a newline character.
</p>
<p>
In edge cases, it's possible that bracketed paste mode introduces bigger problems than the ones it solves. So you can use this checkbox to turn it off completely. If you do that, then PuTTY will always send your paste data exactly as if it had been typed at the keyboard, whether or not the server asked for bracketed paste mode.
</p>
<h2><a name="config-window"></a><a name="S4.7"></a>4.7 The Window panel</h2>
<p>
The Window configuration panel allows you to control aspects of the <a name="i117"></a>PuTTY window.
</p>
<h3><a name="config-winsize"></a><a name="S4.7.1"></a>4.7.1 Setting the <a name="i118"></a>size of the PuTTY window</h3>
<p>
The &#8216;<a name="i119"></a>Columns&#8217; and &#8216;<a name="i120"></a>Rows&#8217; boxes let you set the PuTTY window to a precise size. Of course you can also <a name="i121"></a>drag the window to a new size while a session is running.
</p>
<h3><a name="config-winsizelock"></a><a name="S4.7.2"></a>4.7.2 What to do when the window is resized</h3>
<p>
These options allow you to control what happens when the user tries to <a name="i122"></a>resize the PuTTY window using its window furniture.
</p>
<p>
There are four options here:
</p>
<ul><li>
&#8216;Change the number of rows and columns&#8217;: the font size will not change. (This is the default.)
</li>
<li>
&#8216;Change the size of the font&#8217;: the number of rows and columns in the terminal will stay the same, and the <a name="i123"></a>font size will change.
</li>
<li>
&#8216;Change font size when maximised&#8217;: when the window is resized, the number of rows and columns will change, <em>except</em> when the window is <a name="i124"></a>maximised (or restored), when the font size will change. (In this mode, holding down the Alt key while resizing will also cause the font size to change.)
</li>
<li>
&#8216;Forbid resizing completely&#8217;: the terminal will refuse to be resized at all.
</li>
</ul>
<h3><a name="config-scrollback"></a><a name="S4.7.3"></a>4.7.3 Controlling <a name="i125"></a>scrollback</h3>
<p>
These options let you configure the way PuTTY keeps text after it scrolls off the top of the screen (see <a href="Chapter3.html#using-scrollback">section 3.1.2</a>).
</p>
<p>
The &#8216;Lines of scrollback&#8217; box lets you configure how many lines of text PuTTY keeps. The &#8216;Display scrollbar&#8217; options allow you to hide the <a name="i126"></a>scrollbar (although you can still view the scrollback using the keyboard as described in <a href="Chapter3.html#using-scrollback">section 3.1.2</a>). You can separately configure whether the scrollbar is shown in <a name="i127"></a>full-screen mode and in normal modes.
</p>
<p>
If you are viewing part of the scrollback when the server sends more text to PuTTY, the screen will revert to showing the current terminal contents. You can disable this behaviour by turning off &#8216;Reset scrollback on display activity&#8217;. You can also make the screen revert when you press a key, by turning on &#8216;Reset scrollback on keypress&#8217;.
</p>
<h3><a name="config-erasetoscrollback"></a><a name="S4.7.4"></a>4.7.4 &#8216;Push erased text into scrollback&#8217;</h3>
<p>
When this option is enabled, the contents of the terminal screen will be pushed into the scrollback when a server-side application clears the screen, so that your scrollback will contain a better record of what was on your screen in the past.
</p>
<p>
If the application switches to the <a name="i128"></a>alternate screen (see <a href="#config-features-altscreen">section 4.6.4</a> for more about this), then the contents of the primary screen will be visible in the scrollback until the application switches back again.
</p>
<p>
This option is enabled by default.
</p>
<h2><a name="config-appearance"></a><a name="S4.8"></a>4.8 The Appearance panel</h2>
<p>
The Appearance configuration panel allows you to control aspects of the appearance of <a name="i129"></a>PuTTY's window.
</p>
<h3><a name="config-cursor"></a><a name="S4.8.1"></a>4.8.1 Controlling the appearance of the <a name="i130"></a>cursor</h3>
<p>
The &#8216;Cursor appearance&#8217; option lets you configure the cursor to be a block, an underline, or a vertical line. A block cursor becomes an empty box when the window loses focus; an underline or a vertical line becomes dotted.
</p>
<p>
The &#8216;<a name="i131"></a>Cursor blinks&#8217; option makes the cursor blink on and off. This works in any of the cursor modes.
</p>
<h3><a name="config-font"></a><a name="S4.8.2"></a>4.8.2 Controlling the <a name="i132"></a>font used in the terminal window</h3>
<p>
This option allows you to choose what font, in what <a name="i133"></a>size, the PuTTY terminal window uses to display the text in the session.
</p>
<p>
By default, you will be offered a choice from all the fixed-width fonts installed on the system, since VT100-style terminal handling expects a fixed-width font. If you tick the box marked &#8216;Allow selection of variable-pitch fonts&#8217;, however, PuTTY will offer variable-width fonts as well: if you select one of these, the font will be coerced into fixed-size character cells, which will probably not look very good (but can work OK with some fonts).
</p>
<h3><a name="config-mouseptr"></a><a name="S4.8.3"></a>4.8.3 &#8216;Hide <a name="i134"></a>mouse pointer when typing in window&#8217;</h3>
<p>
If you enable this option, the mouse pointer will disappear if the PuTTY window is selected and you press a key. This way, it will not obscure any of the text in the window while you work in your session. As soon as you move the mouse, the pointer will reappear.
</p>
<p>
This option is disabled by default, so the mouse pointer remains visible at all times.
</p>
<h3><a name="config-winborder"></a><a name="S4.8.4"></a>4.8.4 Controlling the <a name="i135"></a>window border</h3>
<p>
PuTTY allows you to configure the appearance of the window border to some extent.
</p>
<p>
The checkbox marked &#8216;Sunken-edge border&#8217; changes the appearance of the window border to something more like a DOS box: the inside edge of the border is highlighted as if it sank down to meet the surface inside the window. This makes the border a little bit thicker as well. It's hard to describe well. Try it and see if you like it.
</p>
<p>
You can also configure a completely blank gap between the text in the window and the border, using the &#8216;Gap between text and window edge&#8217; control. By default this is set at one pixel. You can reduce it to zero, or increase it further.
</p>
<h2><a name="config-behaviour"></a><a name="S4.9"></a>4.9 The Behaviour panel</h2>
<p>
The Behaviour configuration panel allows you to control aspects of the behaviour of <a name="i136"></a>PuTTY's window.
</p>
<h3><a name="config-title"></a><a name="S4.9.1"></a>4.9.1 Controlling the <a name="i137"></a>window title</h3>
<p>
The &#8216;Window title&#8217; edit box allows you to set the title of the PuTTY window. By default the window title will contain the <a name="i138"></a>host name followed by &#8216;PuTTY&#8217;, for example <code>server1.example.com - PuTTY</code>. If you want a different window title, this is where to set it.
</p>
<p>
PuTTY allows the server to send <code>xterm</code> <a name="i139"></a>control sequences which modify the title of the window in mid-session (unless this is disabled - see <a href="#config-features-retitle">section 4.6.5</a>); the title string set here is therefore only the <em>initial</em> window title.
</p>
<p>
As well as the <em>window</em> title, there is also an <code>xterm</code> sequence to modify the <a name="i140"></a>title of the window's <em>icon</em>. This makes sense in a windowing system where the window becomes an icon when minimised, such as Windows 3.1 or most X Window System setups; but in the Windows 95-like user interface it isn't as applicable.
</p>
<p>
By default, PuTTY only uses the server-supplied <em>window</em> title, and ignores the icon title entirely. If for some reason you want to see both titles, check the box marked &#8216;Separate window and icon titles&#8217;. If you do this, PuTTY's window title and Taskbar <a name="i141"></a>caption will change into the server-supplied icon title if you <a name="i142"></a>minimise the PuTTY window, and change back to the server-supplied window title if you restore it. (If the server has not bothered to supply a window or icon title, none of this will happen.)
</p>
<h3><a name="config-warnonclose"></a><a name="S4.9.2"></a>4.9.2 &#8216;Warn before <a name="i143"></a>closing window&#8217;</h3>
<p>
If you press the <a name="i144"></a>Close button in a PuTTY window that contains a running session, PuTTY will put up a warning window asking if you really meant to close the window. A window whose session has already terminated can always be closed without a warning.
</p>
<p>
If you want to be able to close a window quickly, you can disable the &#8216;Warn before closing window&#8217; option.
</p>
<h3><a name="config-altf4"></a><a name="S4.9.3"></a>4.9.3 &#8216;Window closes on <a name="i145"></a>ALT-F4&#8217;</h3>
<p>
By default, pressing ALT-F4 causes the <a name="i146"></a>window to close (or a warning box to appear; see <a href="#config-warnonclose">section 4.9.2</a>). If you disable the &#8216;Window closes on ALT-F4&#8217; option, then pressing ALT-F4 will simply send a key sequence to the server.
</p>
<h3><a name="config-altspace"></a><a name="S4.9.4"></a>4.9.4 &#8216;<a name="i147"></a>System menu appears on <a name="i148"></a>ALT-Space&#8217;</h3>
<p>
If this option is enabled, then pressing ALT-Space will bring up the PuTTY window's menu, like clicking on the top left corner. If it is disabled, then pressing ALT-Space will just send <code>ESC SPACE</code> to the server.
</p>
<p>
Some <a name="i149"></a>accessibility programs for Windows may need this option enabling to be able to control PuTTY's window successfully. For instance, <a name="i150"></a>Dragon NaturallySpeaking requires it both to open the system menu via voice, and to close, minimise, maximise and restore the window.
</p>
<h3><a name="config-altonly"></a><a name="S4.9.5"></a>4.9.5 &#8216;<a name="i151"></a>System menu appears on <a name="i152"></a>Alt alone&#8217;</h3>
<p>
If this option is enabled, then pressing and releasing ALT will bring up the PuTTY window's menu, like clicking on the top left corner. If it is disabled, then pressing and releasing ALT will have no effect.
</p>
<h3><a name="config-alwaysontop"></a><a name="S4.9.6"></a>4.9.6 &#8216;Ensure window is <a name="i153"></a>always on top&#8217;</h3>
<p>
If this option is enabled, the PuTTY window will stay on top of all other windows.
</p>
<h3><a name="config-fullscreen"></a><a name="S4.9.7"></a>4.9.7 &#8216;<a name="i154"></a>Full screen on Alt-Enter&#8217;</h3>
<p>
If this option is enabled, then pressing Alt-Enter will cause the PuTTY window to become full-screen. Pressing Alt-Enter again will restore the previous window size.
</p>
<p>
The full-screen feature is also available from the <a name="i155"></a>System menu, even when it is configured not to be available on the Alt-Enter key. See <a href="Chapter3.html#using-fullscreen">section 3.1.3.7</a>.
</p>
<h2><a name="config-translation"></a><a name="S4.10"></a>4.10 The Translation panel</h2>
<p>
The Translation configuration panel allows you to control the translation between the <a name="i156"></a>character set understood by the server and the character set understood by PuTTY.
</p>
<h3><a name="config-charset"></a><a name="S4.10.1"></a>4.10.1 Controlling character set translation</h3>
<p>
During an interactive session, PuTTY receives a stream of 8-bit bytes from the server, and in order to display them on the screen it needs to know what character set to interpret them in. Similarly, PuTTY needs to know how to translate your keystrokes into the encoding the server expects. Unfortunately, there is no satisfactory mechanism for PuTTY and the server to communicate this information, so it must usually be manually configured.
</p>
<p>
There are a lot of character sets to choose from. The &#8216;Remote character set&#8217; option lets you select one.
</p>
<p>
By default PuTTY will use the <a name="i157"></a>UTF-8 encoding of <a name="i158"></a>Unicode, which can represent pretty much any character; data coming from the server is interpreted as UTF-8, and keystrokes are sent UTF-8 encoded. This is what most modern distributions of Linux will expect by default. However, if this is wrong for your server, you can select a different character set using this control.
</p>
<p>
A few other notable character sets are:
</p>
<ul><li>
The <a name="i159"></a>ISO-8859 series are all standard character sets that include various accented characters appropriate for different sets of languages.
</li>
<li>
The <a name="i160"></a>Win125x series are defined by Microsoft, for similar purposes. In particular Win1252 is almost equivalent to ISO-8859-1, but contains a few extra characters such as matched quotes and the Euro symbol.
</li>
<li>
If you want the old IBM PC character set with block graphics and line-drawing characters, you can select &#8216;<a name="i161"></a>CP437&#8217;.
</li>
</ul>
<p>
If you need support for a numeric <a name="i162"></a>code page which is not listed in the drop-down list, such as code page 866, then you can try entering its name manually (<a name="i163"></a><code>CP866</code> for example) in the list box. If the underlying version of Windows has the appropriate translation table installed, PuTTY will use it.
</p>
<h3><a name="config-cjk-ambig-wide"></a><a name="S4.10.2"></a>4.10.2 &#8216;Treat <a name="i164"></a>CJK ambiguous characters as wide&#8217;</h3>
<p>
There are <a name="i165"></a>some Unicode characters whose <a name="i166"></a>width is not well-defined. In most contexts, such characters should be treated as single-width for the purposes of <a name="i167"></a>wrapping and so on; however, in some CJK contexts, they are better treated as double-width for historical reasons, and some server-side applications may expect them to be displayed as such. Setting this option will cause PuTTY to take the double-width interpretation.
</p>
<p>
If you use legacy CJK applications, and you find your lines are wrapping in the wrong places, or you are having other display problems, you might want to play with this setting.
</p>
<p>
This option only has any effect in <a name="i168"></a>UTF-8 mode (see <a href="#config-charset">section 4.10.1</a>).
</p>
<h3><a name="config-cyr"></a><a name="S4.10.3"></a>4.10.3 &#8216;<a name="i169"></a>Caps Lock acts as <a name="i170"></a>Cyrillic switch&#8217;</h3>
<p>
This feature allows you to switch between a US/UK keyboard layout and a Cyrillic keyboard layout by using the Caps Lock key, if you need to type (for example) <a name="i171"></a>Russian and English side by side in the same document.
</p>
<p>
Currently this feature is not expected to work properly if your native keyboard layout is not US or UK.
</p>
<h3><a name="config-linedraw"></a><a name="S4.10.4"></a>4.10.4 Controlling display of <a name="i172"></a>line-drawing characters</h3>
<p>
VT100-series terminals allow the server to send <a name="i173"></a>control sequences that shift temporarily into a separate character set for drawing simple lines and boxes. However, there are a variety of ways in which PuTTY can attempt to find appropriate characters, and the right one to use depends on the locally configured <a name="i174"></a>font. In general you should probably try lots of options until you find one that your particular font supports.
</p>
<ul><li>
&#8216;Use Unicode line drawing code points&#8217; tries to use the box characters that are present in <a name="i175"></a>Unicode. For good Unicode-supporting fonts this is probably the most reliable and functional option.
</li>
<li>
&#8216;Poor man's line drawing&#8217; assumes that the font <em>cannot</em> generate the line and box characters at all, so it will use the <code>+</code>, <code>-</code> and <code>|</code> characters to draw approximations to boxes. You should use this option if none of the other options works.
</li>
<li>
&#8216;Font has XWindows encoding&#8217; is for use with fonts that have a special encoding, where the lowest 32 character positions (below the ASCII printable range) contain the line-drawing characters. This is unlikely to be the case with any standard Windows font; it will probably only apply to custom-built fonts or fonts that have been automatically converted from the X Window System.
</li>
<li>
&#8216;Use font in both ANSI and OEM modes&#8217; tries to use the same font in two different character sets, to obtain a wider range of characters. This doesn't always work; some fonts claim to be a different size depending on which character set you try to use.
</li>
<li>
&#8216;Use font in OEM mode only&#8217; is more reliable than that, but can miss out other characters from the main character set.
</li>
</ul>
<h3><a name="config-linedrawpaste"></a><a name="S4.10.5"></a>4.10.5 Controlling <a name="i176"></a>copy and paste of line drawing characters</h3>
<p>
By default, when you copy and paste a piece of the PuTTY screen that contains VT100 line and box drawing characters, PuTTY will paste them in the form they appear on the screen: either <a name="i177"></a>Unicode line drawing code points, or the &#8216;poor man's&#8217; line-drawing characters <code>+</code>, <code>-</code> and <code>|</code>. The checkbox &#8216;Copy and paste VT100 line drawing chars as lqqqk&#8217; disables this feature, so line-drawing characters will be pasted as the <a name="i178"></a>ASCII characters that were printed to produce them. This will typically mean they come out mostly as <code>q</code> and <code>x</code>, with a scattering of <code>jklmntuvw</code> at the corners. This might be useful if you were trying to recreate the same box layout in another program, for example.
</p>
<p>
Note that this option only applies to line-drawing characters which <em>were</em> printed by using the VT100 mechanism. Line-drawing characters that were received as Unicode code points will paste as Unicode always.
</p>
<h3><a name="config-utf8linedraw"></a><a name="S4.10.6"></a>4.10.6 Combining VT100 line-drawing with UTF-8</h3>
<p>
If PuTTY is configured to treat data from the server as encoded in UTF-8, then by default it disables the older VT100-style system of control sequences that cause the lower-case letters to be temporarily replaced by line drawing characters.
</p>
<p>
The rationale is that in UTF-8 mode you don't need those control sequences anyway, because all the line-drawing characters they access are available as Unicode characters already, so there's no need for applications to put the terminal into a special state to get at them.
</p>
<p>
Also, it removes a risk of the terminal <em>accidentally</em> getting into that state: if you accidentally write uncontrolled binary data to a non-UTF-8 terminal, it can be surprisingly common to find that your next shell prompt appears as a sequence of line-drawing characters and then you have to remember or look up how to get out of that mode. So by default, UTF-8 mode simply doesn't <em>have</em> a confusing mode like that to get into, accidentally or on purpose.
</p>
<p>
However, not all applications will see it that way. Even UTF-8 terminal users will still sometimes have to run software that tries to print line-drawing characters in the old-fashioned way. So the configuration option &#8216;Enable VT100 line drawing even in UTF-8 mode&#8217; puts PuTTY into a hybrid mode in which it understands the VT100-style control sequences that change the meaning of the ASCII lower case letters, <em>and</em> understands UTF-8.
</p>
<h2><a name="config-selection"></a><a name="S4.11"></a>4.11 The Selection panel</h2>
<p>
The Selection panel allows you to control the way <a name="i179"></a>copy and paste work in the PuTTY window.
</p>
<h3><a name="config-mouse"></a><a name="S4.11.1"></a>4.11.1 Changing the actions of the mouse buttons</h3>
<p>
PuTTY's copy and paste mechanism is by default modelled on the Unix <a name="i180"></a><code>xterm</code> application. The X Window System uses a three-button mouse, and the convention in that system is that the <a name="i181"></a>left button <a name="i182"></a>selects, the <a name="i183"></a>right button extends an existing selection, and the <a name="i184"></a>middle button pastes.
</p>
<p>
Windows often only has two mouse buttons, so when run on Windows, PuTTY is configurable. In PuTTY's default configuration (&#8216;Compromise&#8217;), the <em>right</em> button pastes, and the <em>middle</em> button (if you have one) <a name="i185"></a>extends a selection.
</p>
<p>
If you have a <a name="i186"></a>three-button mouse and you are already used to the <code>xterm</code> arrangement, you can select it using the &#8216;Action of mouse buttons&#8217; control.
</p>
<p>
Alternatively, with the &#8216;Windows&#8217; option selected, the middle button extends, and the right button brings up a <a name="i187"></a>context menu (on which one of the options is &#8216;Paste&#8217;). (This context menu is always available by holding down Ctrl and right-clicking, regardless of the setting of this option.)
</p>
<p>
(When PuTTY itself is running on Unix, it follows the X Window System convention.)
</p>
<h3><a name="config-mouseshift"></a><a name="S4.11.2"></a>4.11.2 &#8216;Shift overrides application's use of mouse&#8217;</h3>
<p>
PuTTY allows the server to send <a name="i188"></a>control codes that let it <a name="i189"></a>take over the mouse and use it for purposes other than <a name="i190"></a>copy and paste. Applications which use this feature include the text-mode web browser <code>links</code>, the Usenet newsreader <code>trn</code> version 4, and the file manager <code>mc</code> (Midnight Commander).
</p>
<p>
When running one of these applications, pressing the mouse buttons no longer performs copy and paste. If you do need to copy and paste, you can still do so if you hold down Shift while you do your mouse clicks.
</p>
<p>
However, it is possible in theory for applications to even detect and make use of Shift + mouse clicks. We don't know of any applications that do this, but in case someone ever writes one, unchecking the &#8216;Shift overrides application's use of mouse&#8217; checkbox will cause Shift + mouse clicks to go to the server as well (so that mouse-driven copy and paste will be completely disabled).
</p>
<p>
If you want to prevent the application from taking over the mouse at all, you can do this using the Features control panel; see <a href="#config-features-mouse">section 4.6.2</a>.
</p>
<h3><a name="config-rectselect"></a><a name="S4.11.3"></a>4.11.3 Default selection mode</h3>
<p>
As described in <a href="Chapter3.html#using-selection">section 3.1.1</a>, PuTTY has two modes of selecting text to be copied to the clipboard. In the default mode (&#8216;Normal&#8217;), dragging the mouse from point A to point B selects to the end of the line containing A, all the lines in between, and from the very beginning of the line containing B. In the other mode (&#8216;Rectangular block&#8217;), dragging the mouse between two points defines a rectangle, and everything within that rectangle is copied.
</p>
<p>
Normally, you have to hold down Alt while dragging the mouse to select a rectangular block. Using the &#8216;Default selection mode&#8217; control, you can set <a name="i191"></a>rectangular selection as the default, and then you have to hold down Alt to get the <em>normal</em> behaviour.
</p>
<h3><a name="config-clipboards"></a><a name="S4.11.4"></a>4.11.4 Assigning copy and paste actions to clipboards</h3>
<p>
Here you can configure which clipboard(s) are written or read by PuTTY's various copy and paste actions.
</p>
<p>
Most platforms, including Windows, have a single system clipboard. On these platforms, PuTTY provides a second clipboard-like facility by permitting you to paste the text you last selected in <em>this window</em>, whether or not it is currently also in the system clipboard. This is not enabled by default.
</p>
<p>
The X Window System (which underlies most Unix graphical interfaces) provides multiple clipboards (or &#8216;<a name="i192"></a>selections&#8217;), and many applications support more than one of them by a different user interface mechanism. When PuTTY itself is running on Unix, it has more configurability relating to these selections.
</p>
<p>
The two most commonly used selections are called &#8216;<a name="i193"></a><code>PRIMARY</code>&#8217; and &#8216;<a name="i194"></a><code>CLIPBOARD</code>&#8217;; in applications supporting both, the usual behaviour is that <code>PRIMARY</code> is used by mouse-only actions (selecting text automatically copies it to <code>PRIMARY</code>, and <a name="i195"></a>middle-clicking pastes from <code>PRIMARY</code>), whereas <code>CLIPBOARD</code> is used by explicit Copy and Paste menu items or keypresses such as <a name="i196"></a>Ctrl-C and <a name="i197"></a>Ctrl-V.
</p>
<h4><a name="config-selection-autocopy"></a><a name="S4.11.4.1"></a>4.11.4.1 &#8216;Auto-copy selected text&#8217;</h4>
<p>
The checkbox &#8216;Auto-copy selected text to system clipboard&#8217; controls whether or not selecting text in the PuTTY terminal window automatically has the side effect of copying it to the system clipboard, without requiring a separate user interface action.
</p>
<p>
On X, the wording of this option is changed slightly so that &#8216;<code>CLIPBOARD</code>&#8217; is mentioned in place of the &#8216;system clipboard&#8217;. Text selected in the terminal window will <em>always</em> be automatically placed in the <code>PRIMARY</code> selection, as is conventional, but if you tick this box, it will <em>also</em> be placed in &#8216;<code>CLIPBOARD</code>&#8217; at the same time.
</p>
<h4><a name="config-selection-clipactions"></a><a name="S4.11.4.2"></a>4.11.4.2 Choosing a clipboard for UI actions</h4>
<p>
PuTTY has three user-interface actions which can be configured to paste into the terminal (not counting menu items). You can click whichever mouse button (if any) is configured to paste (see <a href="#config-mouse">section 4.11.1</a>); you can press <a name="i198"></a>Shift-Ins; or you can press <a name="i199"></a>Ctrl-Shift-V, although that action is not enabled by default.
</p>
<p>
You can configure which of the available clipboards each of these actions pastes from (including turning the paste action off completely). On platforms with a single system clipboard (such as Windows), the available options are to paste from that clipboard or to paste from PuTTY's internal memory of the <a name="i200"></a>last selected text within that window. On X, the standard options are <code>CLIPBOARD</code> or <code>PRIMARY</code>.
</p>
<p>
(<code>PRIMARY</code> is conceptually similar in that it <em>also</em> refers to the last selected text &#8211; just across all applications instead of just this window.)
</p>
<p>
The two keyboard options each come with a corresponding key to copy <em>to</em> the same clipboard. Whatever you configure Shift-Ins to paste from, <a name="i201"></a>Ctrl-Ins will copy to the same location; similarly, <a name="i202"></a>Ctrl-Shift-C will copy to whatever Ctrl-Shift-V pastes from.
</p>
<p>
On X, you can also enter a selection name of your choice. For example, there is a rarely-used standard selection called &#8216;<a name="i203"></a><code>SECONDARY</code>&#8217;, which Emacs (for example) can work with if you hold down the Meta key while dragging to select or clicking to paste; if you configure a PuTTY keyboard action to access this clipboard, then you can interoperate with other applications' use of it. Another thing you could do would be to invent a clipboard name yourself, to create a special clipboard shared <em>only</em> between instances of PuTTY, or between just instances configured in that particular way.
</p>
<h3><a name="config-paste-ctrl-char"></a><a name="S4.11.5"></a>4.11.5 &#8216;Permit control characters in pasted text&#8217;</h3>
<p>
It is possible for the clipboard to contain not just text (with newlines and tabs) but also control characters such as ESC which could have surprising effects if pasted into a terminal session, depending on what program is running on the server side. Copying text from a mischievous web page could put such characters onto the clipboard.
</p>
<p>
By default, PuTTY filters out the more unusual control characters, only letting through the more obvious text-formatting characters (newlines, tab, backspace, and DEL).
</p>
<p>
Setting this option stops this filtering; on paste, any character on the clipboard is sent to the session uncensored. This might be useful if you are deliberately using control character pasting as a simple form of scripting, for instance.
</p>
<h2><a name="config-selection-copy"></a><a name="S4.12"></a>4.12 The Copy panel</h2>
<p>
The Copy configuration panel controls behaviour specifically related to copying from the terminal window to the clipboard.
</p>
<h3><a name="config-charclasses"></a><a name="S4.12.1"></a>4.12.1 Character classes</h3>
<p>
PuTTY will <a name="i204"></a>select a word at a time in the terminal window if you <a name="i205"></a>double-click to begin the drag. This section allows you to control precisely what is considered to be a word.
</p>
<p>
Each character is given a <em>class</em>, which is a small number (typically 0, 1 or 2). PuTTY considers a single word to be any number of adjacent characters in the same class. So by modifying the assignment of characters to classes, you can modify the word-by-word selection behaviour.
</p>
<p>
In the default configuration, the <a name="i206"></a>character classes are:
</p>
<ul><li>
Class 0 contains <a name="i207"></a>white space and control characters.
</li>
<li>
Class 1 contains most <a name="i208"></a>punctuation.
</li>
<li>
Class 2 contains letters, numbers and a few pieces of punctuation (the double quote, minus sign, period, forward slash and underscore).
</li>
</ul>
<p>
So, for example, if you assign the <code>@</code> symbol into character class 2, you will be able to select an e-mail address with just a double click.
</p>
<p>
In order to adjust these assignments, you start by selecting a group of characters in the list box. Then enter a class number in the edit box below, and press the &#8216;Set&#8217; button.
</p>
<p>
This mechanism currently only covers ASCII characters, because it isn't feasible to expand the list to cover the whole of Unicode.
</p>
<p>
Character class definitions can be modified by <a name="i209"></a>control sequences sent by the server. This configuration option controls the <em>default</em> state, which will be restored when you reset the terminal (see <a href="Chapter3.html#reset-terminal">section 3.1.3.6</a>). However, if you modify this option in mid-session using &#8216;Change Settings&#8217;, it will take effect immediately.
</p>
<h3><a name="config-rtfcopy"></a><a name="S4.12.2"></a>4.12.2 Copying in <a name="i210"></a>Rich Text Format</h3>
<p>
If you enable &#8216;Copy to clipboard in RTF as well as plain text&#8217;, PuTTY will write formatting information to the clipboard as well as the actual text you copy. The effect of this is that if you paste into (say) a word processor, the text will appear in the word processor in the same <a name="i211"></a>font, <a name="i212"></a>colour, and style (e.g. bold, underline) PuTTY was using to display it.
</p>
<p>
This option can easily be inconvenient, so by default it is disabled.
</p>
<h2><a name="config-colours"></a><a name="S4.13"></a>4.13 The Colours panel</h2>
<p>
The Colours panel allows you to control PuTTY's use of <a name="i213"></a>colour.
</p>
<h3><a name="config-ansicolour"></a><a name="S4.13.1"></a>4.13.1 &#8216;Allow terminal to specify <a name="i214"></a>ANSI colours&#8217;</h3>
<p>
This option is enabled by default. If it is disabled, PuTTY will ignore any <a name="i215"></a>control sequences sent by the server to request coloured text.
</p>
<p>
If you have a particularly garish application, you might want to turn this option off and make PuTTY only use the default foreground and background colours.
</p>
<h3><a name="config-xtermcolour"></a><a name="S4.13.2"></a>4.13.2 &#8216;Allow terminal to use xterm <a name="i216"></a>256-colour mode&#8217;</h3>
<p>
This option is enabled by default. If it is disabled, PuTTY will ignore any control sequences sent by the server which use the extended 256-colour mode supported by recent versions of <code>xterm</code>.
</p>
<p>
If you have an application which is supposed to use 256-colour mode and it isn't working, you may find you need to tell your server that your terminal supports 256 colours. On Unix, you do this by ensuring that the setting of <a name="i217"></a><code>TERM</code> describes a 256-colour-capable terminal. You can check this using a command such as <code>infocmp</code>:
</p>
<pre><code>$ infocmp | grep colors
        <b>colors#256</b>, cols#80, it#8, lines#24, pairs#256,
</code></pre>
<p>
If you do not see &#8216;<code>colors#256</code>&#8217; in the output, you may need to change your terminal setting. On modern Linux machines, you could try &#8216;<code>xterm-256color</code>&#8217;.
</p>
<h3><a name="config-truecolour"></a><a name="S4.13.3"></a>4.13.3 &#8216;Allow terminal to use 24-bit colour&#8217;</h3>
<p>
This option is enabled by default. If it is disabled, PuTTY will ignore any control sequences sent by the server which use the control sequences supported by modern terminals to specify arbitrary 24-bit RGB colour value.
</p>
<h3><a name="config-boldcolour"></a><a name="S4.13.4"></a>4.13.4 &#8216;Indicate bolded text by changing...&#8217;</h3>
<p>
When the server sends a <a name="i218"></a>control sequence indicating that some text should be displayed in <a name="i219"></a>bold, PuTTY can handle this in several ways. It can either change the <a name="i220"></a>font for a bold version, or use the same font in a brighter colour, or it can do both (brighten the colour <em>and</em> embolden the font). This control lets you choose which.
</p>
<p>
By default bold is indicated by colour, so non-bold text is displayed in light grey and bold text is displayed in bright white (and similarly in other colours). If you change the setting to &#8216;The font&#8217; box, bold and non-bold text will be displayed in the same colour, and instead the font will change to indicate the difference. If you select &#8216;Both&#8217;, the font and the colour will both change.
</p>
<p>
Some applications rely on &#8216;<a name="i221"></a>bold black&#8217; being distinguishable from a black background; if you choose &#8216;The font&#8217;, their text may become invisible.
</p>
<h3><a name="config-logpalette"></a><a name="S4.13.5"></a>4.13.5 &#8216;Attempt to use <a name="i222"></a>logical palettes&#8217;</h3>
<p>
Logical palettes are a mechanism by which a Windows application running on an <a name="i223"></a>8-bit colour display can select precisely the colours it wants instead of going with the Windows standard defaults.
</p>
<p>
If you are not getting the colours you ask for on an 8-bit display, you can try enabling this option. However, be warned that it's never worked very well.
</p>
<h3><a name="config-syscolour"></a><a name="S4.13.6"></a>4.13.6 &#8216;Use <a name="i224"></a>system colours&#8217;</h3>
<p>
Enabling this option will cause PuTTY to ignore the configured colours for <a name="i225"></a><a name="i226"></a>&#8216;Default Background/Foreground&#8217; and <a name="i227"></a>&#8216;Cursor Colour/Text&#8217; (see <a href="#config-colourcfg">section 4.13.7</a>), instead going with the system-wide defaults.
</p>
<p>
Note that non-bold and <a name="i228"></a>bold text will be the same colour if this option is enabled. You might want to change to indicating bold text by font changes (see <a href="#config-boldcolour">section 4.13.4</a>).
</p>
<h3><a name="config-colourcfg"></a><a name="S4.13.7"></a>4.13.7 Adjusting the colours in the <a name="i229"></a>terminal window</h3>
<p>
The main colour control allows you to specify exactly what colours things should be displayed in. To modify one of the PuTTY colours, use the list box to select which colour you want to modify. The <a name="i230"></a>RGB values for that colour will appear on the right-hand side of the list box. Now, if you press the &#8216;Modify&#8217; button, you will be presented with a colour selector, in which you can choose a new colour to go in place of the old one. (You may also edit the RGB values directly in the edit boxes, if you wish; each value is an integer from 0 to 255.)
</p>
<p>
PuTTY allows you to set the <a name="i231"></a>cursor colour, the <a name="i232"></a>default foreground and <a name="i233"></a>background, and the precise shades of all the <a name="i234"></a>ANSI configurable colours (black, red, green, yellow, blue, magenta, cyan, and white). You can also modify the precise shades used for the <a name="i235"></a>bold versions of these colours; these are used to display bold text if you have chosen to indicate that by colour (see <a href="#config-boldcolour">section 4.13.4</a>), and can also be used if the server asks specifically to use them. (Note that &#8216;Default Bold Background&#8217; is <em>not</em> the background colour used for bold text; it is only used if the server specifically asks for a bold background.)
</p>
<h2><a name="config-connection"></a><a name="S4.14"></a>4.14 The Connection panel</h2>
<p>
The Connection panel allows you to configure options that apply to more than one type of <a name="i236"></a>connection.
</p>
<h3><a name="config-keepalive"></a><a name="S4.14.1"></a>4.14.1 Using <a name="i237"></a>keepalives to prevent disconnection</h3>
<p>
If you find your sessions are closing unexpectedly (most often with &#8216;Connection reset by peer&#8217;) after they have been idle for a while, you might want to try using this option.
</p>
<p>
Some network <a name="i238"></a>routers and <a name="i239"></a>firewalls need to keep track of all connections through them. Usually, these firewalls will assume a connection is dead if no data is transferred in either direction after a certain time interval. This can cause PuTTY sessions to be unexpectedly closed by the firewall if no traffic is seen in the session for some time.
</p>
<p>
The keepalive option (&#8216;Seconds between keepalives&#8217;) allows you to configure PuTTY to send data through the session at regular intervals, in a way that does not disrupt the actual terminal session. If you find your firewall is cutting <a name="i240"></a>idle connections off, you can try entering a non-zero value in this field. The value is measured in seconds; so, for example, if your firewall cuts connections off after ten minutes then you might want to enter 300 seconds (5 minutes) in the box.
</p>
<p>
Note that keepalives are not always helpful. They help if you have a firewall which drops your connection after an idle period; but if the network between you and the server suffers from <a name="i241"></a>breaks in connectivity then keepalives can actually make things worse. If a session is idle, and connectivity is temporarily lost between the endpoints, but the connectivity is restored before either side tries to send anything, then there will be no problem - neither endpoint will notice that anything was wrong. However, if one side does send something during the break, it will repeatedly try to re-send, and eventually give up and abandon the connection. Then when connectivity is restored, the other side will find that the first side doesn't believe there is an open connection any more. Keepalives can make this sort of problem worse, because they increase the probability that PuTTY will attempt to send data during a break in connectivity. (Other types of periodic network activity can cause this behaviour; in particular, SSH-2 re-keys can have this effect. See <a href="#config-ssh-kex-rekey">section 4.18.2</a>.)
</p>
<p>
Therefore, you might find that keepalives help connection loss, or you might find they make it worse, depending on what <em>kind</em> of network problems you have between you and the server.
</p>
<p>
Keepalives are only supported in Telnet and SSH; the Rlogin, SUPDUP, and Raw protocols offer no way of implementing them. (For an alternative, see <a href="#config-tcp-keepalives">section 4.14.3</a>.)
</p>
<p>
Note that if you are using SSH-1 and the server has a bug that makes it unable to deal with SSH-1 ignore messages (see <a href="#config-ssh-bug-ignore1">section 4.27.14</a>), enabling keepalives will have no effect.
</p>
<h3><a name="config-nodelay"></a><a name="S4.14.2"></a>4.14.2 &#8216;Disable <a name="i242"></a>Nagle's algorithm&#8217;</h3>
<p>
Nagle's algorithm is a detail of TCP/IP implementations that tries to minimise the number of small data packets sent down a network connection. With Nagle's algorithm enabled, PuTTY's <a name="i243"></a>bandwidth usage will be slightly more efficient; with it disabled, you may find you get a faster response to your keystrokes when connecting to some types of server.
</p>
<p>
The Nagle algorithm is disabled by default for <a name="i244"></a>interactive connections.
</p>
<h3><a name="config-tcp-keepalives"></a><a name="S4.14.3"></a>4.14.3 &#8216;Enable <a name="i245"></a>TCP keepalives&#8217;</h3>
<p>
<em>NOTE:</em> TCP keepalives should not be confused with the application-level keepalives described in <a href="#config-keepalive">section 4.14.1</a>. If in doubt, you probably want application-level keepalives; TCP keepalives are provided for completeness.
</p>
<p>
The idea of TCP keepalives is similar to application-level keepalives, and the same caveats apply. The main differences are:
</p>
<ul><li>
TCP keepalives are available on <em>all</em> network connection types, including Raw, Rlogin, and SUPDUP.
</li>
<li>
The interval between TCP keepalives is usually much longer, typically two hours; this is set by the operating system, and cannot be configured within PuTTY.
</li>
<li>
If the operating system does not receive a response to a keepalive, it may send out more in quick succession and terminate the connection if no response is received.
</li>
</ul>
<p>
TCP keepalives may be more useful for ensuring that <a name="i246"></a>half-open connections are terminated than for keeping a connection alive.
</p>
<p>
TCP keepalives are disabled by default.
</p>
<h3><a name="config-address-family"></a><a name="S4.14.4"></a>4.14.4 &#8216;<a name="i247"></a>Internet protocol version&#8217;</h3>
<p>
This option allows the user to select between the old and new Internet protocols and addressing schemes (<a name="i248"></a>IPv4 and <a name="i249"></a>IPv6). The selected protocol will be used for most outgoing network connections (including connections to <a name="i250"></a>proxies); however, tunnels have their own configuration, for which see <a href="#config-ssh-portfwd-address-family">section 4.26.2</a>.
</p>
<p>
The default setting is &#8216;Auto&#8217;, which means PuTTY will do something sensible and try to guess which protocol you wanted. (If you specify a literal <a name="i251"></a>Internet address, it will use whichever protocol that address implies. If you provide a <a name="i252"></a>hostname, it will see what kinds of address exist for that hostname; it will use IPv6 if there is an IPv6 address available, and fall back to IPv4 if not.)
</p>
<p>
If you need to force PuTTY to use a particular protocol, you can explicitly set this to &#8216;IPv4&#8217; or &#8216;IPv6&#8217;.
</p>
<h3><a name="config-loghost"></a><a name="S4.14.5"></a>4.14.5 <a name="i253"></a>&#8216;Logical name of remote host&#8217;</h3>
<p>
This allows you to tell PuTTY that the host it will really end up connecting to is different from where it thinks it is making a network connection.
</p>
<p>
You might use this, for instance, if you had set up an SSH port forwarding in one PuTTY session so that connections to some arbitrary port (say, <code>localhost</code> port 10022) were forwarded to a second machine's SSH port (say, <code>foovax</code> port 22), and then started a second PuTTY connecting to the forwarded port.
</p>
<p>
In normal usage, the second PuTTY will access the <a name="i254"></a>host key cache under the host name and port it actually connected to (i.e. <code>localhost</code> port 10022 in this example). Using the logical host name option, however, you can configure the second PuTTY to cache the host key under the name of the host <em>you</em> know that it's <em>really</em> going to end up talking to (here <code>foovax</code>).
</p>
<p>
This can be useful if you expect to connect to the same actual server through many different channels (perhaps because your port forwarding arrangements keep changing): by consistently setting the logical host name, you can arrange that PuTTY will not keep asking you to reconfirm its host key. Conversely, if you expect to use the same local port number for port forwardings to lots of different servers, you probably didn't want any particular server's host key cached under that local port number. (For this latter case, you could instead explicitly configure host keys in the relevant sessions; see <a href="#config-ssh-kex-manual-hostkeys">section 4.19.3</a>.)
</p>
<p>
If you just enter a host name for this option, PuTTY will cache the SSH host key under the default SSH port for that host, irrespective of the port you really connected to (since the typical scenario is like the above example: you connect to a silly real port number and your connection ends up forwarded to the normal port-22 SSH server of some other machine). To override this, you can append a port number to the logical host name, separated by a colon. E.g. entering &#8216;<code>foovax:2200</code>&#8217; as the logical host name will cause the host key to be cached as if you had connected to port 2200 of <code>foovax</code>.
</p>
<p>
If you provide a host name using this option, it is also displayed in other locations which contain the remote host name, such as the default window title and the default SSH password prompt. This reflects the fact that this is the host you're <em>really</em> connecting to, which is more important than the mere means you happen to be using to contact that host. (This applies even if you're using a protocol other than SSH.)
</p>
<h2><a name="config-data"></a><a name="S4.15"></a>4.15 The Data panel</h2>
<p>
The Data panel allows you to configure various pieces of data which can be sent to the server to affect your connection at the far end.
</p>
<p>
Each option on this panel applies to more than one protocol. Options which apply to only one protocol appear on that protocol's configuration panels.
</p>
<h3><a name="config-username"></a><a name="S4.15.1"></a>4.15.1 &#8216;<a name="i255"></a>Auto-login username&#8217;</h3>
<p>
All three of the SSH, Telnet, and Rlogin protocols allow you to specify what user name you want to log in as, without having to type it explicitly every time. (Some Telnet servers don't support this.)
</p>
<p>
In this box you can type that user name.
</p>
<h3><a name="config-username-from-env"></a><a name="S4.15.2"></a>4.15.2 Use of system username</h3>
<p>
When the previous box (<a href="#config-username">section 4.15.1</a>) is left blank, by default, PuTTY will prompt for a username at the time you make a connection.
</p>
<p>
In some environments, such as the networks of large organisations implementing <a name="i256"></a>single sign-on, a more sensible default may be to use the name of the user logged in to the local operating system (if any); this is particularly likely to be useful with <a name="i257"></a>GSSAPI key exchange and user authentication (see <a href="#config-ssh-auth-gssapi">section 4.23</a> and <a href="#config-ssh-gssapi-kex">section 4.18.1.1</a>). This control allows you to change the default behaviour.
</p>
<p>
The current system username is displayed in the dialog as a convenience. It is not saved in the configuration; if a saved session is later used by a different user, that user's name will be used.
</p>
<h3><a name="config-termtype"></a><a name="S4.15.3"></a>4.15.3 &#8216;<a name="i258"></a>Terminal-type string&#8217;</h3>
<p>
Most servers you might connect to with PuTTY are designed to be connected to from lots of different types of terminal. In order to send the right <a name="i259"></a>control sequences to each one, the server will need to know what type of terminal it is dealing with. Therefore, each of the SSH, Telnet, and Rlogin protocols allow a text string to be sent down the connection describing the terminal. On a <a name="i260"></a>Unix server, this selects an entry from the <a name="i261"></a><code>termcap</code> or <a name="i262"></a><code>terminfo</code> database that tells applications what <a name="i263"></a>control sequences to send to the terminal, and what character sequences to expect the <a name="i264"></a>keyboard to generate.
</p>
<p>
PuTTY attempts to emulate the Unix <a name="i265"></a><code>xterm</code> program, and by default it reflects this by sending <code>xterm</code> as a terminal-type string. If you find this is not doing what you want - perhaps the remote system reports &#8216;Unknown terminal type&#8217; - you could try setting this to something different, such as <a name="i266"></a><code>vt220</code>.
</p>
<p>
If you're not sure whether a problem is due to the terminal type setting or not, you probably need to consult the manual for your application or your server.
</p>
<h3><a name="config-termspeed"></a><a name="S4.15.4"></a>4.15.4 &#8216;<a name="i267"></a>Terminal speeds&#8217;</h3>
<p>
The Telnet, Rlogin, and SSH protocols allow the client to specify terminal speeds to the server.
</p>
<p>
This parameter does <em>not</em> affect the actual speed of the connection, which is always &#8216;as fast as possible&#8217;; it is just a hint that is sometimes used by server software to modify its behaviour. For instance, if a slow speed is indicated, the server may switch to a less <a name="i268"></a>bandwidth-hungry display mode.
</p>
<p>
The value is usually meaningless in a network environment, but PuTTY lets you configure it, in case you find the server is reacting badly to the default value.
</p>
<p>
The format is a pair of numbers separated by a comma, for instance, <code>38400,38400</code>. The first number represents the output speed (<em>from</em> the server) in bits per second, and the second is the input speed (<em>to</em> the server). (Only the first is used in the Rlogin protocol.)
</p>
<p>
This option has no effect on Raw connections.
</p>
<h3><a name="config-environ"></a><a name="S4.15.5"></a>4.15.5 Setting <a name="i269"></a>environment variables on the server</h3>
<p>
The Telnet protocol provides a means for the client to pass environment variables to the server. Many Telnet servers have stopped supporting this feature due to security flaws, but PuTTY still supports it for the benefit of any servers which have found other ways around the security problems than just disabling the whole mechanism.
</p>
<p>
Version 2 of the SSH protocol also provides a similar mechanism, which is easier to implement without security flaws. Newer <a name="i270"></a>SSH-2 servers are more likely to support it than older ones.
</p>
<p>
This configuration data is not used in the SSH-1, rlogin or raw protocols.
</p>
<p>
To add an environment variable to the list transmitted down the connection, you enter the variable name in the &#8216;Variable&#8217; box, enter its value in the &#8216;Value&#8217; box, and press the &#8216;Add&#8217; button. To remove one from the list, select it in the list box and press &#8216;Remove&#8217;.
</p>
<h2><a name="config-proxy"></a><a name="S4.16"></a>4.16 The Proxy panel</h2>
<p>
The <a name="i271"></a>Proxy panel allows you to configure PuTTY to use various types of proxy in order to make its network connections. The settings in this panel affect the primary network connection forming your PuTTY session, and also any extra connections made as a result of SSH <a name="i272"></a>port forwarding (see <a href="Chapter3.html#using-port-forwarding">section 3.5</a>).
</p>
<p>
Note that unlike some software (such as web browsers), PuTTY does not attempt to automatically determine whether to use a proxy and (if so) which one to use for a given destination. If you need to use a proxy, it must always be explicitly configured.
</p>
<h3><a name="config-proxy-type"></a><a name="S4.16.1"></a>4.16.1 Setting the proxy type</h3>
<p>
The &#8216;Proxy type&#8217; drop-down allows you to configure what type of proxy you want PuTTY to use for its network connections. The default setting is &#8216;None&#8217;; in this mode no proxy is used for any connection.
</p>
<ul><li>
Selecting <a name="i273"></a>&#8216;HTTP CONNECT&#8217; allows you to proxy your connections through a web server supporting the HTTP <code>CONNECT</code> command, as documented in <a href="https://www.rfc-editor.org/rfc/rfc2817">RFC 2817</a>.
</li>
<li>
Selecting &#8216;SOCKS 4&#8217; or &#8216;SOCKS 5&#8217; allows you to proxy your connections through a <a name="i274"></a>SOCKS server.
</li>
<li>
Many firewalls implement a less formal type of proxy in which a user can make a Telnet or TCP connection directly to the firewall machine and enter a command such as <code>connect myhost.com 22</code> to connect through to an external host. Selecting <a name="i275"></a>&#8216;Telnet&#8217; allows you to tell PuTTY to use this type of proxy, with the precise command specified as described in <a href="#config-proxy-command">section 4.16.5</a>.
</li>
<li>
There are several ways to use a SSH server as a proxy. All of these cause PuTTY to make a secondary SSH connection to the proxy host (sometimes called a &#8216;<a name="i276"></a>jump host&#8217; in this context).
<p>
The &#8216;Proxy hostname&#8217; field will be interpreted as the name of a PuTTY saved session if one exists, or a hostname if not. This allows multi-hop jump paths, if the referenced saved session is itself configured to use an SSH proxy; and it allows combining SSH and non-SSH proxying.
</p>
<ul><li>
&#8216;SSH to proxy and use port forwarding&#8217; causes PuTTY to use the secondary SSH connection to open a port-forwarding channel to the final destination host (similar to OpenSSH's <code>-J</code> option).
</li>
<li>
&#8216;SSH to proxy and execute a command&#8217; causes PuTTY to run an arbitrary remote command on the proxy SSH server and use that command's standard input and output streams to run the primary connection over. The remote command line is specified as described in <a href="#config-proxy-command">section 4.16.5</a>.
</li>
<li>
&#8216;SSH to proxy and invoke a subsystem&#8217; is similar but causes PuTTY to start an SSH &#8216;<a name="i277"></a>subsystem&#8217; rather than an ordinary command line. This might be useful with a specially set up SSH proxy server. 
</li>
</ul>

</li>
<li>
Selecting <a name="i278"></a>&#8216;Local&#8217; allows you to specify an arbitrary command on the local machine to act as a proxy. When the session is started, instead of creating a TCP connection, PuTTY runs the command (specified in <a href="#config-proxy-command">section 4.16.5</a>), and uses its standard input and output streams.
<p>
This could be used, for instance, to talk to some kind of network proxy that PuTTY does not natively support; or you could tunnel a connection over something other than TCP/IP entirely.
</p>
<p>
You can also enable this mode on the command line; see <a href="Chapter3.html#using-cmdline-proxycmd">section 3.11.3.27</a>. 
</p>

</li>
</ul>
<h3><a name="config-proxy-exclude"></a><a name="S4.16.2"></a>4.16.2 Excluding parts of the network from proxying</h3>
<p>
Typically you will only need to use a proxy to connect to non-local parts of your network; for example, your proxy might be required for connections outside your company's internal network. In the &#8216;Exclude Hosts/IPs&#8217; box you can enter ranges of IP addresses, or ranges of DNS names, for which PuTTY will avoid using the proxy and make a direct connection instead.
</p>
<p>
The &#8216;Exclude Hosts/IPs&#8217; box may contain more than one exclusion range, separated by commas. Each range can be an IP address or a DNS name, with a <code>*</code> character allowing wildcards. For example:
</p>
<pre><code>*.example.com
</code></pre>
<p>
This excludes any host with a name ending in <code>.example.com</code> from proxying.
</p>
<pre><code>192.168.88.*
</code></pre>
<p>
This excludes any host with an IP address starting with 192.168.88 from proxying.
</p>
<pre><code>192.168.88.*,*.example.com
</code></pre>
<p>
This excludes both of the above ranges at once.
</p>
<p>
Connections to the local host (the host name <a name="i279"></a><code>localhost</code>, and any <a name="i280"></a>loopback IP address) are never proxied, even if the proxy exclude list does not explicitly contain them. It is very unlikely that this behaviour would ever cause problems, but if it does you can change it by enabling &#8216;Consider proxying local host connections&#8217;.
</p>
<p>
Note that if you are doing <a name="i281"></a>DNS at the proxy (see <a href="#config-proxy-dns">section 4.16.3</a>), you should make sure that your proxy exclusion settings do not depend on knowing the IP address of a host. If the name is passed on to the proxy without PuTTY looking it up, it will never know the IP address and cannot check it against your list.
</p>
<h3><a name="config-proxy-dns"></a><a name="S4.16.3"></a>4.16.3 <a name="i282"></a><a name="i283"></a>Name resolution when using a proxy</h3>
<p>
If you are using a proxy to access a private network, it can make a difference whether <a name="i284"></a>DNS name resolution is performed by PuTTY itself (on the client machine) or performed by the proxy.
</p>
<p>
The &#8216;Do DNS name lookup at proxy end&#8217; configuration option allows you to control this. If you set it to &#8216;No&#8217;, PuTTY will always do its own DNS, and will always pass an IP address to the proxy. If you set it to &#8216;Yes&#8217;, PuTTY will always pass host names straight to the proxy without trying to look them up first.
</p>
<p>
If you set this option to &#8216;Auto&#8217; (the default), PuTTY will do something it considers appropriate for each type of proxy. Most types of proxy (HTTP, SOCK5, SSH, Telnet, and local) will have host names passed straight to them; SOCKS4 proxies will not.
</p>
<p>
Note that if you are doing DNS at the proxy, you should make sure that your proxy exclusion settings (see <a href="#config-proxy-exclude">section 4.16.2</a>) do not depend on knowing the IP address of a host. If the name is passed on to the proxy without PuTTY looking it up, it will never know the IP address and cannot check it against your list.
</p>
<p>
The original SOCKS 4 protocol does not support proxy-side DNS. There is a protocol extension (SOCKS 4A) which does support it, but not all SOCKS 4 servers provide this extension. If you enable proxy DNS and your SOCKS 4 server cannot deal with it, this might be why.
</p>
<p>
If you want to avoid PuTTY making <em>any</em> DNS query related to your destination host name (for example, because your local DNS resolver is very slow to return a negative response in that situation), then as well as setting this control to &#8216;Yes&#8217;, you may also need to turn off GSSAPI authentication and GSSAPI key exchange in SSH (see <a href="#config-ssh-auth-gssapi">section 4.23</a> and <a href="#config-ssh-gssapi-kex">section 4.18.1.1</a> respectively). This is because GSSAPI setup also involves a DNS query for the destination host name, and that query is performed by the separate GSSAPI library, so PuTTY can't override or reconfigure it.
</p>
<h3><a name="config-proxy-auth"></a><a name="S4.16.4"></a>4.16.4 <a name="i285"></a>Username and <a name="i286"></a>password</h3>
<p>
You can enter a username and a password in the &#8216;Username&#8217; and &#8216;Password&#8217; boxes, which will be used if your proxy requires <a name="i287"></a>authentication.
</p>
<p>
<a name="i288"></a>Note that if you save your session, the proxy password will be saved in plain text, so anyone who can access your PuTTY configuration data will be able to discover it.
</p>
<p>
If PuTTY discovers that it needs a proxy username or password and you have not specified one here, PuTTY will prompt for it interactively in the terminal window.
</p>
<p>
Authentication is not fully supported for all forms of proxy:
</p>
<ul><li>
Username and password authentication is supported for HTTP proxies and SOCKS 5 proxies.
<ul><li>
With SOCKS 5, authentication is via <a name="i289"></a>CHAP if the proxy supports it (this is not supported in <a name="i290"></a>PuTTYtel); otherwise the password is sent to the proxy in <a name="i291"></a>plain text.
</li>
<li>
With HTTP proxying, authentication is via &#8216;<a name="i292"></a>HTTP Digest&#8217; if possible (again, not supported in PuTTYtel), or &#8216;<a name="i293"></a>HTTP Basic&#8217;. In the latter case, the password is sent to the proxy in <a name="i294"></a>plain text.
</li>
</ul>

</li>
<li>
SOCKS 4 can use the &#8216;Username&#8217; field, but does not support passwords.
</li>
<li>
SSH proxying can use all the same forms of SSH authentication supported by PuTTY for its main connection. If the SSH server requests password authentication, any configured proxy password will be used, but other authentication methods such as public keys and GSSAPI will be tried first, just as for a primary SSH connection, and if they require credentials such as a key passphrase, PuTTY will interactively prompt for these.
</li>
<li>
You can specify a way to include a username and password in the Telnet/Local proxy command (see <a href="#config-proxy-command">section 4.16.5</a>). If you do so, and don't also specify the actual username and/or password in the configuration, PuTTY will interactively prompt for them.
</li>
</ul>
<h3><a name="config-proxy-command"></a><a name="S4.16.5"></a>4.16.5 Specifying the Telnet, SSH, or Local proxy command</h3>
<p>
If you are using the <a name="i295"></a>Telnet proxy type, the usual command required by the firewall's Telnet server is <code>connect</code>, followed by a host name and a port number. If your proxy needs a different command, you can enter an alternative in the &#8216;Command to send to proxy&#8217; box.
</p>
<p>
If you are using the <a name="i296"></a>Local proxy type, the local command to run is specified here.
</p>
<p>
If you are using the &#8216;SSH to proxy and execute a command&#8217; type, the command to run on the SSH proxy server is specified here. Similarly, if you are using &#8216;SSH to proxy and invoke a subsystem&#8217;, the subsystem name is constructed as specified here.
</p>
<p>
In this string, you can use <code>\n</code> to represent a new-line, <code>\r</code> to represent a carriage return, <code>\t</code> to represent a tab character, and <code>\x</code> followed by two hex digits to represent any other character. <code>\\</code> is used to encode the <code>\</code> character itself.
</p>
<p>
Also, the special strings <code>%host</code> and <code>%port</code> will be replaced by the host name and port number you want to connect to. For Telnet and Local proxy types, the strings <code>%user</code> and <code>%pass</code> will be replaced by the proxy username and password (which, if not specified in the configuration, will be prompted for) &#8211; this does not happen with SSH proxy types (because the proxy username/password are used for SSH authentication). The strings <code>%proxyhost</code> and <code>%proxyport</code> will be replaced by the host details specified on the <em>Proxy</em> panel, if any (this is most likely to be useful for proxy types using a local or remote command). To get a literal <code>%</code> sign, enter <code>%%</code>.
</p>
<p>
If a Telnet proxy server prompts for a username and password before commands can be sent, you can use a command such as:
</p>
<pre><code>%user\n%pass\nconnect %host %port\n
</code></pre>
<p>
This will send your username and password as the first two lines to the proxy, followed by a command to connect to the desired host and port. Note that if you do not include the <code>%user</code> or <code>%pass</code> tokens in the Telnet command, then anything specified in &#8216;Username&#8217; and &#8216;Password&#8217; configuration fields will be ignored.
</p>
<h3><a name="config-proxy-logging"></a><a name="S4.16.6"></a>4.16.6 Controlling <a name="i297"></a>proxy logging</h3>
<p>
Often the proxy interaction has its own diagnostic output; this is particularly the case for local proxy commands.
</p>
<p>
The setting &#8216;Print proxy diagnostics in the terminal window&#8217; lets you control how much of the proxy's diagnostics are printed to the main terminal window, along with output from your main session.
</p>
<p>
By default (&#8216;No&#8217;), proxy diagnostics are only sent to the Event Log; with &#8216;Yes&#8217; they are also printed to the terminal, where they may get mixed up with your main session. &#8216;Only until session starts&#8217; is a compromise; proxy messages will go to the terminal window until the main session is deemed to have started (in a protocol-dependent way), which is when they're most likely to be interesting; any further proxy-related messages during the session will only go to the Event Log.
</p>
<h2><a name="config-ssh"></a><a name="S4.17"></a>4.17 The SSH panel</h2>
<p>
The <a name="i298"></a>SSH panel allows you to configure options that only apply to SSH sessions.
</p>
<h3><a name="config-command"></a><a name="S4.17.1"></a>4.17.1 Executing a specific command on the server</h3>
<p>
In SSH, you don't have to run a general shell session on the server. Instead, you can choose to run a single specific command (such as a mail user agent, for example). If you want to do this, enter the command in the &#8216;<a name="i299"></a>Remote command&#8217; box.
</p>
<p>
Note that most servers will close the session after executing the command.
</p>
<h3><a name="config-ssh-noshell"></a><a name="S4.17.2"></a>4.17.2 &#8216;Don't start a <a name="i300"></a>shell or <a name="i301"></a>command at all&#8217;</h3>
<p>
If you tick this box, PuTTY will not attempt to run a shell or command after connecting to the remote server. You might want to use this option if you are only using the SSH connection for <a name="i302"></a>port forwarding, and your user account on the server does not have the ability to run a shell.
</p>
<p>
This feature is only available in <a name="i303"></a>SSH protocol version 2 (since the version 1 protocol assumes you will always want to run a shell).
</p>
<p>
This feature can also be enabled using the <code>-N</code> command-line option; see <a href="Chapter3.html#using-cmdline-noshell">section 3.11.3.13</a>.
</p>
<p>
If you use this feature in Plink, you will not be able to terminate the Plink process by any graceful means; the only way to kill it will be by pressing Control-C or sending a kill signal from another program.
</p>
<h3><a name="config-ssh-comp"></a><a name="S4.17.3"></a>4.17.3 &#8216;Enable <a name="i304"></a>compression&#8217;</h3>
<p>
This enables data compression in the SSH connection: data sent by the server is compressed before sending, and decompressed at the client end. Likewise, data sent by PuTTY to the server is compressed first and the server decompresses it at the other end. This can help make the most of a low-<a name="i305"></a>bandwidth connection.
</p>
<h3><a name="config-ssh-prot"></a><a name="S4.17.4"></a>4.17.4 &#8216;<a name="i306"></a>SSH protocol version&#8217;</h3>
<p>
This allows you to select whether to use <a name="i307"></a>SSH protocol version 2 or the older <a name="i308"></a>version 1.
</p>
<p>
You should normally leave this at the default of &#8216;2&#8217;. As well as having fewer features, the older SSH-1 protocol is no longer developed, has many known cryptographic weaknesses, and is generally not considered to be secure. PuTTY's protocol 1 implementation is provided mainly for compatibility, and is no longer being enhanced.
</p>
<p>
If a server offers both versions, prefer &#8216;2&#8217;. If you have some server or piece of equipment that only talks SSH-1, select &#8216;1&#8217; here, and do not treat the resulting connection as secure.
</p>
<p>
PuTTY will not automatically fall back to the other version of the protocol if the server turns out not to match your selection here; instead, it will put up an error message and abort the connection. This prevents an active attacker downgrading an intended SSH-2 connection to SSH-1.
</p>
<h3><a name="config-ssh-sharing"></a><a name="S4.17.5"></a>4.17.5 Sharing an SSH connection between PuTTY tools</h3>
<p>
The controls in this box allow you to configure PuTTY to reuse an existing SSH connection, where possible.
</p>
<p>
The SSH-2 protocol permits you to run multiple data channels over the same SSH connection, so that you can log in just once (and do the expensive encryption setup just once) and then have more than one terminal window open.
</p>
<p>
Each instance of PuTTY can still run at most one terminal session, but using the controls in this box, you can configure PuTTY to check if another instance of itself has already connected to the target host, and if so, share that instance's SSH connection instead of starting a separate new one.
</p>
<p>
To enable this feature, just tick the box &#8216;Share SSH connections if possible&#8217;. Then, whenever you start up a PuTTY session connecting to a particular host, it will try to reuse an existing SSH connection if one is available. For example, selecting &#8216;Duplicate Session&#8217; from the system menu will launch another session on the same host, and if sharing is enabled then it will reuse the existing SSH connection.
</p>
<p>
When this mode is in use, the first PuTTY that connected to a given server becomes the &#8216;upstream&#8217;, which means that it is the one managing the real SSH connection. All subsequent PuTTYs which reuse the connection are referred to as &#8216;downstreams&#8217;: they do not connect to the real server at all, but instead connect to the upstream PuTTY via local inter-process communication methods.
</p>
<p>
For this system to be activated, <em>both</em> the upstream and downstream instances of PuTTY must have the sharing option enabled.
</p>
<p>
The upstream PuTTY can therefore not terminate until all its downstreams have closed. This is similar to the effect you get with port forwarding or X11 forwarding, in which a PuTTY whose terminal session has already finished will still remain open so as to keep serving forwarded connections.
</p>
<p>
In case you need to configure this system in more detail, there are two additional checkboxes which allow you to specify whether a particular PuTTY can act as an upstream or a downstream or both. (These boxes only take effect if the main &#8216;Share SSH connections if possible&#8217; box is also ticked.) By default both of these boxes are ticked, so that multiple PuTTYs started from the same configuration will designate one of themselves as the upstream and share a single connection; but if for some reason you need a particular PuTTY configuration <em>not</em> to be an upstream (e.g. because you definitely need it to close promptly) or not to be a downstream (e.g. because it needs to do its own authentication using a special private key) then you can untick one or the other of these boxes.
</p>
<p>
I have referred to &#8216;PuTTY&#8217; throughout the above discussion, but all the other PuTTY tools which make SSH connections can use this mechanism too. For example, if PSCP or PSFTP loads a configuration with sharing enabled, then it can act as a downstream and use an existing SSH connection set up by an instance of GUI PuTTY. The one special case is that PSCP and PSFTP will <em>never</em> act as upstreams.
</p>
<p>
It is possible to test programmatically for the existence of a live upstream using Plink. See <a href="Chapter7.html#plink-option-shareexists">section 7.2.3.4</a>.
</p>
<h2><a name="config-ssh-kex"></a><a name="S4.18"></a>4.18 The Kex panel</h2>
<p>
The Kex panel (short for &#8216;<a name="i309"></a>key exchange&#8217;) allows you to configure options related to SSH-2 key exchange.
</p>
<p>
Key exchange occurs at the start of an SSH connection (and occasionally thereafter); it establishes a <a name="i310"></a>shared secret that is used as the basis for all of SSH's security features. It is therefore very important for the security of the connection that the key exchange is secure.
</p>
<p>
Key exchange is a cryptographically intensive process; if either the client or the server is a relatively slow machine, the slower methods may take several tens of seconds to complete.
</p>
<p>
If connection startup is too slow, or the connection hangs periodically, you may want to try changing these settings.
</p>
<p>
If you don't understand what any of this means, it's safe to leave these settings alone.
</p>
<p>
This entire panel is only relevant to SSH protocol version 2; none of these settings affect SSH-1 at all.
</p>
<h3><a name="config-ssh-kex-order"></a><a name="S4.18.1"></a>4.18.1 <a name="i311"></a>Key exchange algorithm selection</h3>
<p>
PuTTY supports a variety of SSH-2 key exchange methods, and allows you to choose which one you prefer to use; configuration is similar to cipher selection (see <a href="#config-ssh-encryption">section 4.20</a>).
</p>
<p>
PuTTY currently supports the following key exchange methods:
</p>
<ul><li>
&#8216;NTRU Prime / Curve25519 hybrid&#8217;: &#8216;<a name="i312"></a>Streamlined NTRU Prime&#8217; is a lattice-based algorithm intended to resist <a name="i313"></a>quantum attacks. In this key exchange method, it is run in parallel with a conventional Curve25519-based method (one of those included in &#8216;ECDH&#8217;), in such a way that it should be no <em>less</em> secure than that commonly-used method, and hopefully also resistant to a new class of attacks.
</li>
<li>
&#8216;ML-KEM / Curve25519 hybrid&#8217; and &#8216;ML-KEM NIST ECDH hybrid&#8217;: similar hybrid constructs of <a name="i314"></a>ML-KEM, another lattice-based key exchange method intended to be <a name="i315"></a>quantum-resistant. In the former, ML-KEM is hybridised with Curve25519; in the latter, with NIST P384 or P256.
</li>
<li>
&#8216;<a name="i316"></a>ECDH&#8217;: elliptic curve Diffie-Hellman key exchange, with a variety of standard curves and hash algorithms.
</li>
<li>
The original form of <a name="i317"></a>Diffie-Hellman key exchange, with a variety of well-known groups and hashes:
<ul><li>
&#8216;Group 18&#8217;, a well-known 8192-bit group, used with the SHA-512 hash function.
</li>
<li>
&#8216;Group 17&#8217;, a well-known 6144-bit group, used with the SHA-512 hash function.
</li>
<li>
&#8216;Group 16&#8217;, a well-known 4096-bit group, used with the SHA-512 hash function.
</li>
<li>
&#8216;Group 15&#8217;, a well-known 3072-bit group, used with the SHA-512 hash function.
</li>
<li>
&#8216;Group 14&#8217;: a well-known 2048-bit group, used with the SHA-256 hash function or, if the server doesn't support that, SHA-1.
</li>
<li>
&#8216;Group 1&#8217;: a well-known 1024-bit group, used with the SHA-1 hash function. Neither we nor current SSH standards recommend using this method any longer, and it's not used by default in new installations; however, it may be the only method supported by very old server software. 
</li>
</ul>

</li>
<li>
&#8216;Diffie-Hellman <a name="i318"></a>group exchange&#8217;: with this method, instead of using a fixed group, PuTTY requests that the server suggest a group to use for a subsequent Diffie-Hellman key exchange; the server can avoid groups known to be weak, and possibly invent new ones over time, without any changes required to PuTTY's configuration. This key exchange method uses the SHA-256 hash or, if the server doesn't support that, SHA-1.
</li>
<li>
&#8216;<a name="i319"></a>RSA-based key exchange&#8217;: this requires much less computational effort on the part of the client, and somewhat less on the part of the server, than Diffie-Hellman key exchange.
</li>
<li>
&#8216;GSSAPI key exchange&#8217;: see <a href="#config-ssh-gssapi-kex">section 4.18.1.1</a>.
</li>
</ul>
<p>
If the first algorithm PuTTY finds is below the &#8216;warn below here&#8217; line, you will see a warning box when you make the connection, similar to that for cipher selection (see <a href="#config-ssh-encryption">section 4.20</a>).
</p>
<h4><a name="config-ssh-gssapi-kex"></a><a name="S4.18.1.1"></a>4.18.1.1 GSSAPI-based key exchange</h4>
<p>
PuTTY supports a set of key exchange methods that also incorporates GSSAPI-based authentication. They are enabled with the &#8216;Attempt GSSAPI key exchange&#8217; checkbox (which also appears on the &#8216;GSSAPI&#8217; panel).
</p>
<p>
PuTTY can only perform the GSSAPI-authenticated key exchange methods when using Kerberos V5, and not other GSSAPI mechanisms. If the user running PuTTY has current Kerberos V5 credentials, then PuTTY will select the GSSAPI key exchange methods in preference to any of the ordinary SSH key exchange methods configured in the preference list. There's a GSSAPI-based equivalent to most of the ordinary methods listed in <a href="#config-ssh-kex-order">section 4.18.1</a>; server support determines which one will be used. (PuTTY's preference order for GSSAPI-authenticated key exchange methods is fixed, not controlled by the preference list.)
</p>
<p>
The advantage of doing GSSAPI authentication as part of the SSH key exchange is apparent when you are using credential delegation (see <a href="#config-ssh-auth-gssapi-delegation">section 4.23.1</a>). The SSH key exchange can be repeated later in the session, and this allows your Kerberos V5 credentials (which are typically short-lived) to be automatically re-delegated to the server when they are refreshed on the client. (This feature is commonly referred to as &#8216;<a name="i320"></a>cascading credentials&#8217;.)
</p>
<p>
If your server doesn't support GSSAPI key exchange, it may still support GSSAPI in the SSH user authentication phase. This will still let you log in using your Kerberos credentials, but will only allow you to delegate the credentials that are active at the beginning of the session; they can't be refreshed automatically later, in a long-running session. See <a href="#config-ssh-auth-gssapi">section 4.23</a> for how to control GSSAPI user authentication in PuTTY.
</p>
<p>
Another effect of GSSAPI key exchange is that it replaces the usual SSH mechanism of permanent host keys described in <a href="Chapter2.html#gs-hostkey">section 2.2</a>. So if you use this method, then you won't be asked any interactive questions about whether to accept the server's host key. Instead, the Kerberos exchange will verify the identity of the host you connect to, at the same time as verifying your identity to it.
</p>
<h3><a name="config-ssh-kex-rekey"></a><a name="S4.18.2"></a>4.18.2 <a name="i321"></a>Repeat key exchange</h3>
<p>
If the session key negotiated at connection startup is used too much or for too long, it may become feasible to mount attacks against the SSH connection. Therefore, the SSH-2 protocol specifies that a new key exchange should take place every so often; this can be initiated by either the client or the server.
</p>
<p>
While this renegotiation is taking place, no data can pass through the SSH connection, so it may appear to &#8216;freeze&#8217;. (The occurrence of repeat key exchange is noted in the Event Log; see <a href="Chapter3.html#using-eventlog">section 3.1.3.1</a>.) Usually the same algorithm is used as at the start of the connection, with a similar overhead.
</p>
<p>
These options control how often PuTTY will initiate a repeat key exchange (&#8216;rekey&#8217;). You can also force a key exchange at any time from the Special Commands menu (see <a href="Chapter3.html#using-specials">section 3.1.3.2</a>).
</p>
<ul><li>
&#8216;Max minutes before rekey&#8217; specifies the amount of time that is allowed to elapse before a rekey is initiated. If this is set to zero, PuTTY will not rekey due to elapsed time. The SSH-2 protocol specification recommends a timeout of at most 60 minutes.
</li>
</ul>
<p>
You might have a need to disable time-based rekeys completely for the same reasons that <a name="i322"></a>keepalives aren't always helpful. If you anticipate suffering a network dropout of several hours in the middle of an SSH connection, but were not actually planning to send <em>data</em> down that connection during those hours, then an attempted rekey in the middle of the dropout will probably cause the connection to be abandoned, whereas if rekeys are disabled then the connection should in principle survive (in the absence of interfering <a name="i323"></a>firewalls). See <a href="#config-keepalive">section 4.14.1</a> for more discussion of these issues; for these purposes, rekeys have much the same properties as keepalives. (Except that rekeys have cryptographic value in themselves, so you should bear that in mind when deciding whether to turn them off.) Note, however, the the SSH <em>server</em> can still initiate rekeys.
</p>
<ul><li>
&#8216;Minutes between GSSAPI checks&#8217;, if you're using GSSAPI key exchange, specifies how often the GSSAPI credential cache is checked to see whether new tickets are available for delegation, or current ones are near expiration. If forwarding of GSSAPI credentials is enabled, PuTTY will try to rekey as necessary to keep the delegated credentials from expiring. Frequent checks are recommended; rekeying only happens when needed.
</li>
<li>
&#8216;Max data before rekey&#8217; specifies the amount of data (in bytes) that is permitted to flow in either direction before a rekey is initiated. If this is set to zero, PuTTY will not rekey due to transferred data. The SSH-2 protocol specification recommends a limit of at most 1 gigabyte.
<p>
As well as specifying a value in bytes, the following shorthand can be used:
</p>
<ul><li>
&#8216;<code>1k</code>&#8217; specifies 1 kilobyte (1024 bytes).
</li>
<li>
&#8216;<code>1M</code>&#8217; specifies 1 megabyte (1024 kilobytes).
</li>
<li>
&#8216;<code>1G</code>&#8217; specifies 1 gigabyte (1024 megabytes).
</li>
</ul>

</li>
</ul>
<p>
Disabling data-based rekeys entirely is a bad idea. The <a name="i324"></a>integrity, and to a lesser extent, <a name="i325"></a>confidentiality of the SSH-2 protocol depend in part on rekeys occurring before a 32-bit packet sequence number wraps around. Unlike time-based rekeys, data-based rekeys won't occur when the SSH connection is idle, so they shouldn't cause the same problems. The SSH-1 protocol, incidentally, has even weaker integrity protection than SSH-2 without rekeys.
</p>
<h2><a name="config-ssh-hostkey"></a><a name="S4.19"></a>4.19 The Host Keys panel</h2>
<p>
The Host Keys panel allows you to configure options related to <a name="i326"></a>host key management.
</p>
<p>
Host keys are used to prove the server's identity, and assure you that the server is not being spoofed (either by a man-in-the-middle attack or by completely replacing it on the network). See <a href="Chapter2.html#gs-hostkey">section 2.2</a> for a basic introduction to host keys.
</p>
<p>
Much of this panel is only relevant to SSH protocol version 2; SSH-1 only supports one type of host key.
</p>
<h3><a name="config-ssh-hostkey-order"></a><a name="S4.19.1"></a>4.19.1 <a name="i327"></a>Host key type selection</h3>
<p>
PuTTY supports a variety of SSH-2 host key types, and allows you to choose which one you prefer to use to identify the server. Configuration is similar to cipher selection (see <a href="#config-ssh-encryption">section 4.20</a>).
</p>
<p>
PuTTY currently supports the following host key types:
</p>
<ul><li>
&#8216;<a name="i328"></a>Ed25519&#8217;: <a name="i329"></a>Edwards-curve DSA using a twisted Edwards curve with modulus <code>2^255-19</code>.
</li>
<li>
&#8216;<a name="i330"></a>Ed448&#8217;: another <a name="i331"></a>Edwards-curve DSA type, using a larger elliptic curve with a 448-bit instead of 255-bit modulus (so it has a higher security level than Ed25519).
</li>
<li>
&#8216;ECDSA&#8217;: <a name="i332"></a>elliptic curve <a name="i333"></a>DSA using one of the <a name="i334"></a>NIST-standardised elliptic curves.
</li>
<li>
&#8216;DSA&#8217;: straightforward <a name="i335"></a>DSA using modular exponentiation.
</li>
<li>
&#8216;RSA&#8217;: the ordinary <a name="i336"></a>RSA algorithm.
</li>
</ul>
<p>
If PuTTY already has one or more host keys stored for the server, it will by default prefer to use one of those, even if the server has a key type that is higher in the preference order. You can add such a key to PuTTY's cache from within an existing session using the &#8216;Special Commands&#8217; menu; see <a href="Chapter3.html#using-specials">section 3.1.3.2</a>.
</p>
<p>
Otherwise, PuTTY will choose a key type based purely on the preference order you specify in the configuration.
</p>
<p>
If the first key type PuTTY finds is below the &#8216;warn below here&#8217; line, you will see a warning box when you make the connection, similar to that for cipher selection (see <a href="#config-ssh-encryption">section 4.20</a>).
</p>
<h3><a name="config-ssh-prefer-known-hostkeys"></a><a name="S4.19.2"></a>4.19.2 Preferring known host keys</h3>
<p>
By default, PuTTY will adjust the preference order for SSH-2 host key algorithms so that any host keys it already knows are moved to the top of the list.
</p>
<p>
This prevents you from having to check and confirm a new host key for a server you already had one for (e.g. because the server has generated an alternative key of a type higher in PuTTY's preference order, or because you changed the preference order itself).
</p>
<p>
However, on the other hand, it can leak information to a listener in the network about <em>whether</em> you already know a host key for this server.
</p>
<p>
For this reason, this policy is configurable. By turning this checkbox off, you can reset PuTTY to always use the exact order of host key algorithms configured in the preference list described in <a href="#config-ssh-hostkey-order">section 4.19.1</a>, so that a listener will find out nothing about what keys you had stored.
</p>
<h3><a name="config-ssh-kex-manual-hostkeys"></a><a name="S4.19.3"></a>4.19.3 <a name="i337"></a>Manually configuring host keys</h3>
<p>
In some situations, if PuTTY's automated host key management is not doing what you need, you might need to manually configure PuTTY to accept a specific host key, or one of a specific set of host keys.
</p>
<p>
One reason why you might want to do this is because the host name PuTTY is connecting to is using round-robin DNS to return one of multiple actual servers, and they all have different host keys. In that situation, you might need to configure PuTTY to accept any of a list of host keys for the possible servers, while still rejecting any key not in that list.
</p>
<p>
Another reason is if PuTTY's automated host key management is completely unavailable, e.g. because PuTTY (or Plink or PSFTP, etc) is running in a Windows environment without access to the Registry. In that situation, you will probably want to use the <code>-hostkey</code> command-line option to configure the expected host key(s); see <a href="Chapter3.html#using-cmdline-hostkey">section 3.11.3.22</a>.
</p>
<p>
For situations where PuTTY's automated host key management simply picks the wrong host name to store a key under, you may want to consider setting a &#8216;logical host name&#8217; instead; see <a href="#config-loghost">section 4.14.5</a>.
</p>
<p>
To configure manual host keys via the GUI, enter some text describing the host key into the edit box in the &#8216;Manually configure host keys for this connection&#8217; container, and press the &#8216;Add&#8217; button. The text will appear in the &#8216;Host keys or fingerprints to accept&#8217; list box. You can remove keys again with the &#8216;Remove&#8217; button.
</p>
<p>
The text describing a host key can be in one of the following formats:
</p>
<ul><li>
An <a name="i338"></a>SHA-256-based host key fingerprint of the form displayed in PuTTY's Event Log and host key dialog boxes, i.e. &#8216;<code>SHA256:</code>&#8217; followed by 43 case-sensitive characters.
</li>
<li>
An <a name="i339"></a>MD5-based host key fingerprint, i.e. sixteen 2-digit hex numbers separated by colons, optionally preceded by the prefix &#8216;<code>MD5:</code>&#8217;. (The case of the characters does not matter.)
</li>
<li>
A base64-encoded blob describing an SSH-2 public key in OpenSSH's one-line public key format. How you acquire a public key in this format is server-dependent; on an OpenSSH server it can typically be found in a location like <code>/etc/ssh/ssh_host_rsa_key.pub</code>.
</li>
</ul>
<p>
If this box contains at least one host key or fingerprint when PuTTY makes an SSH connection, then PuTTY's automated host key management is completely bypassed: the connection will be permitted if and only if the host key presented by the server is one of the keys listed in this box, and the <a name="i340"></a>host key store in the Registry will be neither read <em>nor written</em>, unless you explicitly do so.
</p>
<p>
If the box is empty (as it usually is), then PuTTY's automated host key management will work as normal.
</p>
<h3><a name="config-ssh-kex-cert"></a><a name="S4.19.4"></a>4.19.4 Configuring PuTTY to accept host <a name="i341"></a>certificates</h3>
<p>
In some environments, the SSH host keys for a lot of servers will all be signed in turn by a central &#8216;certification authority&#8217; (&#8216;CA&#8217; for short). This simplifies host key configuration for users, because if they configure their SSH client to accept host keys certified by that CA, then they don't need to individually confirm each host key the first time they connect to that server.
</p>
<p>
In order to do this, press the &#8216;Configure host CAs&#8217; button in the &#8216;Host keys&#8217; configuration panel. This will launch a secondary configuration dialog box where you can configure what CAs PuTTY will accept signatures from.
</p>
<p>
<strong>Note that this configuration is common to all saved sessions</strong>. Everything in the main PuTTY configuration is specific to one saved session, and you can prepare a separate session with all the configuration different. But there's only one copy of the host CA configuration, and it applies to all sessions PuTTY runs, whether saved or not.
</p>
<p>
(Otherwise, it would be useless &#8211; configuring a CA by hand for each new host wouldn't be any more convenient than pressing the &#8216;confirm&#8217; button for each new host's host key.)
</p>
<p>
To set up a new CA using this config box:
</p>
<p>
First, load the CA's public key from a file, or paste it directly into the &#8216;Public key of certification authority&#8217; edit box. If your organisation signs its host keys in this way, they will publish the public key of their CA so that SSH users can include it in their configuration.
</p>
<p>
Next, in the &#8216;Valid hosts this key is trusted to certify&#8217; box, configure at least one hostname wildcard to say what servers PuTTY should trust this CA to speak for. For example, suppose you work for Example Corporation (<code>example.com</code>), and the Example Corporation IT department has advertised a CA that signs all the Example internal machines' host keys. Then probably you want to trust that CA to sign host keys for machines in the domain <code>example.com</code>, but not for anything else. So you might enter &#8216;<code>*.example.com</code>&#8217; into the &#8216;Valid hosts&#8217; box.
</p>
<p>
<strong>It's important to limit what the CA key is allowed to sign</strong>. Don't just enter &#8216;<code>*</code>&#8217; in that box! If you do that, you're saying that Example Corporation IT department is authorised to sign a host key for <em>anything at all</em> you might decide to connect to &#8211; even if you're connecting out of the company network to a machine somewhere else, such as your own personal server. So that configuration would enable the Example IT department to act as a &#8216;man-in-the-middle&#8217; between your PuTTY process and your server, and listen in to your communications &#8211; exactly the thing SSH is supposed to avoid.
</p>
<p>
So, if the CA was provided to you by the sysadmins responsible for <code>example.com</code> (or whatever), make sure PuTTY will <em>only</em> trust it for machines in the <code>example.com</code> domain.
</p>
<p>
For the full syntax of the &#8216;Valid hosts&#8217; expression, see <a href="#config-ssh-cert-valid-expr">section 4.19.4.1</a>.
</p>
<p>
Finally, choose an identifying name for this CA; enter that name in the &#8216;Name for this CA&#8217; edit box at the top of the window, and press &#8216;Save&#8217; to record the CA in your configuration. The name you chose will appear in the list of saved CAs to the left of the &#8216;Save&#8217; button.
</p>
<p>
The identifying name can be anything you like. It's there so that if you store multiple certificates you can tell which is which later when you want to edit or delete them. It also appears in the PuTTY Event Log when a server presents a certificate signed by that CA.
</p>
<p>
To reload an existing CA configuration, select it in the list box and press &#8216;Load&#8217;. Then you can make changes, and save it again.
</p>
<p>
To remove a CA from your configuration completely, select it in the list and press &#8216;Delete&#8217;.
</p>
<h4><a name="config-ssh-cert-valid-expr"></a><a name="S4.19.4.1"></a>4.19.4.1 Expressions you can enter in &#8216;Valid hosts&#8217;</h4>
<p>
The simplest thing you can enter in the &#8216;Valid hosts this key is trusted to certify&#8217; edit box is just a hostname wildcard such as &#8216;<code>*.example.com</code>&#8217;. This matches any host in any subdomain, so both &#8216;<code>ssh.example.com</code>&#8217; and &#8216;<code>login.dept.example.com</code>&#8217; would match, but &#8216;<code>prod.example.net</code>&#8217; would not.
</p>
<p>
But you can also enter multiple host name wildcards, and port number ranges, and make complicated Boolean expressions out of them using the operators &#8216;<code>&amp;&amp;</code>&#8217; for &#8216;and&#8217;, &#8216;<code>||</code>&#8217; for &#8216;or&#8217;, &#8216;<code>!</code>&#8217; for &#8216;not&#8217;, and parentheses.
</p>
<p>
For example, here are some other things you could enter.
</p>
<ul><li>
&#8216;<code>*.foo.example.com || *.bar.example.com</code>&#8217;. This means the CA is trusted to sign the host key for a connection if the host name matches &#8216;*.foo.example.com&#8217; <em>or</em> it matches &#8216;*.bar.example.com&#8217;. In other words, the CA has authority over those two particular subdomains of <code>example.com</code>, but not for anything else, like <code>www.example.com</code>.
</li>
<li>
&#8216;<code>*.example.com &amp;&amp; ! *.extrasecure.example.com</code>&#8217;. This means the CA is trusted to sign the host key for a connection if the host name matches &#8216;*.example.com&#8217; <em>but does not</em> match &#8216;*.extrasecure.example.com&#8217;. (Imagine if there was one top-secret set of servers in your company that the main IT department didn't have security clearance to administer.)
</li>
<li>
&#8216;<code>*.example.com &amp;&amp; port:22</code>&#8217;. This means the CA is trusted to sign the host key for a connection if the host name matches &#8216;*.example.com&#8217; <em>and</em> the port number is 22. SSH servers running on other ports would not be covered.
</li>
<li>
&#8216;<code>(*.foo.example.com || *.bar.example.com) &amp;&amp; port:0-1023</code>&#8217;. This matches two subdomains of <code>example.com</code>, as before, but <em>also</em> restricts the port number to the range 0-1023.
</li>
</ul>
<p>
A certificate configuration expression consists of one or more individual requirements which can each be a hostname wildcard, a single port number, or a port number range, combined together with these Boolean operators.
</p>
<p>
Unlike other languages such as C, there is no implied priority between &#8216;<code>&amp;&amp;</code>&#8217; and &#8216;<code>||</code>&#8217;. If you write &#8216;<code>A &amp;&amp; B || C</code>&#8217; (where <code>A</code>, <code>B</code> and <code>C</code> are some particular requirements), then PuTTY will report a syntax error, because you haven't said which of the &#8216;<code>&amp;&amp;</code>&#8217; and &#8216;<code>||</code>&#8217; takes priority tightly. You will have to write either &#8216;<code>(A &amp;&amp; B) || C</code>&#8217;, meaning &#8216;both of <code>A</code> and <code>B</code>, or alternatively just <code>C</code>&#8217;, or &#8216;<code>A &amp;&amp; (B || C)</code>&#8217; (&#8216;<code>A</code>, and also at least one of <code>B</code> and <code>C</code>&#8217;), to make it clear.
</p>
<h4><a name="config-ssh-cert-rsa-hash"></a><a name="S4.19.4.2"></a>4.19.4.2 RSA signature types in certificates</h4>
<p>
RSA keys can be used to generate signatures with a choice of secure hash function. Typically, any version of OpenSSH new enough to support certificates at all will also be new enough to avoid using SHA-1, so the default settings of accepting the more modern SHA-256 and SHA-512 should be suitable for nearly all cases. For completeness, however, you can configure which types of RSA signature PuTTY will accept in a certificate from a CA using an RSA key.
</p>
<h2><a name="config-ssh-encryption"></a><a name="S4.20"></a>4.20 The Cipher panel</h2>
<p>
PuTTY supports a variety of different <a name="i342"></a>encryption algorithms, and allows you to choose which one you prefer to use. You can do this by dragging the algorithms up and down in the list box (or moving them using the Up and Down buttons) to specify a preference order. When you make an SSH connection, PuTTY will search down the list from the top until it finds an algorithm supported by the server, and then use that.
</p>
<p>
PuTTY currently supports the following algorithms:
</p>
<ul><li>
<a name="i343"></a>ChaCha20-Poly1305, a combined cipher and <a name="i344"></a>MAC (SSH-2 only)
</li>
<li>
<a name="i345"></a>AES (Rijndael) - 256, 192, or 128-bit SDCTR or CBC, or 256 or 128-bit GCM (SSH-2 only)
</li>
<li>
<a name="i346"></a>Arcfour (RC4) - 256 or 128-bit stream cipher (SSH-2 only)
</li>
<li>
<a name="i347"></a>Blowfish - 256-bit SDCTR (SSH-2 only) or 128-bit CBC
</li>
<li>
<a name="i348"></a>Triple-DES - 168-bit SDCTR (SSH-2 only) or CBC
</li>
<li>
<a name="i349"></a>Single-DES - 56-bit CBC (see below for SSH-2)
</li>
</ul>
<p>
If the algorithm PuTTY finds is below the &#8216;warn below here&#8217; line, you will see a warning box when you make the connection:
</p>
<pre><code>The first cipher supported by the server
is single-DES, which is below the configured
warning threshold.
Do you want to continue with this connection?
</code></pre>
<p>
This warns you that the first available encryption is not a very secure one. Typically you would put the &#8216;warn below here&#8217; line between the encryptions you consider secure and the ones you consider substandard. By default, PuTTY supplies a preference order intended to reflect a reasonable preference in terms of security and speed.
</p>
<p>
In SSH-2, the encryption algorithm is negotiated independently for each direction of the connection, although PuTTY does not support separate configuration of the preference orders. As a result you may get two warnings similar to the one above, possibly with different encryptions.
</p>
<p>
Single-DES is not recommended in the SSH-2 protocol standards, but one or two server implementations do support it. PuTTY can use single-DES to interoperate with these servers if you enable the &#8216;Enable legacy use of single-DES in SSH-2&#8217; option; by default this is disabled and PuTTY will stick to recommended ciphers.
</p>
<h2><a name="config-ssh-auth"></a><a name="S4.21"></a>4.21 The Auth panel</h2>
<p>
The Auth panel allows you to configure <a name="i350"></a>authentication options for SSH sessions.
</p>
<h3><a name="config-ssh-banner"></a><a name="S4.21.1"></a>4.21.1 &#8216;Display pre-authentication banner&#8217;</h3>
<p>
SSH-2 servers can provide a message for clients to display to the prospective user before the user logs in; this is sometimes known as a pre-authentication &#8216;<a name="i351"></a>banner&#8217;. Typically this is used to provide information about the server and legal notices.
</p>
<p>
By default, PuTTY displays this message before prompting for a password or similar credentials (although, unfortunately, not before prompting for a login name, due to the nature of the protocol design). By unchecking this option, display of the banner can be suppressed entirely.
</p>
<h3><a name="config-ssh-noauth"></a><a name="S4.21.2"></a>4.21.2 &#8216;Bypass authentication entirely&#8217;</h3>
<p>
In SSH-2, it is in principle possible to establish a connection without using SSH's mechanisms to identify or prove who you are to the server. An SSH server could prefer to handle authentication in the data channel, for instance, or simply require no user authentication whatsoever.
</p>
<p>
By default, PuTTY assumes the server requires authentication (we've never heard of one that doesn't), and thus must start this process with a username. If you find you are getting username prompts that you cannot answer, you could try enabling this option. However, most SSH servers will reject this.
</p>
<p>
This is not the option you want if you have a username and just want PuTTY to remember it; for that see <a href="#config-username">section 4.15.1</a>. It's also probably not what if you're trying to set up passwordless login to a mainstream SSH server; depending on the server, you probably wanted public-key authentication (<a href="Chapter8.html#pubkey">chapter 8</a>) or perhaps GSSAPI authentication (<a href="#config-ssh-auth-gssapi">section 4.23</a>). (These are still forms of authentication, even if you don't have to interact with them.)
</p>
<p>
This option only affects SSH-2 connections. SSH-1 connections always require an authentication step.
</p>
<h3><a name="config-ssh-notrivialauth"></a><a name="S4.21.3"></a>4.21.3 &#8216;Disconnect if authentication succeeds trivially&#8217;</h3>
<p>
This option causes PuTTY to abandon an SSH session and disconnect from the server, if the server accepted authentication without ever having asked for any kind of password or signature or token.
</p>
<p>
This might be used as a security measure. There are some forms of attack against an SSH client user which work by terminating the SSH authentication stage early, and then doing something in the main part of the SSH session which <em>looks</em> like part of the authentication, but isn't really.
</p>
<p>
For example, instead of demanding a signature from your public key, for which PuTTY would ask for your key's passphrase, a compromised or malicious server might allow you to log in with no signature or password at all, and then print a message that <em>imitates</em> PuTTY's request for your passphrase, in the hope that you would type it in. (In fact, the passphrase for your public key should not be sent to any server.)
</p>
<p>
PuTTY's main defence against attacks of this type is the &#8216;trust sigil&#8217; system: messages in the PuTTY window that are truly originated by PuTTY itself are shown next to a small copy of the PuTTY icon, which the server cannot fake when it tries to imitate the same message using terminal output.
</p>
<p>
However, if you think you might be at risk of this kind of thing anyway (if you don't watch closely for the trust sigils, or if you think you're at extra risk of one of your servers being malicious), then you could enable this option as an extra defence. Then, if the server tries any of these attacks involving letting you through the authentication stage, PuTTY will disconnect from the server before it can send a follow-up fake prompt or other type of attack.
</p>
<p>
On the other hand, some servers <em>legitimately</em> let you through the SSH authentication phase trivially, either because they are genuinely public, or because the important authentication step happens during the terminal session. (An example might be an SSH server that connects you directly to the terminal login prompt of a legacy mainframe.) So enabling this option might cause some kinds of session to stop working. It's up to you.
</p>
<h3><a name="config-ssh-tryagent"></a><a name="S4.21.4"></a>4.21.4 &#8216;Attempt authentication using Pageant&#8217;</h3>
<p>
If this option is enabled, then PuTTY will look for Pageant (the SSH private-key storage agent) and attempt to authenticate with any suitable public keys Pageant currently holds.
</p>
<p>
This behaviour is almost always desirable, and is therefore enabled by default. In rare cases you might need to turn it off in order to force authentication by some non-public-key method such as passwords.
</p>
<p>
This option can also be controlled using the <code>-noagent</code> command-line option. See <a href="Chapter3.html#using-cmdline-agentauth">section 3.11.3.9</a>.
</p>
<p>
See <a href="Chapter9.html#pageant">chapter 9</a> for more information about Pageant in general.
</p>
<h3><a name="config-ssh-tis"></a><a name="S4.21.5"></a>4.21.5 &#8216;Attempt <a name="i352"></a>TIS or <a name="i353"></a>CryptoCard authentication&#8217;</h3>
<p>
TIS and CryptoCard authentication are (despite their names) generic forms of simple <a name="i354"></a>challenge/response authentication available in SSH protocol version 1 only. You might use them if you were using <a name="i355"></a>S/Key <a name="i356"></a>one-time passwords, for example, or if you had a physical <a name="i357"></a>security token that generated responses to authentication challenges. They can even be used to prompt for simple passwords.
</p>
<p>
With this switch enabled, PuTTY will attempt these forms of authentication if the server is willing to try them. You will be presented with a challenge string (which may be different every time) and must supply the correct response in order to log in. If your server supports this, you should talk to your system administrator about precisely what form these challenges and responses take.
</p>
<h3><a name="config-ssh-ki"></a><a name="S4.21.6"></a>4.21.6 &#8216;Attempt <a name="i358"></a>keyboard-interactive authentication&#8217;</h3>
<p>
The SSH-2 equivalent of TIS authentication is called &#8216;keyboard-interactive&#8217;. It is a flexible authentication method using an arbitrary sequence of requests and responses; so it is not only useful for <a name="i359"></a>challenge/response mechanisms such as <a name="i360"></a>S/Key, but it can also be used for (for example) asking the user for a <a name="i361"></a>new password when the old one has expired.
</p>
<p>
PuTTY leaves this option enabled by default, but supplies a switch to turn it off in case you should have trouble with it.
</p>
<h3><a name="config-ssh-agentfwd"></a><a name="S4.21.7"></a>4.21.7 &#8216;Allow <a name="i362"></a>agent forwarding&#8217;</h3>
<p>
This option allows the SSH server to open forwarded connections back to your local copy of <a name="i363"></a>Pageant. If you are not running Pageant, this option will do nothing.
</p>
<p>
See <a href="Chapter9.html#pageant">chapter 9</a> for general information on Pageant, and <a href="Chapter9.html#pageant-forward">section 9.4</a> for information on agent forwarding. Note that there is a security risk involved with enabling this option; see <a href="Chapter9.html#pageant-security">section 9.6</a> for details.
</p>
<h3><a name="config-ssh-changeuser"></a><a name="S4.21.8"></a>4.21.8 &#8216;Allow attempted <a name="i364"></a>changes of username in SSH-2&#8217;</h3>
<p>
In the SSH-1 protocol, it is impossible to change username after failing to authenticate. So if you mis-type your username at the PuTTY &#8216;login as:&#8217; prompt, you will not be able to change it except by restarting PuTTY.
</p>
<p>
The SSH-2 protocol <em>does</em> allow changes of username, in principle, but does not make it mandatory for SSH-2 servers to accept them. In particular, <a name="i365"></a>OpenSSH does not accept a change of username; once you have sent one username, it will reject attempts to try to authenticate as another user. (Depending on the version of OpenSSH, it may quietly return failure for all login attempts, or it may send an error message.)
</p>
<p>
For this reason, PuTTY will by default not prompt you for your username more than once, in case the server complains. If you know your server can cope with it, you can enable the &#8216;Allow attempted changes of username&#8217; option to modify PuTTY's behaviour.
</p>
<h2><a name="config-ssh-auth-creds"></a><a name="S4.22"></a>4.22 The Credentials panel</h2>
<p>
This subpane of the Auth panel contains configuration options that specify actual <em>credentials</em> to present to the server: key files and certificates.
</p>
<h3><a name="config-ssh-privkey"></a><a name="S4.22.1"></a>4.22.1 &#8216;<a name="i366"></a>Private key file for authentication&#8217;</h3>
<p>
This box is where you enter the name of your private key file if you are using <a name="i367"></a>public key authentication. See <a href="Chapter8.html#pubkey">chapter 8</a> for information about public key authentication in SSH.
</p>
<p>
This key must be in PuTTY's native format (<code>*.<a name="i368"></a>PPK</code>). If you have a private key in another format that you want to use with PuTTY, see <a href="Chapter8.html#puttygen-conversions">section 8.2.15</a>.
</p>
<p>
You can use the authentication agent <a name="i369"></a>Pageant so that you do not need to explicitly configure a key here; see <a href="Chapter9.html#pageant">chapter 9</a>.
</p>
<p>
If a private key file is specified here with Pageant running, PuTTY will first try asking Pageant to authenticate with that key, and ignore any other keys Pageant may have. If that fails, PuTTY will ask for a passphrase as normal. You can also specify a <em>public</em> key file in this case (in RFC 4716 or OpenSSH format), as that's sufficient to identify the key to Pageant, but of course if Pageant isn't present PuTTY can't fall back to using this file itself.
</p>
<h3><a name="config-ssh-cert"></a><a name="S4.22.2"></a>4.22.2 &#8216;<a name="i370"></a>Certificate to use with the private key&#8217;</h3>
<p>
(This is optional. If you don't know you need it, you can leave this blank.)
</p>
<p>
In some environments, user authentication keys can be signed in turn by a &#8216;certifying authority&#8217; (&#8216;CA&#8217; for short), and user accounts on an SSH server can be configured to automatically trust any key that's certified by the right signature.
</p>
<p>
This can be a convenient setup if you have a very large number of servers. When you change your key pair, you might otherwise have to edit the <code>authorized_keys</code> file on every server individually, to make them all accept the new key. But if instead you configure all those servers <em>once</em> to accept keys signed as yours by a CA, then when you change your public key, all you have to do is to get the new key certified by the same CA as before, and then all your servers will automatically accept it without needing individual reconfiguration.
</p>
<p>
One way to use a certificate is to incorporate it into your private key file. <a href="Chapter8.html#puttygen-cert">Section 8.2.9</a> explains how to do that using PuTTYgen. But another approach is to tell PuTTY itself where to find the public certificate file, and then it will automatically present that certificate when authenticating with the corresponding private key.
</p>
<p>
To do this, enter the pathname of the certificate file into the &#8216;Certificate to use with the private key&#8217; file selector.
</p>
<p>
When this setting is configured, PuTTY will honour it no matter whether the private key is found in a file, or loaded into Pageant.
</p>
<h3><a name="config-ssh-authplugin"></a><a name="S4.22.3"></a>4.22.3 &#8216;<a name="i371"></a>Plugin to provide authentication responses&#8217;</h3>
<p>
An SSH server can use the &#8216;keyboard-interactive&#8217; protocol to present a series of arbitrary questions and answers. Sometimes this is used for ordinary passwords, but sometimes the server will use the same mechanism for something more complicated, such as a one-time password system.
</p>
<p>
Some of these systems can be automated. For this purpose, PuTTY allows you to provide a separate program to act as a &#8216;plugin&#8217; which will take over the authentication and send answers to the questions on your behalf.
</p>
<p>
If you have been provided with a plugin of this type, you can configure it here, by entering a full command line in the &#8216;Plugin command to run&#8217; box.
</p>
<p>
(If you want to <em>write</em> a plugin of this type, see <a href="AppendixH.html#authplugin">appendix H</a> for the full specification of how the plugin is expected to behave.)
</p>
<h2><a name="config-ssh-auth-gssapi"></a><a name="S4.23"></a>4.23 The <a name="i372"></a>GSSAPI panel</h2>
<p>
The &#8216;GSSAPI&#8217; subpanel of the &#8216;Auth&#8217; panel controls the use of GSSAPI authentication. This is a mechanism which delegates the authentication exchange to a library elsewhere on the client machine, which in principle can authenticate in many different ways but in practice is usually used with the <a name="i373"></a>Kerberos <a name="i374"></a>single sign-on protocol to implement <a name="i375"></a>passwordless login.
</p>
<p>
GSSAPI authentication is only available in the SSH-2 protocol.
</p>
<p>
PuTTY supports two forms of GSSAPI-based authentication. In one of them, the SSH key exchange happens in the normal way, and GSSAPI is only involved in authenticating the user. The checkbox labelled &#8216;Attempt GSSAPI authentication&#8217; controls this form.
</p>
<p>
In the other method, GSSAPI-based authentication is combined with the SSH key exchange phase. If this succeeds, then the SSH authentication step has nothing left to do. See <a href="#config-ssh-gssapi-kex">section 4.18.1.1</a> for more information about this method. The checkbox labelled &#8216;Attempt GSSAPI key exchange&#8217; controls this form. (The same checkbox appears on the &#8216;Kex&#8217; panel.)
</p>
<p>
If one or both of these controls is enabled, then GSSAPI authentication will be attempted in one form or the other, and (typically) if your client machine has valid Kerberos credentials loaded, then PuTTY should be able to authenticate automatically to servers that support Kerberos logins.
</p>
<p>
If both of those checkboxes are disabled, PuTTY will not try any form of GSSAPI at all, and the rest of this panel will be unused.
</p>
<h3><a name="config-ssh-auth-gssapi-delegation"></a><a name="S4.23.1"></a>4.23.1 &#8216;Allow GSSAPI credential delegation&#8217;</h3>
<p>
<a name="i376"></a>GSSAPI credential delegation is a mechanism for passing on your Kerberos (or other) identity to the session on the SSH server. If you enable this option, then not only will PuTTY be able to log in automatically to a server that accepts your Kerberos credentials, but also you will be able to connect out from that server to other Kerberos-supporting services and use the same credentials just as automatically.
</p>
<p>
(This option is the Kerberos analogue of SSH agent forwarding; see <a href="Chapter9.html#pageant-forward">section 9.4</a> for some information on that.)
</p>
<p>
Note that, like SSH agent forwarding, there is a security implication in the use of this option: the administrator of the server you connect to, or anyone else who has cracked the administrator account on that server, could fake your identity when connecting to further Kerberos-supporting services. However, Kerberos sites are typically run by a central authority, so the administrator of one server is likely to already have access to the other services too; so this would typically be less of a risk than SSH agent forwarding.
</p>
<p>
If your connection is not using GSSAPI key exchange, it is possible for the delegation to expire during your session. See <a href="#config-ssh-gssapi-kex">section 4.18.1.1</a> for more information.
</p>
<h3><a name="config-ssh-auth-gssapi-libraries"></a><a name="S4.23.2"></a>4.23.2 Preference order for GSSAPI libraries</h3>
<p>
GSSAPI is a mechanism which allows more than one authentication method to be accessed through the same interface. Therefore, more than one authentication library may exist on your system which can be accessed using GSSAPI.
</p>
<p>
PuTTY contains native support for a few well-known such libraries (including Windows' <a name="i377"></a>SSPI), and will look for all of them on your system and use whichever it finds. If more than one exists on your system and you need to use a specific one, you can adjust the order in which it will search using this preference list control.
</p>
<p>
One of the options in the preference list is to use a user-specified GSSAPI library. If the library you want to use is not mentioned by name in PuTTY's list of options, you can enter its full pathname in the &#8216;User-supplied GSSAPI library path&#8217; field, and move the &#8216;User-supplied GSSAPI library&#8217; option in the preference list to make sure it is selected before anything else.
</p>
<p>
On Windows, such libraries are files with a <a name="i378"></a><code>.dll</code> extension, and must have been built in the same way as the PuTTY executable you're running; if you have a 32-bit DLL, you must run a 32-bit version of PuTTY, and the same with 64-bit (see <a href="AppendixA.html#faq-32bit-64bit">question A.6.10</a>). On Unix, shared libraries generally have a <code>.so</code> extension.
</p>
<h2><a name="config-ssh-tty"></a><a name="S4.24"></a>4.24 The TTY panel</h2>
<p>
The TTY panel lets you configure the remote pseudo-terminal.
</p>
<h3><a name="config-ssh-pty"></a><a name="S4.24.1"></a>4.24.1 <a name="i379"></a>&#8216;Don't allocate a pseudo-terminal&#8217;</h3>
<p>
When connecting to a <a name="i380"></a>Unix system, most <a name="i381"></a>interactive shell sessions are run in a <em>pseudo-terminal</em>, which allows the Unix system to pretend it's talking to a real physical terminal device but allows the SSH server to catch all the data coming from that fake device and send it back to the client.
</p>
<p>
Occasionally you might find you have a need to run a session <em>not</em> in a pseudo-terminal. In PuTTY, this is generally only useful for very specialist purposes; although in Plink (see <a href="Chapter7.html#plink">chapter 7</a>) it is the usual way of working.
</p>
<h3><a name="config-ttymodes"></a><a name="S4.24.2"></a>4.24.2 Sending <a name="i382"></a>terminal modes</h3>
<p>
The SSH protocol allows the client to send &#8216;terminal modes&#8217; for the remote pseudo-terminal. These usually control the server's expectation of the local terminal's behaviour.
</p>
<p>
If your server does not have sensible defaults for these modes, you may find that changing them here helps, although the server is at liberty to ignore your changes. If you don't understand any of this, it's safe to leave these settings alone.
</p>
<p>
(None of these settings will have any effect if no pseudo-terminal is requested or allocated.)
</p>
<p>
You can change what happens for a particular mode by selecting it in the list, choosing one of the options and specifying the exact value if necessary, and hitting &#8216;Set&#8217;. The effect of the options is as follows:
</p>
<ul><li>
If the &#8216;Auto&#8217; option is selected, the PuTTY tools will decide whether to specify that mode to the server, and if so, will send a sensible value.
<p>
PuTTY proper will send modes that it has an opinion on (currently only the code for the Backspace key, <code>ERASE</code>, and whether the character set is UTF-8, <code>IUTF8</code>). Plink on Unix will propagate appropriate modes from the local terminal, if any.
</p>

</li>
<li>
If &#8216;Nothing&#8217; is selected, no value for the mode will be specified to the server under any circumstances.
</li>
<li>
If a value is specified, it will be sent to the server under all circumstances. The precise syntax of the value box depends on the mode.
</li>
</ul>
<p>
By default, all of the available modes are listed as &#8216;Auto&#8217;, which should do the right thing in most circumstances.
</p>
<p>
The precise effect of each setting, if any, is up to the server. Their names come from <a name="i383"></a>POSIX and other Unix systems, and they are most likely to have a useful effect on such systems. (These are the same settings that can usually be changed using the <a name="i384"></a><code>stty</code> command once logged in to such servers.)
</p>
<p>
Some notable modes are described below; for fuller explanations, see your server documentation.
</p>
<ul><li>
<a name="i385"></a><code>ERASE</code> is the character that when typed by the user will delete one space to the left. When set to &#8216;Auto&#8217; (the default setting), this follows the setting of the local Backspace key in PuTTY (see <a href="#config-backspace">section 4.4.1</a>).
<p>
This and other <a name="i386"></a>special characters are specified using <code>^C</code> notation for Ctrl-C, and so on. Use <code>^&lt;27&gt;</code> or <code>^&lt;0x1B&gt;</code> to specify a character numerically, and <code>^~</code> to get a literal <code>^</code>. Other non-control characters are denoted by themselves. Leaving the box entirely blank indicates that <em>no</em> character should be assigned to the specified function, although this may not be supported by all servers. 
</p>

</li>
<li>
<a name="i387"></a><code>QUIT</code> is a special character that usually forcefully ends the current process on the server (<code>SIGQUIT</code>). On many servers its default setting is Ctrl-backslash (<code>^\</code>), which is easy to accidentally invoke on many keyboards. If this is getting in your way, you may want to change it to another character or turn it off entirely.
</li>
<li>
Boolean modes such as <code>ECHO</code> and <code>ICANON</code> can be specified in PuTTY in a variety of ways, such as <code>true</code>/<code>false</code>, <code>yes</code>/<code>no</code>, and <code>0</code>/<code>1</code>. (Explicitly specifying a value of <code>no</code> is different from not sending the mode at all.)
</li>
<li>
The boolean mode <a name="i388"></a><code>IUTF8</code> signals to the server whether the terminal character set is <a name="i389"></a>UTF-8 or not, for purposes such as basic line editing; if this is set incorrectly, the backspace key may erase the wrong amount of text, for instance. However, simply setting this is not usually sufficient for the server to use UTF-8; POSIX servers will generally also require the locale to be set (by some server-dependent means), although many newer installations default to UTF-8. Also, since this mode was added to the SSH protocol much later than the others, many servers (particularly older servers) do not honour this mode sent over SSH; indeed, a few poorly-written servers object to its mere presence, so you may find you need to set it to not be sent at all. When set to &#8216;Auto&#8217;, this follows the local configured character set (see <a href="#config-charset">section 4.10.1</a>).
</li>
<li>
Terminal speeds are configured elsewhere; see <a href="#config-termspeed">section 4.15.4</a>.
</li>
</ul>
<h2><a name="config-ssh-x11"></a><a name="S4.25"></a>4.25 The X11 panel</h2>
<p>
The X11 panel allows you to configure <a name="i390"></a>forwarding of X11 over an SSH connection.
</p>
<p>
If your server lets you run X Window System <a name="i391"></a>graphical applications, X11 forwarding allows you to securely give those applications access to a local X display on your PC.
</p>
<p>
To enable X11 forwarding, check the &#8216;Enable X11 forwarding&#8217; box. If your X display is somewhere unusual, you will need to enter its location in the &#8216;X display location&#8217; box; if this is left blank, PuTTY will try to find a sensible default in the environment, or use the primary local display (<code>:0</code>) if that fails.
</p>
<p>
See <a href="Chapter3.html#using-x-forwarding">section 3.4</a> for more information about X11 forwarding.
</p>
<h3><a name="config-ssh-x11auth"></a><a name="S4.25.1"></a>4.25.1 Remote <a name="i392"></a>X11 authentication</h3>
<p>
If you are using X11 forwarding, the virtual X server created on the SSH server machine will be protected by authorisation data. This data is invented, and checked, by PuTTY.
</p>
<p>
The usual authorisation method used for this is called <a name="i393"></a><code>MIT-MAGIC-COOKIE-1</code>. This is a simple password-style protocol: the X client sends some cookie data to the server, and the server checks that it matches the real cookie. The cookie data is sent over an unencrypted X11 connection; so if you allow a client on a third machine to access the virtual X server, then the cookie will be sent in the clear.
</p>
<p>
PuTTY offers the alternative protocol <a name="i394"></a><code>XDM-AUTHORIZATION-1</code>. This is a cryptographically authenticated protocol: the data sent by the X client is different every time, and it depends on the IP address and port of the client's end of the connection and is also stamped with the current time. So an eavesdropper who captures an <code>XDM-AUTHORIZATION-1</code> string cannot immediately re-use it for their own X connection.
</p>
<p>
PuTTY's support for <code>XDM-AUTHORIZATION-1</code> is a somewhat experimental feature, and may encounter several problems:
</p>
<ul><li>
Some X clients probably do not even support <code>XDM-AUTHORIZATION-1</code>, so they will not know what to do with the data PuTTY has provided.
</li>
<li>
This authentication mechanism will only work in SSH-2. In SSH-1, the SSH server does not tell the client the source address of a forwarded connection in a machine-readable format, so it's impossible to verify the <code>XDM-AUTHORIZATION-1</code> data.
</li>
<li>
You may find this feature causes problems with some SSH servers, which will not clean up <code>XDM-AUTHORIZATION-1</code> data after a session, so that if you then connect to the same server using a client which only does <code>MIT-MAGIC-COOKIE-1</code> and are allocated the same remote display number, you might find that out-of-date authentication data is still present on your server and your X connections fail.
</li>
</ul>
<p>
PuTTY's default is <code>MIT-MAGIC-COOKIE-1</code>. If you change it, you should be sure you know what you're doing.
</p>
<h3><a name="config-ssh-xauthority"></a><a name="S4.25.2"></a>4.25.2 X authority file for local display</h3>
<p>
If you are using X11 forwarding, the local X server to which your forwarded connections are eventually directed may itself require authorisation.
</p>
<p>
Some Windows X servers do not require this: they do authorisation by simpler means, such as accepting any connection from the local machine but not from anywhere else. However, if your X server does require authorisation, then PuTTY needs to know what authorisation is required.
</p>
<p>
One way in which this data might be made available is for the X server to store it somewhere in a file which has the same format as the Unix <code>.Xauthority</code> file. If this is how your Windows X server works, then you can tell PuTTY where to find this file by configuring this option. By default, PuTTY will not attempt to find any authorisation for your local display.
</p>
<h2><a name="config-ssh-portfwd"></a><a name="S4.26"></a>4.26 <a name="i395"></a>The Tunnels panel</h2>
<p>
The Tunnels panel allows you to configure tunnelling of arbitrary connection types through an SSH connection.
</p>
<p>
Port forwarding allows you to tunnel other types of <a name="i396"></a>network connection down an SSH session. See <a href="Chapter3.html#using-port-forwarding">section 3.5</a> for a general discussion of port forwarding and how it works.
</p>
<p>
The port forwarding section in the Tunnels panel shows a list of all the port forwardings that PuTTY will try to set up when it connects to the server. By default no port forwardings are set up, so this list is empty.
</p>
<p>
To add a port forwarding:
</p>
<ul><li>
Set one of the &#8216;Local&#8217; or &#8216;Remote&#8217; radio buttons, depending on whether you want to <a name="i397"></a>forward a local port to a remote destination (&#8216;Local&#8217;) or <a name="i398"></a>forward a remote port to a local destination (&#8216;Remote&#8217;). Alternatively, select &#8216;Dynamic&#8217; if you want PuTTY to <a name="i399"></a>provide a local SOCKS 4/4A/5 proxy on a local port (note that this proxy only supports TCP connections; the SSH protocol does not support forwarding <a name="i400"></a>UDP).
</li>
<li>
Enter a source <a name="i401"></a>port number into the &#8216;Source port&#8217; box. For local forwardings, PuTTY will listen on this port of your PC. For remote forwardings, your SSH server will listen on this port of the remote machine. Note that most servers will not allow you to listen on <a name="i402"></a>port numbers less than 1024.
</li>
<li>
If you have selected &#8216;Local&#8217; or &#8216;Remote&#8217; (this step is not needed with &#8216;Dynamic&#8217;), enter a hostname and port number separated by a colon, in the &#8216;Destination&#8217; box. Connections received on the source port will be directed to this destination. For example, to connect to a POP-3 server, you might enter <code>popserver.example.com:110</code>. (If you need to enter a literal <a name="i403"></a>IPv6 address, enclose it in square brackets, for instance &#8216;<code>[::1]:2200</code>&#8217;.)
</li>
<li>
Click the &#8216;Add&#8217; button. Your forwarding details should appear in the list box.
</li>
</ul>
<p>
To remove a port forwarding, simply select its details in the list box, and click the &#8216;Remove&#8217; button.
</p>
<p>
In the &#8216;Source port&#8217; box, you can also optionally enter an <a name="i404"></a>IP address to listen on, by specifying (for instance) <code>127.0.0.5:79</code>. See <a href="Chapter3.html#using-port-forwarding">section 3.5</a> for more information on how this works and its restrictions.
</p>
<p>
In place of port numbers, you can enter <a name="i405"></a>service names, if they are known to the local system. For instance, in the &#8216;Destination&#8217; box, you could enter <code>popserver.example.com:pop3</code>.
</p>
<p>
You can <a name="i406"></a>modify the currently active set of port forwardings in mid-session using &#8216;Change Settings&#8217; (see <a href="Chapter3.html#using-changesettings">section 3.1.3.4</a>). If you delete a local or dynamic port forwarding in mid-session, PuTTY will stop listening for connections on that port, so it can be re-used by another program. If you delete a remote port forwarding, note that:
</p>
<ul><li>
The SSH-1 protocol contains no mechanism for asking the server to stop listening on a remote port.
</li>
<li>
The SSH-2 protocol does contain such a mechanism, but not all SSH servers support it. (In particular, <a name="i407"></a>OpenSSH does not support it in any version earlier than 3.9.)
</li>
</ul>
<p>
If you ask to delete a remote port forwarding and PuTTY cannot make the server actually stop listening on the port, it will instead just start refusing incoming connections on that port. Therefore, although the port cannot be reused by another program, you can at least be reasonably sure that server-side programs can no longer access the service at your end of the port forwarding.
</p>
<p>
If you delete a forwarding, any existing connections established using that forwarding remain open. Similarly, changes to global settings such as &#8216;Local ports accept connections from other hosts&#8217; only take effect on new forwardings.
</p>
<p>
If the connection you are forwarding over SSH is itself a second SSH connection made by another copy of PuTTY, you might find the &#8216;logical host name&#8217; configuration option useful to warn PuTTY of which host key it should be expecting. See <a href="#config-loghost">section 4.14.5</a> for details of this.
</p>
<h3><a name="config-ssh-portfwd-localhost"></a><a name="S4.26.1"></a>4.26.1 Controlling the visibility of forwarded ports</h3>
<p>
The source port for a forwarded connection usually does not accept connections from any machine except the <a name="i408"></a>SSH client or server machine itself (for local and remote forwardings respectively). There are controls in the Tunnels panel to change this:
</p>
<ul><li>
The &#8216;Local ports accept connections from other hosts&#8217; option allows you to set up local-to-remote port forwardings in such a way that machines other than your client PC can connect to the forwarded port. (This also applies to dynamic SOCKS forwarding.)
</li>
<li>
The &#8216;Remote ports do the same&#8217; option does the same thing for remote-to-local port forwardings (so that machines other than the SSH server machine can connect to the forwarded port.) Note that this feature is only available in the SSH-2 protocol, and not all SSH-2 servers support it (<a name="i409"></a>OpenSSH 3.0 does not, for example).
</li>
</ul>
<h3><a name="config-ssh-portfwd-address-family"></a><a name="S4.26.2"></a>4.26.2 Selecting <a name="i410"></a>Internet protocol version for forwarded ports</h3>
<p>
This switch allows you to select a specific Internet protocol (<a name="i411"></a>IPv4 or <a name="i412"></a>IPv6) for the local end of a forwarded port. By default, it is set on &#8216;Auto&#8217;, which means that:
</p>
<ul><li>
for a local-to-remote port forwarding, PuTTY will listen for incoming connections in both IPv4 and (if available) IPv6
</li>
<li>
for a remote-to-local port forwarding, PuTTY will choose a sensible protocol for the outgoing connection.
</li>
</ul>
<p>
This overrides the general Internet protocol version preference on the Connection panel (see <a href="#config-address-family">section 4.14.4</a>).
</p>
<p>
Note that some operating systems may listen for incoming connections in IPv4 even if you specifically asked for IPv6, because their IPv4 and IPv6 protocol stacks are linked together. Apparently <a name="i413"></a>Linux does this, and Windows does not. So if you're running PuTTY on Windows and you tick &#8216;IPv6&#8217; for a local or dynamic port forwarding, it will <em>only</em> be usable by connecting to it using IPv6; whereas if you do the same on Linux, you can also use it with IPv4. However, ticking &#8216;Auto&#8217; should always give you a port which you can connect to using either protocol.
</p>
<h2><a name="config-ssh-bugs"></a><a name="S4.27"></a>4.27 <a name="i414"></a>The Bugs and More Bugs panels</h2>
<p>
Not all SSH servers work properly. Various existing servers have bugs in them, which can make it impossible for a client to talk to them unless it knows about the bug and works around it.
</p>
<p>
Since most servers announce their software version number at the beginning of the SSH connection, PuTTY will attempt to detect which bugs it can expect to see in the server and automatically enable workarounds. However, sometimes it will make mistakes; if the server has been deliberately configured to conceal its version number, or if the server is a version which PuTTY's bug database does not know about, then PuTTY will not know what bugs to expect.
</p>
<p>
The Bugs and More Bugs panels (there are two because we have so many bug compatibility modes) allow you to manually configure the bugs PuTTY expects to see in the server. Each bug can be configured in three states:
</p>
<ul><li>
&#8216;Off&#8217;: PuTTY will assume the server does not have the bug.
</li>
<li>
&#8216;On&#8217;: PuTTY will assume the server <em>does</em> have the bug.
</li>
<li>
&#8216;Auto&#8217;: PuTTY will use the server's version number announcement to try to guess whether or not the server has the bug. (This option is not available for bugs that <em>cannot</em> be detected from the server version, e.g. because they must be acted on before the server version is known.)
</li>
</ul>
<p>
(The PuTTY project has a defined policy about when we're prepared to add auto-detection for a bug workaround. See <a href="AppendixB.html#feedback-workarounds">section B.6</a>.)
</p>
<h3><a name="config-ssh-bug-ignore2"></a><a name="S4.27.1"></a>4.27.1 &#8216;Chokes on SSH-2 <a name="i415"></a>ignore messages&#8217;</h3>
<p>
An ignore message (SSH_MSG_IGNORE) is a message in the SSH protocol which can be sent from the client to the server, or from the server to the client, at any time. Either side is required to ignore the message whenever it receives it. PuTTY uses ignore messages in SSH-2 to confuse the encrypted data stream and make it harder to cryptanalyse. It also uses ignore messages for connection <a name="i416"></a>keepalives (see <a href="#config-keepalive">section 4.14.1</a>).
</p>
<p>
If it believes the server to have this bug, PuTTY will stop using ignore messages. If this bug is enabled when talking to a correct server, the session will succeed, but keepalives will not work and the session might be less cryptographically secure than it could be.
</p>
<h3><a name="config-ssh-bug-rekey"></a><a name="S4.27.2"></a>4.27.2 &#8216;Handles SSH-2 key re-exchange badly&#8217;</h3>
<p>
Some SSH servers cannot cope with <a name="i417"></a>repeat key exchange at all, and will ignore attempts by the client to start one. Since PuTTY pauses the session while performing a repeat key exchange, the effect of this would be to cause the session to hang after an hour (unless you have your rekey timeout set differently; see <a href="#config-ssh-kex-rekey">section 4.18.2</a> for more about rekeys). Other, very old, SSH servers handle repeat key exchange even more badly, and disconnect upon receiving a repeat key exchange request.
</p>
<p>
If this bug is detected, PuTTY will never initiate a repeat key exchange. If this bug is enabled when talking to a correct server, the session should still function, but may be less secure than you would expect.
</p>
<p>
This is an SSH-2-specific bug.
</p>
<h3><a name="config-ssh-bug-winadj"></a><a name="S4.27.3"></a>4.27.3 &#8216;Chokes on PuTTY's SSH-2 &#8216;<code>winadj</code>&#8217; requests&#8217;</h3>
<p>
PuTTY sometimes sends a special request to SSH servers in the middle of channel data, with the name <code>winadj@putty.projects.tartarus.org</code> (see <a href="AppendixG.html#sshnames-channel">section G.1</a>). The purpose of this request is to measure the round-trip time to the server, which PuTTY uses to tune its flow control. The server does not actually have to <em>understand</em> the message; it is expected to send back a <code>SSH_MSG_CHANNEL_FAILURE</code> message indicating that it didn't understand it. (All PuTTY needs for its timing calculations is <em>some</em> kind of response.)
</p>
<p>
It has been known for some SSH servers to get confused by this message in one way or another &#8211; because it has a long name, or because they can't cope with unrecognised request names even to the extent of sending back the correct failure response, or because they handle it sensibly but fill up the server's log file with pointless spam, or whatever. PuTTY therefore supports this bug-compatibility flag: if it believes the server has this bug, it will never send its &#8216;<code>winadj@putty.projects.tartarus.org</code>&#8217; request, and will make do without its timing data.
</p>
<h3><a name="config-ssh-bug-chanreq"></a><a name="S4.27.4"></a>4.27.4 &#8216;Replies to requests on closed channels&#8217;</h3>
<p>
The SSH protocol as published in RFC 4254 has an ambiguity which arises if one side of a connection tries to close a channel, while the other side simultaneously sends a request within the channel and asks for a reply. RFC 4254 leaves it unclear whether the closing side should reply to the channel request after having announced its intention to close the channel.
</p>
<p>
Discussion on the <code>ietf-ssh</code> mailing list in April 2014 formed a clear consensus that the right answer is no. However, because of the ambiguity in the specification, some SSH servers have implemented the other policy; for example, <a href="https://bugzilla.mindrot.org/show_bug.cgi?id=1818">OpenSSH used to</a> until it was fixed.
</p>
<p>
Because PuTTY sends channel requests with the &#8216;want reply&#8217; flag throughout channels' lifetime (see <a href="#config-ssh-bug-winadj">section 4.27.3</a>), it's possible that when connecting to such a server it might receive a reply to a request after it thinks the channel has entirely closed, and terminate with an error along the lines of &#8216;Received <code>SSH2_MSG_CHANNEL_FAILURE</code> for nonexistent channel 256&#8217;.
</p>
<h3><a name="config-ssh-bug-maxpkt2"></a><a name="S4.27.5"></a>4.27.5 &#8216;Ignores SSH-2 <a name="i418"></a>maximum packet size&#8217;</h3>
<p>
When an SSH-2 channel is set up, each end announces the maximum size of data packet that it is willing to receive for that channel. Some servers ignore PuTTY's announcement and send packets larger than PuTTY is willing to accept, causing it to report &#8216;Incoming packet was garbled on decryption&#8217;.
</p>
<p>
If this bug is detected, PuTTY never allows the channel's <a name="i419"></a>flow-control window to grow large enough to allow the server to send an over-sized packet. If this bug is enabled when talking to a correct server, the session will work correctly, but download performance will be less than it could be.
</p>
<h3><a name="config-ssh-bug-dropstart"></a><a name="S4.27.6"></a>4.27.6 &#8216;Discards data sent before its greeting&#8217;</h3>
<p>
Just occasionally, an SSH connection can be established over some channel that will accidentally discard outgoing data very early in the connection.
</p>
<p>
This is not typically seen as a bug in an actual SSH server, but it can sometimes occur in situations involving a complicated proxy process. An example is <a href="https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=991958">Debian bug #991958</a>, in which a connection going over the console of a User Mode Linux kernel can lose outgoing data before the kernel has fully booted.
</p>
<p>
You can work around this problem by manually enabling this bug flag, which will cause PuTTY to wait to send its initial SSH greeting until after it sees the greeting from the server.
</p>
<p>
Note that this bug flag can never be automatically detected, since auto-detection relies on the version string in the server's greeting, and PuTTY has to decide whether to expect this bug <em>before</em> it sees the server's greeting. So this is a manual workaround only.
</p>
<h3><a name="config-ssh-bug-filter-kexinit"></a><a name="S4.27.7"></a>4.27.7 &#8216;Chokes on PuTTY's full <code>KEXINIT</code>&#8217;</h3>
<p>
At the start of an SSH connection, the client and server exchange long messages of type <code>SSH_MSG_KEXINIT</code>, containing lists of all the cryptographic algorithms they're prepared to use. This is used to negotiate a set of algorithms that both ends can speak.
</p>
<p>
Occasionally, a badly written server might have a length limit on the list it's prepared to receive, and refuse to make a connection simply because PuTTY is giving it too many choices.
</p>
<p>
A workaround is to enable this flag, which will make PuTTY wait to send <code>KEXINIT</code> until after it receives the one from the server, and then filter its own <code>KEXINIT</code> to leave out any algorithm the server doesn't also announce support for. This will generally make PuTTY's <code>KEXINIT</code> at most the size of the server's, and will otherwise make no difference to the algorithm negotiation.
</p>
<p>
This flag is a minor violation of the SSH protocol, because both sides are supposed to send <code>KEXINIT</code> proactively. It still works provided <em>one</em> side sends its <code>KEXINIT</code> without waiting, but if both client and server waited for the other one to speak first, the connection would deadlock. We don't know of any servers that do this, but if there is one, then this flag will make PuTTY unable to speak to them at all.
</p>
<h3><a name="config-ssh-bug-rsa-sha2-cert-userauth"></a><a name="S4.27.8"></a>4.27.8 &#8216;Old RSA/SHA2 cert algorithm naming&#8217;</h3>
<p>
If PuTTY is trying to do SSH-2 user authentication using an RSA key, and the server is using one of the newer SHA-2 based versions of the SSH RSA protocol, and the user's key is also a certificate, then earlier versions of OpenSSH (up to 7.7) disagree with later versions about the right key algorithm string to send in the <code>SSH2_MSG_USERAUTH_REQUEST</code> packet. Modern versions send a string that indicates both the SHA-2 nature and the certificate nature of the key, such as &#8216;<code>rsa-sha2-512-cert-v01@openssh.com</code>&#8217;. Earlier versions would reject that, and insist on seeing &#8216;<code>ssh-rsa-cert-v01@openssh.com</code>&#8217; followed by a SHA-2 based signature.
</p>
<p>
PuTTY should auto-detect the presence of this bug in earlier OpenSSH and adjust to send the right string.
</p>
<h3><a name="config-ssh-bug-sig"></a><a name="S4.27.9"></a>4.27.9 &#8216;Requires padding on SSH-2 <a name="i420"></a>RSA <a name="i421"></a>signatures&#8217;</h3>
<p>
Versions below 3.3 of <a name="i422"></a>OpenSSH require SSH-2 RSA signatures to be padded with zero bytes to the same length as the RSA key modulus. The SSH-2 specification says that an unpadded signature MUST be accepted, so this is a bug. A typical symptom of this problem is that PuTTY mysteriously fails RSA authentication once in every few hundred attempts, and falls back to passwords.
</p>
<p>
If this bug is detected, PuTTY will pad its signatures in the way OpenSSH expects. If this bug is enabled when talking to a correct server, it is likely that no damage will be done, since correct servers usually still accept padded signatures because they're used to talking to OpenSSH.
</p>
<p>
This is an SSH-2-specific bug.
</p>
<h3><a name="config-ssh-bug-oldgex2"></a><a name="S4.27.10"></a>4.27.10 &#8216;Only supports pre-RFC4419 SSH-2 DH GEX&#8217;</h3>
<p>
The SSH key exchange method that uses Diffie-Hellman group exchange was redesigned after its original release, to use a slightly more sophisticated setup message. Almost all SSH implementations switched over to the new version. (PuTTY was one of the last.) A few old servers still only support the old one.
</p>
<p>
If this bug is detected, and the client and server negotiate Diffie-Hellman group exchange, then PuTTY will send the old message now known as <code>SSH2_MSG_KEX_DH_GEX_REQUEST_OLD</code> in place of the new <code>SSH2_MSG_KEX_DH_GEX_REQUEST</code>.
</p>
<p>
This is an SSH-2-specific bug.
</p>
<h3><a name="config-ssh-bug-hmac2"></a><a name="S4.27.11"></a>4.27.11 &#8216;Miscomputes SSH-2 HMAC keys&#8217;</h3>
<p>
Versions 2.3.0 and below of the SSH server software from <code>ssh.com</code> compute the keys for their <a name="i423"></a>HMAC <a name="i424"></a>message authentication codes incorrectly. A typical symptom of this problem is that PuTTY dies unexpectedly at the beginning of the session, saying &#8216;Incorrect MAC received on packet&#8217;.
</p>
<p>
If this bug is detected, PuTTY will compute its HMAC keys in the same way as the buggy server, so that communication will still be possible. If this bug is enabled when talking to a correct server, communication will fail.
</p>
<p>
This is an SSH-2-specific bug.
</p>
<h3><a name="config-ssh-bug-pksessid2"></a><a name="S4.27.12"></a>4.27.12 &#8216;Misuses the <a name="i425"></a>session ID in SSH-2 PK auth&#8217;</h3>
<p>
Versions below 2.3 of <a name="i426"></a>OpenSSH require SSH-2 <a name="i427"></a>public-key authentication to be done slightly differently: the data to be signed by the client contains the session ID formatted in a different way. If public-key authentication mysteriously does not work but the Event Log (see <a href="Chapter3.html#using-eventlog">section 3.1.3.1</a>) thinks it has successfully sent a signature, it might be worth enabling the workaround for this bug to see if it helps.
</p>
<p>
If this bug is detected, PuTTY will sign data in the way OpenSSH expects. If this bug is enabled when talking to a correct server, SSH-2 public-key authentication will fail.
</p>
<p>
This is an SSH-2-specific bug.
</p>
<h3><a name="config-ssh-bug-derivekey2"></a><a name="S4.27.13"></a>4.27.13 &#8216;Miscomputes SSH-2 <a name="i428"></a>encryption keys&#8217;</h3>
<p>
Versions below 2.0.11 of the SSH server software from <a name="i429"></a><code>ssh.com</code> compute the keys for the session encryption incorrectly. This problem can cause various error messages, such as &#8216;Incoming packet was garbled on decryption&#8217;, or possibly even &#8216;Out of memory&#8217;.
</p>
<p>
If this bug is detected, PuTTY will compute its encryption keys in the same way as the buggy server, so that communication will still be possible. If this bug is enabled when talking to a correct server, communication will fail.
</p>
<p>
This is an SSH-2-specific bug.
</p>
<h3><a name="config-ssh-bug-ignore1"></a><a name="S4.27.14"></a>4.27.14 &#8216;Chokes on SSH-1 <a name="i430"></a>ignore messages&#8217;</h3>
<p>
An ignore message (SSH_MSG_IGNORE) is a message in the SSH protocol which can be sent from the client to the server, or from the server to the client, at any time. Either side is required to ignore the message whenever it receives it. PuTTY uses ignore messages to <a name="i431"></a>hide the password packet in SSH-1, so that a listener cannot tell the length of the user's password; it also uses ignore messages for connection <a name="i432"></a>keepalives (see <a href="#config-keepalive">section 4.14.1</a>).
</p>
<p>
If this bug is detected, PuTTY will stop using ignore messages. This means that keepalives will stop working, and PuTTY will have to fall back to a secondary defence against SSH-1 password-length eavesdropping. See <a href="#config-ssh-bug-plainpw1">section 4.27.15</a>. If this bug is enabled when talking to a correct server, the session will succeed, but keepalives will not work and the session might be more vulnerable to eavesdroppers than it could be.
</p>
<h3><a name="config-ssh-bug-plainpw1"></a><a name="S4.27.15"></a>4.27.15 &#8216;Refuses all SSH-1 <a name="i433"></a>password camouflage&#8217;</h3>
<p>
When talking to an SSH-1 server which cannot deal with ignore messages (see <a href="#config-ssh-bug-ignore1">section 4.27.14</a>), PuTTY will attempt to disguise the length of the user's password by sending additional padding <em>within</em> the password packet. This is technically a violation of the SSH-1 specification, and so PuTTY will only do it when it cannot use standards-compliant ignore messages as camouflage. In this sense, for a server to refuse to accept a padded password packet is not really a bug, but it does make life inconvenient if the server can also not handle ignore messages.
</p>
<p>
If this &#8216;bug&#8217; is detected, PuTTY will assume that neither ignore messages nor padding are acceptable, and that it thus has no choice but to send the user's password with no form of camouflage, so that an eavesdropping user will be easily able to find out the exact length of the password. If this bug is enabled when talking to a correct server, the session will succeed, but will be more vulnerable to eavesdroppers than it could be.
</p>
<p>
This is an SSH-1-specific bug. SSH-2 is secure against this type of attack.
</p>
<h3><a name="config-ssh-bug-rsa1"></a><a name="S4.27.16"></a>4.27.16 &#8216;Chokes on SSH-1 <a name="i434"></a>RSA authentication&#8217;</h3>
<p>
Some SSH-1 servers cannot deal with RSA authentication messages at all. If <a name="i435"></a>Pageant is running and contains any SSH-1 keys, PuTTY will normally automatically try RSA authentication before falling back to passwords, so these servers will crash when they see the RSA attempt.
</p>
<p>
If this bug is detected, PuTTY will go straight to password authentication. If this bug is enabled when talking to a correct server, the session will succeed, but of course RSA authentication will be impossible.
</p>
<p>
This is an SSH-1-specific bug.
</p>
<h2><a name="config-psusan"></a><a name="S4.28"></a>4.28 The &#8216;Bare <a name="i436"></a><code>ssh-connection</code>&#8217; protocol</h2>
<p>
In addition to SSH itself, PuTTY also supports a second protocol that is derived from SSH. It's listed in the PuTTY GUI under the name &#8216;Bare <code>ssh-connection</code>&#8217;.
</p>
<p>
This protocol consists of just the innermost of SSH-2's three layers: it leaves out the cryptography layer providing network security, and it leaves out the authentication layer where you provide a username and prove you're allowed to log in as that user.
</p>
<p>
It is therefore <strong>completely unsuited to any network connection</strong>. Don't try to use it over a network!
</p>
<p>
The purpose of this protocol is for various specialist circumstances in which the &#8216;connection&#8217; is not over a real network, but is a pipe or IPC channel between different processes running on the <em>same</em> computer. In these contexts, the operating system will already have guaranteed that each of the two communicating processes is owned by the expected user (so that no authentication is necessary), and that the communications channel cannot be tapped by a hostile user on the same machine (so that no cryptography is necessary either). Examples of possible uses involve communicating with a strongly separated context such as the inside of a container, or a VM, or a different network namespace.
</p>
<p>
Explicit support for this protocol is new in PuTTY 0.75. As of 2021-04, the only known server for the bare <code>ssh-connection</code> protocol is the Unix program &#8216;<a name="i437"></a><code>psusan</code>&#8217; that is also part of the PuTTY tool suite.
</p>
<p>
(However, this protocol is also the same one used between instances of PuTTY to implement connection sharing: see <a href="#config-ssh-sharing">section 4.17.5</a>. In fact, in the Unix version of PuTTY, when a sharing upstream records &#8216;Sharing this connection at [pathname]&#8217; in the Event Log, it's possible to connect another instance of PuTTY directly to that Unix socket, by entering its pathname in the host name box and selecting &#8216;Bare <code>ssh-connection</code>&#8217; as the protocol!)
</p>
<p>
Many of the options under the SSH panel also affect this protocol, although options to do with cryptography and authentication do not, for obvious reasons.
</p>
<p>
I repeat, <strong>DON'T TRY TO USE THIS PROTOCOL FOR NETWORK CONNECTIONS!</strong> That's not what it's for, and it's not at all safe to do it.
</p>
<h2><a name="config-serial"></a><a name="S4.29"></a>4.29 The Serial panel</h2>
<p>
The <a name="i438"></a>Serial panel allows you to configure options that only apply when PuTTY is connecting to a local <a name="i439"></a><a name="i440"></a>serial line.
</p>
<h3><a name="config-serial-line"></a><a name="S4.29.1"></a>4.29.1 Selecting a serial line to connect to</h3>
<p>
The &#8216;Serial line to connect to&#8217; box allows you to choose which serial line you want PuTTY to talk to, if your computer has more than one serial port.
</p>
<p>
On Windows, the first serial line is called <a name="i441"></a><code>COM1</code>, and if there is a second it is called <code>COM2</code>, and so on.
</p>
<p>
This configuration setting is also visible on the Session panel, where it replaces the &#8216;Host Name&#8217; box (see <a href="#config-hostname">section 4.1.1</a>) if the connection type is set to &#8216;Serial&#8217;.
</p>
<h3><a name="config-serial-speed"></a><a name="S4.29.2"></a>4.29.2 Selecting the speed of your serial line</h3>
<p>
The &#8216;Speed&#8217; box allows you to choose the speed (or &#8216;baud rate&#8217;) at which to talk to the serial line. Typical values might be 9600, 19200, 38400 or 57600. Which one you need will depend on the device at the other end of the serial cable; consult the manual for that device if you are in doubt.
</p>
<p>
This configuration setting is also visible on the Session panel, where it replaces the &#8216;Port&#8217; box (see <a href="#config-hostname">section 4.1.1</a>) if the connection type is set to &#8216;Serial&#8217;.
</p>
<h3><a name="config-serial-databits"></a><a name="S4.29.3"></a>4.29.3 Selecting the number of data bits</h3>
<p>
The &#8216;Data bits&#8217; box allows you to choose how many data bits are transmitted in each byte sent or received through the serial line. Typical values are 7 or 8.
</p>
<h3><a name="config-serial-stopbits"></a><a name="S4.29.4"></a>4.29.4 Selecting the number of stop bits</h3>
<p>
The &#8216;Stop bits&#8217; box allows you to choose how many stop bits are used in the serial line protocol. Typical values are 1, 1.5 or 2.
</p>
<h3><a name="config-serial-parity"></a><a name="S4.29.5"></a>4.29.5 Selecting the serial parity checking scheme</h3>
<p>
The &#8216;Parity&#8217; box allows you to choose what type of parity checking is used on the serial line. The settings are:
</p>
<ul><li>
&#8216;None&#8217;: no parity bit is sent at all.
</li>
<li>
&#8216;Odd&#8217;: an extra parity bit is sent alongside each byte, and arranged so that the total number of 1 bits is odd.
</li>
<li>
&#8216;Even&#8217;: an extra parity bit is sent alongside each byte, and arranged so that the total number of 1 bits is even.
</li>
<li>
&#8216;Mark&#8217;: an extra parity bit is sent alongside each byte, and always set to 1.
</li>
<li>
&#8216;Space&#8217;: an extra parity bit is sent alongside each byte, and always set to 0.
</li>
</ul>
<h3><a name="config-serial-flow"></a><a name="S4.29.6"></a>4.29.6 Selecting the serial flow control scheme</h3>
<p>
The &#8216;Flow control&#8217; box allows you to choose what type of flow control checking is used on the serial line. The settings are:
</p>
<ul><li>
&#8216;None&#8217;: no flow control is done. Data may be lost if either side attempts to send faster than the serial line permits.
</li>
<li>
&#8216;XON/XOFF&#8217;: flow control is done by sending XON and XOFF characters within the data stream.
</li>
<li>
&#8216;RTS/CTS&#8217;: flow control is done using the RTS and CTS wires on the serial line.
</li>
<li>
&#8216;DSR/DTR&#8217;: flow control is done using the DSR and DTR wires on the serial line.
</li>
</ul>
<h2><a name="config-telnet"></a><a name="S4.30"></a>4.30 The <a name="i442"></a>Telnet panel</h2>
<p>
The Telnet panel allows you to configure options that only apply to Telnet sessions.
</p>
<h3><a name="config-oldenviron"></a><a name="S4.30.1"></a>4.30.1 &#8216;Handling of OLD_ENVIRON ambiguity&#8217;</h3>
<p>
The original Telnet mechanism for passing <a name="i443"></a>environment variables was badly specified. At the time the standard (RFC 1408) was written, BSD telnet implementations were already supporting the feature, and the intention of the standard was to describe the behaviour the BSD implementations were already using.
</p>
<p>
Sadly there was a typing error in the standard when it was issued, and two vital function codes were specified the wrong way round. BSD implementations did not change, and the standard was not corrected. Therefore, it's possible you might find either <a name="i444"></a>BSD or <a name="i445"></a>RFC-compliant implementations out there. This switch allows you to choose which one PuTTY claims to be.
</p>
<p>
The problem was solved by issuing a second standard, defining a new Telnet mechanism called <a name="i446"></a><code>NEW_ENVIRON</code>, which behaved exactly like the original <a name="i447"></a><code>OLD_ENVIRON</code> but was not encumbered by existing implementations. Most Telnet servers now support this, and it's unambiguous. This feature should only be needed if you have trouble passing environment variables to quite an old server.
</p>
<h3><a name="config-ptelnet"></a><a name="S4.30.2"></a>4.30.2 Passive and active <a name="i448"></a>Telnet negotiation modes</h3>
<p>
In a Telnet connection, there are two types of data passed between the client and the server: actual text, and <em>negotiations</em> about which Telnet extra features to use.
</p>
<p>
PuTTY can use two different strategies for negotiation:
</p>
<ul><li>
In <a name="i449"></a><em>active</em> mode, PuTTY starts to send negotiations as soon as the connection is opened.
</li>
<li>
In <a name="i450"></a><em>passive</em> mode, PuTTY will wait to negotiate until it sees a negotiation from the server.
</li>
</ul>
<p>
The obvious disadvantage of passive mode is that if the server is also operating in a passive mode, then negotiation will never begin at all. For this reason PuTTY defaults to active mode.
</p>
<p>
However, sometimes passive mode is required in order to successfully get through certain types of firewall and <a name="i451"></a>Telnet proxy server. If you have confusing trouble with a <a name="i452"></a>firewall, you could try enabling passive mode to see if it helps.
</p>
<h3><a name="config-telnetkey"></a><a name="S4.30.3"></a>4.30.3 &#8216;Keyboard sends <a name="i453"></a>Telnet special commands&#8217;</h3>
<p>
If this box is checked, several key sequences will have their normal actions modified:
</p>
<ul><li>
the Backspace key on the keyboard will send the <a name="i454"></a>Telnet special backspace code;
</li>
<li>
Control-C will send the Telnet special <a name="i455"></a>Interrupt Process code;
</li>
<li>
Control-Z will send the Telnet special <a name="i456"></a>Suspend Process code.
</li>
</ul>
<p>
You probably shouldn't enable this unless you know what you're doing.
</p>
<h3><a name="config-telnetnl"></a><a name="S4.30.4"></a>4.30.4 &#8216;Return key sends <a name="i457"></a>Telnet New Line instead of ^M&#8217;</h3>
<p>
Unlike most other remote login protocols, the Telnet protocol has a special &#8216;<a name="i458"></a>new line&#8217; code that is not the same as the usual line endings of Control-M or Control-J. By default, PuTTY sends the Telnet New Line code when you press Return, instead of sending Control-M as it does in most other protocols.
</p>
<p>
Most Unix-style Telnet servers don't mind whether they receive Telnet New Line or Control-M; some servers do expect New Line, and some servers prefer to see ^M. If you are seeing surprising behaviour when you press Return in a Telnet session, you might try turning this option off to see if it helps.
</p>
<h2><a name="config-rlogin"></a><a name="S4.31"></a>4.31 The Rlogin panel</h2>
<p>
The <a name="i459"></a>Rlogin panel allows you to configure options that only apply to Rlogin sessions.
</p>
<h3><a name="config-rlogin-localuser"></a><a name="S4.31.1"></a>4.31.1 <a name="i460"></a>&#8216;Local username&#8217;</h3>
<p>
Rlogin allows an automated (password-free) form of login by means of a file called <a name="i461"></a><code>.rhosts</code> on the server. You put a line in your <code>.rhosts</code> file saying something like <code>jbloggs@pc1.example.com</code>, and then when you make an Rlogin connection the client transmits the username of the user running the Rlogin client. The server checks the username and hostname against <code>.rhosts</code>, and if they match it <a name="i462"></a>does not ask for a password.
</p>
<p>
This only works because Unix systems contain a safeguard to stop a user from pretending to be another user in an Rlogin connection. Rlogin connections have to come from <a name="i463"></a>port numbers below 1024, and Unix systems prohibit this to unprivileged processes; so when the server sees a connection from a low-numbered port, it assumes the client end of the connection is held by a privileged (and therefore trusted) process, so it believes the claim of who the user is.
</p>
<p>
Windows does not have this restriction: <em>any</em> user can initiate an outgoing connection from a low-numbered port. Hence, the Rlogin <code>.rhosts</code> mechanism is completely useless for securely distinguishing several different users on a Windows machine. If you have a <code>.rhosts</code> entry pointing at a Windows PC, you should assume that <em>anyone</em> using that PC can <a name="i464"></a>spoof your username in an Rlogin connection and access your account on the server.
</p>
<p>
The &#8216;Local username&#8217; control allows you to specify what user name PuTTY should claim you have, in case it doesn't match your <a name="i465"></a>Windows user name (or in case you didn't bother to set up a Windows user name).
</p>
<h2><a name="config-supdup"></a><a name="S4.32"></a>4.32 The <a name="i466"></a>SUPDUP panel</h2>
<p>
The SUPDUP panel allows you to configure options that only apply to SUPDUP sessions. See <a href="Chapter3.html#using-supdup">section 3.10</a> for more about the SUPDUP protocol.
</p>
<h3><a name="supdup-location"></a><a name="S4.32.1"></a>4.32.1 &#8216;Location string&#8217;</h3>
<p>
In SUPDUP, the client sends a piece of text of its choice to the server giving the user's location. This is typically displayed in lists of logged-in users.
</p>
<p>
By default, PuTTY just defaults this to "The Internet". If you want your location to show up as something more specific, you can configure it here.
</p>
<h3><a name="supdup-ascii"></a><a name="S4.32.2"></a>4.32.2 &#8216;Extended ASCII Character set&#8217;</h3>
<p>
This declares what kind of character set extension your terminal supports. If the server supports it, it will send text using that character set. &#8216;None&#8217; means the standard 95 printable ASCII characters. &#8216;ITS&#8217; means ASCII extended with printable characters in the control character range. This character set is documented in the SUPDUP protocol definition. &#8216;WAITS&#8217; is similar to &#8216;ITS&#8217; but uses some alternative characters in the extended set: most prominently, it will display arrows instead of <code>^</code> and <code>_</code>, and <code>}</code> instead of <code>~</code>. &#8216;ITS&#8217; extended ASCII is used by ITS and Lisp machines, whilst &#8216;WAITS&#8217; is only used by the WAITS operating system from the Stanford AI Laboratory.
</p>
<h3><a name="supdup-more"></a><a name="S4.32.3"></a>4.32.3 &#8216;**MORE** processing&#8217;</h3>
<p>
When **MORE** processing is enabled, the server causes output to pause at the bottom of the screen, until a space is typed.
</p>
<h3><a name="supdup-scroll"></a><a name="S4.32.4"></a>4.32.4 &#8216;Terminal scrolling&#8217;</h3>
<p>
This controls whether the terminal will perform scrolling when the cursor goes below the last line, or if the cursor will return to the first line.
</p>
<h2><a name="config-file"></a><a name="S4.33"></a>4.33 <a name="i467"></a>Storing configuration in a file</h2>
<p>
PuTTY does not currently support storing its configuration in a file instead of the <a name="i468"></a>Registry. However, you can work around this with a couple of <a name="i469"></a>batch files.
</p>
<p>
You will need a file called (say) <code>PUTTY.BAT</code> which imports the contents of a file into the Registry, then runs PuTTY, exports the contents of the Registry back into the file, and deletes the Registry entries. This can all be done using the Regedit command line options, so it's all automatic. Here is what you need in <code>PUTTY.BAT</code>:
</p>
<pre><code>@ECHO OFF
regedit /s putty.reg
regedit /s puttyrnd.reg
start /w putty.exe
regedit /ea new.reg HKEY_CURRENT_USER\Software\SimonTatham\PuTTY
copy new.reg putty.reg
del new.reg
regedit /s puttydel.reg
</code></pre>
<p>
This batch file needs two auxiliary files: <code>PUTTYRND.REG</code> which sets up an initial safe location for the <code>PUTTY.RND</code> random seed file, and <code>PUTTYDEL.REG</code> which destroys everything in the Registry once it's been successfully saved back to the file.
</p>
<p>
Here is <code>PUTTYDEL.REG</code>:
</p>
<pre><code>REGEDIT4

[-HKEY_CURRENT_USER\Software\SimonTatham\PuTTY]
</code></pre>
<p>
Here is an example <code>PUTTYRND.REG</code> file:
</p>
<pre><code>REGEDIT4

[HKEY_CURRENT_USER\Software\SimonTatham\PuTTY]
"RandSeedFile"="a:\\putty.rnd"
</code></pre>
<p>
You should replace <code>a:\putty.rnd</code> with the location where you want to store your random number data. If the aim is to carry around PuTTY and its settings on one USB stick, you probably want to store it on the USB stick.
</p>

<hr><p>If you want to provide feedback on this manual or on the PuTTY tools themselves, see the <a href="https://www.chiark.greenend.org.uk/~sgtatham/putty/feedback.html">Feedback page</a>.</p><address>
[PuTTY release 0.83]</address></body>
</html>