puttydoc.txt 618 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881
  1. PuTTY User Manual
  2. =================
  3. PuTTY is a free (MIT-licensed) Windows Telnet and SSH client. This manual
  4. documents PuTTY, and its companion utilities PSCP, PSFTP, Plink, Pageant
  5. and PuTTYgen.
  6. _Note to Unix users:_ this manual currently primarily documents the Windows
  7. versions of the PuTTY utilities. Some options are therefore mentioned
  8. that are absent from the Unix version; the Unix version has features
  9. not described here; and the pterm and command-line puttygen and pageant
  10. utilities are not described at all. The only Unix-specific documentation
  11. that currently exists is the man pages.
  12. This manual is copyright 1997-2025 Simon Tatham. All rights reserved. You
  13. may distribute this documentation under the MIT licence. See appendix D for
  14. the licence text in full.
  15. Chapter 1: Introduction to PuTTY
  16. --------------------------------
  17. PuTTY is a free SSH, Telnet, Rlogin, and SUPDUP client for Windows
  18. systems.
  19. 1.1 What are SSH, Telnet, Rlogin, and SUPDUP?
  20. If you already know what SSH, Telnet, Rlogin, and SUPDUP are, you
  21. can safely skip on to the next section.
  22. SSH, Telnet, Rlogin, and SUPDUP are four ways of doing the same
  23. thing: logging in to a multi-user computer from another computer,
  24. over a network.
  25. Multi-user operating systems, typically of the Unix family (such
  26. as Linux, MacOS, and the BSD family), usually present a command-
  27. line interface to the user, much like the `Command Prompt' or `MS-
  28. DOS Prompt' in Windows. The system prints a prompt, and you type
  29. commands which the system will obey.
  30. Using this type of interface, there is no need for you to be sitting
  31. at the same machine you are typing commands to. The commands,
  32. and responses, can be sent over a network, so you can sit at one
  33. computer and give commands to another one, or even to more than one.
  34. SSH, Telnet, Rlogin, and SUPDUP are _network protocols_ that allow
  35. you to do this. On the computer you sit at, you run a _client_,
  36. which makes a network connection to the other computer (the
  37. _server_). The network connection carries your keystrokes and
  38. commands from the client to the server, and carries the server's
  39. responses back to you.
  40. These protocols can also be used for other types of keyboard-based
  41. interactive session. In particular, there are a lot of bulletin
  42. boards, talker systems and MUDs (Multi-User Dungeons) which support
  43. access using Telnet. There are even a few that support SSH.
  44. You might want to use SSH, Telnet, Rlogin, or SUPDUP if:
  45. - you have an account on a Unix system (or some other multi-user
  46. OS such as VMS or ITS) which you want to be able to access from
  47. somewhere else
  48. - your Internet Service Provider provides you with a login account
  49. on a web server. (This might also be known as a _shell account_.
  50. A _shell_ is the program that runs on the server and interprets
  51. your commands for you.)
  52. - you want to use a bulletin board system, talker or MUD which can
  53. be accessed using Telnet.
  54. You probably do _not_ want to use SSH, Telnet, Rlogin, or SUPDUP if:
  55. - you only use Windows. Windows computers have their own ways
  56. of networking between themselves, and unless you are doing
  57. something fairly unusual, you will not need to use any of these
  58. remote login protocols.
  59. 1.2 How do SSH, Telnet, Rlogin, and SUPDUP differ?
  60. This list summarises some of the differences between SSH, Telnet,
  61. Rlogin, and SUPDUP.
  62. - SSH (which stands for `secure shell') is a recently designed,
  63. high-security protocol. It uses strong cryptography to protect
  64. your connection against eavesdropping, hijacking and other
  65. attacks. Telnet, Rlogin, and SUPDUP are all older protocols
  66. offering minimal security.
  67. - SSH and Rlogin both allow you to log in to the server without
  68. having to type a password. (Rlogin's method of doing this is
  69. insecure, and can allow an attacker to access your account on
  70. the server. SSH's method is much more secure, and typically
  71. breaking the security requires the attacker to have gained
  72. access to your actual client machine.)
  73. - SSH allows you to connect to the server and automatically send
  74. a command, so that the server will run that command and then
  75. disconnect. So you can use it in automated processing.
  76. The Internet is a hostile environment and security is everybody's
  77. responsibility. If you are connecting across the open Internet,
  78. then we recommend you use SSH. If the server you want to connect
  79. to doesn't support SSH, it might be worth trying to persuade the
  80. administrator to install it.
  81. If your client and server are both behind the same (good) firewall,
  82. it is more likely to be safe to use Telnet, Rlogin, or SUPDUP, but
  83. we still recommend you use SSH.
  84. Chapter 2: Getting started with PuTTY
  85. -------------------------------------
  86. This chapter gives a quick guide to the simplest types of
  87. interactive login session using PuTTY.
  88. 2.1 Starting a session
  89. When you start PuTTY, you will see a dialog box. This dialog box
  90. allows you to control everything PuTTY can do. See chapter 4 for
  91. details of all the things you can control.
  92. You don't usually need to change most of the configuration options.
  93. To start the simplest kind of session, all you need to do is to
  94. enter a few basic parameters.
  95. In the `Host Name' box, enter the Internet host name of the server
  96. you want to connect to. You should have been told this by the
  97. provider of your login account.
  98. Now select a login protocol to use, from the `Connection type'
  99. controls. For a login session, you should select SSH, Telnet,
  100. Rlogin, or SUPDUP. See section 1.2 for a description of the
  101. differences between these protocols, and advice on which one to use.
  102. The _Raw_ protocol is not used for interactive login sessions; you
  103. would usually use this for debugging other Internet services (see
  104. section 3.7). The _Serial_ option is used for connecting to a local
  105. serial line, and works somewhat differently: see section 3.6 for
  106. more information on this.
  107. When you change the selected protocol, the number in the `Port'
  108. box will change. This is normal: it happens because the various
  109. login services are usually provided on different network ports
  110. by the server machine. Most servers will use the standard port
  111. numbers, so you will not need to change the port setting. If your
  112. server provides login services on a non-standard port, your system
  113. administrator should have told you which one. (For example, many
  114. MUDs run Telnet service on a port other than 23.)
  115. Once you have filled in the `Host Name', `Connection type', and
  116. possibly `Port' settings, you are ready to connect. Press the `Open'
  117. button at the bottom of the dialog box, and PuTTY will begin trying
  118. to connect you to the server.
  119. 2.2 Verifying the host key (SSH only)
  120. If you are not using the SSH protocol, you can skip this section.
  121. If you are using SSH to connect to a server for the first time, you
  122. will probably see a message looking something like this:
  123. The host key is not cached for this server:
  124. ssh.example.com (port 22)
  125. You have no guarantee that the server is the computer you think it is.
  126. The server's ssh-ed25519 key fingerprint is:
  127. ssh-ed25519 255 SHA256:TddlQk20DVs4LRcAsIfDN9pInKpY06D+h4kSHwWAj4w
  128. If you trust this host, press "Accept" to add the key to PuTTY's
  129. cache and carry on connecting.
  130. If you want to carry on connecting just once, without adding the key
  131. to the cache, press "Connect Once".
  132. If you do not trust this host, press "Cancel" to abandon the connection.
  133. This is a feature of the SSH protocol. It is designed to protect you
  134. against a network attack known as _spoofing_: secretly redirecting
  135. your connection to a different computer, so that you send your
  136. password to the wrong machine. Using this technique, an attacker
  137. would be able to learn the password that guards your login account,
  138. and could then log in as if they were you and use the account for
  139. their own purposes.
  140. To prevent this attack, each server has a unique identifying code,
  141. called a _host key_. These keys are created in a way that prevents
  142. one server from forging another server's key. So if you connect to a
  143. server and it sends you a different host key from the one you were
  144. expecting, PuTTY can warn you that the server may have been switched
  145. and that a spoofing attack might be in progress.
  146. PuTTY records the host key for each server you connect to, in the
  147. Windows Registry. Every time you connect to a server, it checks that
  148. the host key presented by the server is the same host key as it was
  149. the last time you connected. If it is not, you will see a stronger
  150. warning, and you will have the chance to abandon your connection
  151. before you type any private information (such as a password) into
  152. it. (See section 10.2 for what that looks like.)
  153. However, when you connect to a server you have not connected to
  154. before, PuTTY has no way of telling whether the host key is the
  155. right one or not. So it gives the warning shown above, and asks you
  156. whether you want to trust this host key or not.
  157. Whether or not to trust the host key is your choice. If you are
  158. connecting within a company network, you might feel that all
  159. the network users are on the same side and spoofing attacks are
  160. unlikely, so you might choose to trust the key without checking
  161. it. If you are connecting across a hostile network (such as the
  162. Internet), you should check with your system administrator, perhaps
  163. by telephone or in person. (When verifying the fingerprint, be
  164. careful with letters and numbers that can be confused with each
  165. other: `0'/`O', `1'/`I'/`l', and so on.)
  166. Many servers have more than one host key. If the system
  167. administrator sends you more than one fingerprint, you should make
  168. sure the one PuTTY shows you is on the list, but it doesn't matter
  169. which one it is.
  170. If you don't have any fingerprints that look like the example
  171. (`SHA256:' followed by a long string of characters), but instead
  172. have pairs of characters separated by colons like `a4:db:96:a7:...',
  173. try pressing the `More info...' button and see if you have a
  174. fingerprint matching the `MD5 fingerprint' there. This is an older
  175. and less secure way to summarise the same underlying host key; it's
  176. possible for an attacker to create their own host key with the same
  177. fingerprint; so you should avoid relying on this fingerprint format
  178. unless you have no choice. The `More info...' dialog box also shows
  179. the full host public key, in case that is easier to compare than a
  180. fingerprint.
  181. See section 4.19 for advanced options for managing host keys.
  182. 2.3 Logging in
  183. After you have connected, and perhaps verified the server's host
  184. key, you will be asked to log in, probably using a username and a
  185. password. Your system administrator should have provided you with
  186. these. (If, instead, your system administrator has asked you to
  187. provide, or provided you with, a `public key' or `key file', see
  188. chapter 8.)
  189. PuTTY will display a text window (the `terminal window' - it will
  190. have a black background unless you've changed the defaults), and
  191. prompt you to type your username and password into that window.
  192. (These prompts will include the PuTTY icon, to distinguish them from
  193. any text sent by the server in the same window.)
  194. Enter the username and the password, and the server should grant you
  195. access and begin your session. If you have mistyped your password,
  196. most servers will give you several chances to get it right.
  197. While you are typing your password, you will not usually see the
  198. cursor moving in the window, but PuTTY _is_ registering what you
  199. type, and will send it when you press Return. (It works this way to
  200. avoid revealing the length of your password to anyone watching your
  201. screen.)
  202. If you are using SSH, be careful not to type your username wrongly,
  203. because you will not have a chance to correct it after you press
  204. Return; many SSH servers do not permit you to make two login
  205. attempts using different usernames. If you type your username
  206. wrongly, you must close PuTTY and start again.
  207. If your password is refused but you are sure you have typed it
  208. correctly, check that Caps Lock is not enabled. Many login servers,
  209. particularly Unix computers, treat upper case and lower case as
  210. different when checking your password; so if Caps Lock is on, your
  211. password will probably be refused.
  212. 2.4 After logging in
  213. After you log in to the server, what happens next is up to the
  214. server! Most servers will print some sort of login message and then
  215. present a prompt, at which you can type commands which the server
  216. will carry out. Some servers will offer you on-line help; others
  217. might not. If you are in doubt about what to do next, consult your
  218. system administrator.
  219. 2.5 Logging out
  220. When you have finished your session, you should log out by typing
  221. the server's own logout command. This might vary between servers; if
  222. in doubt, try `logout' or `exit', or consult a manual or your system
  223. administrator. When the server processes your logout command, the
  224. PuTTY window should close itself automatically.
  225. You _can_ close a PuTTY session using the Close button in the window
  226. border, but this might confuse the server - a bit like hanging up a
  227. telephone unexpectedly in the middle of a conversation. We recommend
  228. you do not do this unless the server has stopped responding to you
  229. and you cannot close the window any other way.
  230. Chapter 3: Using PuTTY
  231. ----------------------
  232. This chapter provides a general introduction to some more advanced
  233. features of PuTTY. For extreme detail and reference purposes,
  234. chapter 4 is likely to contain more information.
  235. 3.1 During your session
  236. A lot of PuTTY's complexity and features are in the configuration
  237. panel. Once you have worked your way through that and started
  238. a session, things should be reasonably simple after that.
  239. Nevertheless, there are a few more useful features available.
  240. 3.1.1 Copying and pasting text
  241. Often in a PuTTY session you will find text on your terminal screen
  242. which you want to type in again. Like most other terminal emulators,
  243. PuTTY allows you to copy and paste the text rather than having to
  244. type it again. Also, copy and paste uses the Windows clipboard, so
  245. that you can paste (for example) URLs into a web browser, or paste
  246. from a word processor or spreadsheet into your terminal session.
  247. By default, PuTTY's copy and paste works entirely with the mouse.
  248. (This will be familiar to people who have used `xterm' on Unix.) In
  249. order to copy text to the clipboard, you just click the left mouse
  250. button in the terminal window, and drag to select text. When you
  251. let go of the button, the text is _automatically_ copied to the
  252. clipboard. You do not need to press Ctrl-C or Ctrl-Ins; in fact, if
  253. you do press Ctrl-C, PuTTY will send a Ctrl-C character down your
  254. session to the server where it will probably cause a process to be
  255. interrupted.
  256. Pasting into PuTTY is done using the right button (or the middle
  257. mouse button, if you have a three-button mouse and have set it up;
  258. see section 4.11.1). (Pressing Shift-Ins, or selecting `Paste' from
  259. the Ctrl+right-click context menu, have the same effect.) When you
  260. click the right mouse button, PuTTY will read whatever is in the
  261. Windows clipboard and paste it into your session. By default, this
  262. behaves _exactly_ as if the clipboard contents had been typed at
  263. the keyboard; therefore, be careful of pasting formatted text into
  264. an editor that does automatic indenting, as you may find that the
  265. spaces pasted from the clipboard plus the spaces added by the editor
  266. add up to too many spaces and ruin the formatting. (Some remote
  267. applications can ask PuTTY to identify text that is being pasted, to
  268. avoid this sort of problem; but if your application does not, there
  269. is nothing PuTTY can do to avoid this.)
  270. If you double-click the left mouse button, PuTTY will select a whole
  271. word. If you double-click, hold down the second click, and drag the
  272. mouse, PuTTY will select a sequence of whole words. (You can adjust
  273. precisely what PuTTY considers to be part of a word; see section
  274. 4.12.1.) If you _triple_-click, or triple-click and drag, then PuTTY
  275. will select a whole line or sequence of lines.
  276. If you want to select a rectangular region instead of selecting to
  277. the end of each line, you can do this by holding down Alt when you
  278. make your selection. You can also configure rectangular selection to
  279. be the default, and then holding down Alt gives the normal behaviour
  280. instead: see section 4.11.3 for details.
  281. (In some Unix environments, Alt+drag is intercepted by the window
  282. manager. Shift+Alt+drag should work for rectangular selection as
  283. well, so you could try that instead.)
  284. If you have a middle mouse button, then you can use it to adjust an
  285. existing selection if you selected something slightly wrong. (If you
  286. have configured the middle mouse button to paste, then the right
  287. mouse button does this instead.) Click the button on the screen,
  288. and you can pick up the nearest end of the selection and drag it to
  289. somewhere else.
  290. If you are running PuTTY itself on Unix (not just using it to
  291. connect to a Unix system from Windows), by default you will likely
  292. have to use similar mouse actions in other applications to paste the
  293. text you copied from PuTTY, and to copy text for pasting into PuTTY;
  294. actions like Ctrl-C and Ctrl-V will likely not behave as you expect.
  295. Section 4.11.4 explains why this is, and how you can change the
  296. behaviour. (On Windows there is only a single selection shared with
  297. other applications, so this confusion does not arise.)
  298. It's possible for the server to ask to handle mouse clicks in the
  299. PuTTY window itself. If this happens, the mouse pointer will turn
  300. into an arrow, and using the mouse to copy and paste will only work
  301. if you hold down Shift. See section 4.6.2 and section 4.11.2 for
  302. details of this feature and how to configure it.
  303. You can customise much of this behaviour, for instance to enable
  304. copy and paste from the keyboard; see section 4.11.
  305. 3.1.2 Scrolling the screen back
  306. PuTTY keeps track of text that has scrolled up off the top of the
  307. terminal. So if something appears on the screen that you want to
  308. read, but it scrolls too fast and it's gone by the time you try to
  309. look for it, you can use the scrollbar on the right side of the
  310. window to look back up the session history and find it again.
  311. As well as using the scrollbar, you can also page the scrollback up
  312. and down by pressing Shift-PgUp and Shift-PgDn. You can scroll a
  313. line at a time using Ctrl-PgUp and Ctrl-PgDn, or to the top/bottom
  314. of the scrollback with Ctrl-Shift-PgUp and Ctrl-Shift-PgDn. These
  315. are still available if you configure the scrollbar to be invisible.
  316. By default the last 2000 lines scrolled off the top are preserved
  317. for you to look at. You can increase (or decrease) this value using
  318. the configuration box; see section 4.7.3.
  319. 3.1.3 The System menu
  320. If you click the left mouse button on the icon in the top left
  321. corner of PuTTY's terminal window, or click the right mouse button
  322. on the title bar, you will see the standard Windows system menu
  323. containing items like Minimise, Move, Size and Close.
  324. PuTTY's system menu contains extra program features in addition
  325. to the Windows standard options. These extra menu commands are
  326. described below.
  327. (These options are also available in a context menu brought up by
  328. holding Ctrl and clicking with the right mouse button anywhere in
  329. the PuTTY window.)
  330. 3.1.3.1 The PuTTY Event Log
  331. If you choose `Event Log' from the system menu, a small window will
  332. pop up in which PuTTY logs significant events during the connection.
  333. Most of the events in the log will probably take place during
  334. session startup, but a few can occur at any point in the session,
  335. and one or two occur right at the end.
  336. You can use the mouse to select one or more lines of the Event Log,
  337. and hit the Copy button to copy them to the clipboard. If you are
  338. reporting a bug, it's often useful to paste the contents of the
  339. Event Log into your bug report.
  340. (The Event Log is not the same as the facility to create a log file
  341. of your session; that's described in section 3.2.)
  342. 3.1.3.2 Special commands
  343. Depending on the protocol used for the current session, there may
  344. be a submenu of `special commands'. These are protocol-specific
  345. tokens, such as a `break' signal, that can be sent down a connection
  346. in addition to normal data. Their precise effect is usually up to
  347. the server. Currently only Telnet, SSH, and serial connections have
  348. special commands.
  349. The `break' signal can also be invoked from the keyboard with Ctrl-
  350. Break.
  351. In an SSH connection, the following special commands are available:
  352. - IGNORE message
  353. Should have no effect.
  354. - Repeat key exchange
  355. Only available in SSH-2. Forces a repeat key exchange
  356. immediately (and resets associated timers and counters). For
  357. more information about repeat key exchanges, see section 4.18.2.
  358. - Cache new host key type
  359. Only available in SSH-2. This submenu appears only if the server
  360. has host keys of a type that PuTTY doesn't already have cached,
  361. and so won't consider. Selecting a key here will allow PuTTY
  362. to use that key now and in future: PuTTY will do a fresh key-
  363. exchange with the selected key, and immediately add that key to
  364. its permanent cache (relying on the host key used at the start
  365. of the connection to cross-certify the new key). That key will
  366. be used for the rest of the current session; it may not actually
  367. be used for future sessions, depending on your preferences (see
  368. section 4.19.1).
  369. Normally, PuTTY will carry on using a host key it already knows,
  370. even if the server offers key formats that PuTTY would otherwise
  371. prefer, to avoid host key prompts. As a result, if you've been
  372. using a server for some years, you may still be using an older
  373. key than a new user would use, due to server upgrades in the
  374. meantime. The SSH protocol unfortunately does not have organised
  375. facilities for host key migration and rollover, but this allows
  376. you to manually upgrade.
  377. - Break
  378. Only available in SSH-2, and only during a session. Optional
  379. extension; may not be supported by server. PuTTY requests the
  380. server's default break length.
  381. - Signals (SIGINT, SIGTERM etc)
  382. Only available in SSH-2, and only during a session. Sends
  383. various POSIX signals. Not honoured by all servers.
  384. The following special commands are available in Telnet:
  385. - Are You There
  386. - Break
  387. - Synch
  388. - Erase Character
  389. PuTTY can also be configured to send this when the Backspace key
  390. is pressed; see section 4.30.3.
  391. - Erase Line
  392. - Go Ahead
  393. - No Operation
  394. Should have no effect.
  395. - Abort Process
  396. - Abort Output
  397. - Interrupt Process
  398. PuTTY can also be configured to send this when Ctrl-C is typed;
  399. see section 4.30.3.
  400. - Suspend Process
  401. PuTTY can also be configured to send this when Ctrl-Z is typed;
  402. see section 4.30.3.
  403. - End Of Record
  404. - End Of File
  405. With a serial connection, the only available special command is
  406. `Break'.
  407. 3.1.3.3 Starting new sessions
  408. PuTTY's system menu provides some shortcut ways to start new
  409. sessions:
  410. - Selecting `New Session' will start a completely new instance of
  411. PuTTY, and bring up the configuration box as normal.
  412. - Selecting `Duplicate Session' will start a session in a new
  413. window with precisely the same options as your current one -
  414. connecting to the same host using the same protocol, with all
  415. the same terminal settings and everything.
  416. - In an inactive window, selecting `Restart Session' will do the
  417. same as `Duplicate Session', but in the current window.
  418. - The `Saved Sessions' submenu gives you quick access to any sets
  419. of stored session details you have previously saved. See section
  420. 4.1.2 for details of how to create saved sessions.
  421. 3.1.3.4 Changing your session settings
  422. If you select `Change Settings' from the system menu, PuTTY will
  423. display a cut-down version of its initial configuration box. This
  424. allows you to adjust most properties of your current session. You
  425. can change the terminal size, the font, the actions of various
  426. keypresses, the colours, and so on.
  427. Some of the options that are available in the main configuration box
  428. are not shown in the cut-down Change Settings box. These are usually
  429. options which don't make sense to change in the middle of a session
  430. (for example, you can't switch from SSH to Telnet in mid-session).
  431. You can save the current settings to a saved session for future use
  432. from this dialog box. See section 4.1.2 for more on saved sessions.
  433. 3.1.3.5 Copy All to Clipboard
  434. This system menu option provides a convenient way to copy the whole
  435. contents of the terminal screen (up to the last nonempty line) and
  436. scrollback to the clipboard in one go.
  437. 3.1.3.6 Clearing and resetting the terminal
  438. The `Clear Scrollback' option on the system menu tells PuTTY to
  439. discard all the lines of text that have been kept after they
  440. scrolled off the top of the screen. This might be useful, for
  441. example, if you displayed sensitive information and wanted to make
  442. sure nobody could look over your shoulder and see it. (Note that
  443. this only prevents a casual user from using the scrollbar to view
  444. the information; the text is not guaranteed not to still be in
  445. PuTTY's memory.)
  446. The `Reset Terminal' option causes a full reset of the terminal
  447. emulation. A VT-series terminal is a complex piece of software and
  448. can easily get into a state where all the text printed becomes
  449. unreadable. (This can happen, for example, if you accidentally
  450. output a binary file to your terminal.) If this happens, selecting
  451. Reset Terminal should sort it out.
  452. 3.1.3.7 Full screen mode
  453. If you find the title bar on a maximised window to be ugly or
  454. distracting, you can select Full Screen mode to maximise PuTTY `even
  455. more'. When you select this, PuTTY will expand to fill the whole
  456. screen and its borders, title bar and scrollbar will disappear. (You
  457. can configure the scrollbar not to disappear in full-screen mode if
  458. you want to keep it; see section 4.7.3.)
  459. When you are in full-screen mode, you can still access the system
  460. menu if you click the left mouse button in the _extreme_ top left
  461. corner of the screen.
  462. 3.2 Creating a log file of your session
  463. For some purposes you may find you want to log everything that
  464. appears on your screen. You can do this using the `Logging' panel in
  465. the configuration box.
  466. To begin a session log, select `Change Settings' from the system
  467. menu and go to the Logging panel. Enter a log file name, and select
  468. a logging mode. (You can log all session output including the
  469. terminal control sequences, or you can just log the printable text.
  470. It depends what you want the log for.) Click `Apply' and your log
  471. will be started. Later on, you can go back to the Logging panel and
  472. select `Logging turned off completely' to stop logging; then PuTTY
  473. will close the log file and you can safely read it.
  474. See section 4.2 for more details and options.
  475. 3.3 Altering your character set configuration
  476. If you find that special characters (accented characters, for
  477. example, or line-drawing characters) are not being displayed
  478. correctly in your PuTTY session, it may be that PuTTY is
  479. interpreting the characters sent by the server according to the
  480. wrong _character set_. There are a lot of different character sets
  481. available, and no good way for PuTTY to know which to use, so it's
  482. entirely possible for this to happen.
  483. If you click `Change Settings' and look at the `Translation' panel,
  484. you should see a large number of character sets which you can
  485. select, and other related options. Now all you need is to find out
  486. which of them you want! (See section 4.10 for more information.)
  487. 3.4 Using X11 forwarding in SSH
  488. The SSH protocol has the ability to securely forward X Window System
  489. graphical applications over your encrypted SSH connection, so that
  490. you can run an application on the SSH server machine and have it put
  491. its windows up on your local machine without sending any X network
  492. traffic in the clear.
  493. In order to use this feature, you will need an X display server
  494. for your Windows machine, such as Cygwin/X, X-Win32, or Exceed.
  495. This will probably install itself as display number 0 on your local
  496. machine; if it doesn't, the manual for the X server should tell you
  497. what it does do.
  498. You should then tick the `Enable X11 forwarding' box in the X11
  499. panel (see section 4.25) before starting your SSH session. The `X
  500. display location' box is blank by default, which means that PuTTY
  501. will try to use a sensible default such as `:0', which is the usual
  502. display location where your X server will be installed. If that
  503. needs changing, then change it.
  504. Now you should be able to log in to the SSH server as normal. To
  505. check that X forwarding has been successfully negotiated during
  506. connection startup, you can check the PuTTY Event Log (see section
  507. 3.1.3.1). It should say something like this:
  508. 2001-12-05 17:22:01 Requesting X11 forwarding
  509. 2001-12-05 17:22:02 X11 forwarding enabled
  510. If the remote system is Unix or Unix-like, you should also be able
  511. to see that the `DISPLAY' environment variable has been set to point
  512. at display 10 or above on the SSH server machine itself:
  513. fred@unixbox:~$ echo $DISPLAY
  514. unixbox:10.0
  515. If this works, you should then be able to run X applications in the
  516. remote session and have them display their windows on your PC.
  517. For more options relating to X11 forwarding, see section 4.25.
  518. 3.5 Using port forwarding in SSH
  519. The SSH protocol has the ability to forward arbitrary network
  520. (TCP) connections over your encrypted SSH connection, to avoid the
  521. network traffic being sent in clear. For example, you could use
  522. this to connect from your home computer to a POP-3 server on a
  523. remote machine without your POP-3 password being visible to network
  524. sniffers.
  525. In order to use port forwarding to connect from your local machine
  526. to a port on a remote server, you need to:
  527. - Choose a port number on your local machine where PuTTY should
  528. listen for incoming connections. There are likely to be plenty
  529. of unused port numbers above 3000. (You can also use a local
  530. loopback address here; see below for more details.)
  531. - Now, before you start your SSH connection, go to the Tunnels
  532. panel (see section 4.26). Make sure the `Local' radio button
  533. is set. Enter the local port number into the `Source port'
  534. box. Enter the destination host name and port number into
  535. the `Destination' box, separated by a colon (for example,
  536. `popserver.example.com:110' to connect to a POP-3 server).
  537. - Now click the `Add' button. The details of your port forwarding
  538. should appear in the list box.
  539. Now start your session and log in. (Port forwarding will not be
  540. enabled until after you have logged in; otherwise it would be easy
  541. to perform completely anonymous network attacks, and gain access to
  542. anyone's virtual private network.) To check that PuTTY has set up
  543. the port forwarding correctly, you can look at the PuTTY Event Log
  544. (see section 3.1.3.1). It should say something like this:
  545. 2001-12-05 17:22:10 Local port 3110 forwarding to
  546. popserver.example.com:110
  547. Now if you connect to the source port number on your local PC, you
  548. should find that it answers you exactly as if it were the service
  549. running on the destination machine. So in this example, you could
  550. then configure an e-mail client to use `localhost:3110' as a POP-
  551. 3 server instead of `popserver.example.com:110'. (Of course, the
  552. forwarding will stop happening when your PuTTY session closes down.)
  553. You can also forward ports in the other direction: arrange for a
  554. particular port number on the _server_ machine to be forwarded back
  555. to your PC as a connection to a service on your PC or near it. To do
  556. this, just select the `Remote' radio button instead of the `Local'
  557. one. The `Source port' box will now specify a port number on the
  558. _server_ (note that most servers will not allow you to use port
  559. numbers under 1024 for this purpose).
  560. An alternative way to forward local connections to remote hosts
  561. is to use dynamic SOCKS proxying. In this mode, PuTTY acts as a
  562. SOCKS server, which SOCKS-aware programs can connect to and open
  563. forwarded connections to the destination of their choice, so this
  564. can be an alternative to long lists of static forwardings. To use
  565. this mode, you will need to select the `Dynamic' radio button
  566. instead of `Local', and then you should not enter anything into the
  567. `Destination' box (it will be ignored). PuTTY will then listen for
  568. SOCKS connections on the port you have specified. Most web browsers
  569. can be configured to connect to this SOCKS proxy service; also, you
  570. can forward other PuTTY connections through it by setting up the
  571. Proxy control panel (see section 4.16 for details).
  572. The source port for a forwarded connection usually does not accept
  573. connections from any machine except the SSH client or server machine
  574. itself (for local and remote forwardings respectively). There are
  575. controls in the Tunnels panel to change this:
  576. - The `Local ports accept connections from other hosts' option
  577. allows you to set up local-to-remote port forwardings (including
  578. dynamic port forwardings) in such a way that machines other than
  579. your client PC can connect to the forwarded port.
  580. - The `Remote ports do the same' option does the same thing for
  581. remote-to-local port forwardings (so that machines other than
  582. the SSH server machine can connect to the forwarded port.) Note
  583. that this feature is only available in the SSH-2 protocol, and
  584. not all SSH-2 servers honour it (in OpenSSH, for example, it's
  585. usually disabled by default).
  586. You can also specify an IP address to listen on. Typically a
  587. Windows machine can be asked to listen on any single IP address
  588. in the 127.*.*.* range, and all of these are loopback addresses
  589. available only to the local machine. So if you forward (for example)
  590. `127.0.0.5:79' to a remote machine's finger port, then you should be
  591. able to run commands such as `finger [email protected]'. This can be
  592. useful if the program connecting to the forwarded port doesn't allow
  593. you to change the port number it uses. This feature is available
  594. for local-to-remote forwarded ports; SSH-1 is unable to support it
  595. for remote-to-local ports, while SSH-2 can support it in theory but
  596. servers will not necessarily cooperate.
  597. (Note that if you're using Windows XP Service Pack 2, you may need
  598. to obtain a fix from Microsoft in order to use addresses like
  599. 127.0.0.5 - see question A.7.17.)
  600. For more options relating to port forwarding, see section 4.26.
  601. If the connection you are forwarding over SSH is itself a second
  602. SSH connection made by another copy of PuTTY, you might find the
  603. `logical host name' configuration option useful to warn PuTTY of
  604. which host key it should be expecting. See section 4.14.5 for
  605. details of this.
  606. 3.6 Connecting to a local serial line
  607. PuTTY can connect directly to a local serial line as an alternative
  608. to making a network connection. In this mode, text typed into the
  609. PuTTY window will be sent straight out of your computer's serial
  610. port, and data received through that port will be displayed in the
  611. PuTTY window. You might use this mode, for example, if your serial
  612. port is connected to another computer which has a serial connection.
  613. To make a connection of this type, simply select `Serial' from the
  614. `Connection type' radio buttons on the `Session' configuration panel
  615. (see section 4.1.1). The `Host Name' and `Port' boxes will transform
  616. into `Serial line' and `Speed', allowing you to specify which serial
  617. line to use (if your computer has more than one) and what speed
  618. (baud rate) to use when transferring data. For further configuration
  619. options (data bits, stop bits, parity, flow control), you can use
  620. the `Serial' configuration panel (see section 4.29).
  621. After you start up PuTTY in serial mode, you might find that you
  622. have to make the first move, by sending some data out of the serial
  623. line in order to notify the device at the other end that someone is
  624. there for it to talk to. This probably depends on the device. If you
  625. start up a PuTTY serial session and nothing appears in the window,
  626. try pressing Return a few times and see if that helps.
  627. A serial line provides no well defined means for one end of the
  628. connection to notify the other that the connection is finished.
  629. Therefore, PuTTY in serial mode will remain connected until you
  630. close the window using the close button.
  631. 3.7 Making raw TCP connections
  632. A lot of Internet protocols are composed of commands and responses
  633. in plain text. For example, SMTP (the protocol used to transfer e-
  634. mail), NNTP (the protocol used to transfer Usenet news), and HTTP
  635. (the protocol used to serve Web pages) all consist of commands in
  636. readable plain text.
  637. Sometimes it can be useful to connect directly to one of these
  638. services and speak the protocol `by hand', by typing protocol
  639. commands and watching the responses. On Unix machines, you can do
  640. this using the system's `telnet' command to connect to the right
  641. port number. For example, `telnet mailserver.example.com 25' might
  642. enable you to talk directly to the SMTP service running on a mail
  643. server.
  644. Although the Unix `telnet' program provides this functionality, the
  645. protocol being used is not really Telnet. Really there is no actual
  646. protocol at all; the bytes sent down the connection are exactly the
  647. ones you type, and the bytes shown on the screen are exactly the
  648. ones sent by the server. Unix `telnet' will attempt to detect or
  649. guess whether the service it is talking to is a real Telnet service
  650. or not; PuTTY prefers to be told for certain.
  651. In order to make a debugging connection to a service of this
  652. type, you simply select the fourth protocol name, `Raw', from the
  653. `Protocol' buttons in the `Session' configuration panel. (See
  654. section 4.1.1.) You can then enter a host name and a port number,
  655. and make the connection.
  656. 3.8 Connecting using the Telnet protocol
  657. PuTTY can use the Telnet protocol to connect to a server.
  658. Telnet was perhaps the most popular remote login protocol before SSH
  659. was introduced. It was general enough to be used by multiple server
  660. operating systems (Unix and VMS in particular), and supported many
  661. optional protocol extensions providing extra support for particular
  662. server features.
  663. Unlike SSH, Telnet runs over an unsecured network connection, so it
  664. is a very bad idea to use it over the hostile Internet (though it is
  665. still used to some extent as of 2020).
  666. 3.9 Connecting using the Rlogin protocol
  667. PuTTY can use the Rlogin protocol to connect to a server.
  668. Rlogin was similar to Telnet in concept, but more focused on
  669. connections between Unix machines. It supported a feature for
  670. passwordless login, based on use of `privileged ports' (ports with
  671. numbers below 1024, which Unix traditionally does not allow users
  672. other than root to allocate). Ultimately, based on the server
  673. trusting that the client's IP address was owned by the Unix machine
  674. it claimed to be, and that that machine would guard its privileged
  675. ports appropriately.
  676. Like Telnet, Rlogin runs over an unsecured network connection.
  677. 3.10 Connecting using the SUPDUP protocol
  678. PuTTY can use the SUPDUP protocol to connect to a server.
  679. SUPDUP is a login protocol used mainly by PDP-10 and Lisp machines
  680. during the period 1975-1990. Like Telnet and Rlogin, it is
  681. unsecured, so modern systems almost never support it.
  682. To make a connection of this type, select `SUPDUP' from the
  683. `Connection type' radio buttons on the `Session' panel (see section
  684. 4.1.1). For further configuration options (character set, more
  685. processing, scrolling), you can use the `SUPDUP' configuration panel
  686. (see section 4.32).
  687. In SUPDUP, terminal emulation is more integrated with the network
  688. protocol than in other protocols such as SSH. The SUPDUP protocol
  689. can thus only be used with PuTTY proper, not with the command-line
  690. tool Plink.
  691. The SUPDUP protocol does not support changing the terminal
  692. dimensions, so this capability is disabled during a SUPDUP session.
  693. SUPDUP provides no well defined means for one end of the connection
  694. to notify the other that the connection is finished. Therefore,
  695. PuTTY in SUPDUP mode will remain connected until you close the
  696. window using the close button.
  697. 3.11 The PuTTY command line
  698. PuTTY can be made to do various things without user intervention
  699. by supplying command-line arguments (e.g., from a command prompt
  700. window, or a Windows shortcut).
  701. 3.11.1 Starting a session from the command line
  702. These options allow you to bypass the configuration window and
  703. launch straight into a session.
  704. To start a connection to a server called `host':
  705. putty.exe [-ssh | -ssh-connection | -telnet | -rlogin | -supdup | -raw] [user@]host
  706. If this syntax is used, settings are taken from the Default Settings
  707. (see section 4.1.2); `user' overrides these settings if supplied.
  708. Also, you can specify a protocol, which will override the default
  709. protocol (see section 3.11.3.2).
  710. For telnet sessions, the following alternative syntax is supported
  711. (this makes PuTTY suitable for use as a URL handler for telnet URLs
  712. in web browsers):
  713. putty.exe telnet://host[:port]/
  714. To start a connection to a serial port, e.g. COM1:
  715. putty.exe -serial com1
  716. In order to start an existing saved session called `sessionname',
  717. use the `-load' option (described in section 3.11.3.1).
  718. putty.exe -load "session name"
  719. 3.11.2 `-cleanup'
  720. If invoked with the `-cleanup' option, rather than running as
  721. normal, PuTTY will remove its registry entries and random seed file
  722. from the local machine (after confirming with the user). It will
  723. also attempt to remove information about recently launched sessions
  724. stored in the `jump list' on Windows 7 and up.
  725. Note that on multi-user systems, `-cleanup' only removes registry
  726. entries and files associated with the currently logged-in user.
  727. 3.11.3 Standard command-line options
  728. PuTTY and its associated tools support a range of command-line
  729. options, most of which are consistent across all the tools. This
  730. section lists the available options in all tools. Options which are
  731. specific to a particular tool are covered in the chapter about that
  732. tool.
  733. 3.11.3.1 `-load': load a saved session
  734. The `-load' option causes PuTTY to load configuration details out
  735. of a saved session. If these details include a host name, then this
  736. option is all you need to make PuTTY start a session.
  737. You need double quotes around the session name if it contains
  738. spaces.
  739. If you want to create a Windows shortcut to start a PuTTY saved
  740. session, this is the option you should use: your shortcut should
  741. call something like
  742. d:\path\to\putty.exe -load "my session"
  743. (Note that PuTTY itself supports an alternative form of this option,
  744. for backwards compatibility. If you execute `putty @sessionname' it
  745. will have the same effect as `putty -load "sessionname"'. With the
  746. `@' form, no double quotes are required, and the `@' sign must be
  747. the very first thing on the command line. This form of the option is
  748. deprecated.)
  749. 3.11.3.2 Selecting a protocol: `-ssh', `-ssh-connection', `-telnet', `-
  750. rlogin', `-supdup', `-raw', `-serial'
  751. To choose which protocol you want to connect with, you can use one
  752. of these options:
  753. - `-ssh' selects the SSH protocol.
  754. - `-ssh-connection' selects the bare ssh-connection protocol.
  755. (This is only useful in specialised circumstances; see section
  756. 4.28 for more information.)
  757. - `-telnet' selects the Telnet protocol.
  758. - `-rlogin' selects the Rlogin protocol.
  759. - `-supdup' selects the SUPDUP protocol.
  760. - `-raw' selects the raw protocol.
  761. - `-serial' selects a serial connection.
  762. Most of these options are not available in the file transfer tools
  763. PSCP and PSFTP (which only work with the SSH protocol and the bare
  764. ssh-connection protocol).
  765. These options are equivalent to the protocol selection buttons
  766. in the Session panel of the PuTTY configuration box (see section
  767. 4.1.1).
  768. 3.11.3.3 `-v': increase verbosity
  769. Most of the PuTTY tools can be made to tell you more about what they
  770. are doing by supplying the `-v' option. If you are having trouble
  771. when making a connection, or you're simply curious, you can turn
  772. this switch on and hope to find out more about what is happening.
  773. 3.11.3.4 `-l': specify a login name
  774. You can specify the user name to log in as on the remote server
  775. using the `-l' option. For example, `plink login.example.com -
  776. l fred'.
  777. These options are equivalent to the username selection box in
  778. the Connection panel of the PuTTY configuration box (see section
  779. 4.15.1).
  780. 3.11.3.5 `-L', `-R' and `-D': set up port forwardings
  781. As well as setting up port forwardings in the PuTTY configuration
  782. (see section 4.26), you can also set up forwardings on the command
  783. line. The command-line options work just like the ones in Unix `ssh'
  784. programs.
  785. To forward a local port (say 5110) to a remote destination (say
  786. popserver.example.com port 110), you can write something like one of
  787. these:
  788. putty -L 5110:popserver.example.com:110 -load mysession
  789. plink mysession -L 5110:popserver.example.com:110
  790. To forward a remote port to a local destination, just use the `-R'
  791. option instead of `-L':
  792. putty -R 5023:mytelnetserver.myhouse.org:23 -load mysession
  793. plink mysession -R 5023:mytelnetserver.myhouse.org:23
  794. To specify an IP address for the listening end of the tunnel,
  795. prepend it to the argument:
  796. plink -L 127.0.0.5:23:localhost:23 myhost
  797. To set up SOCKS-based dynamic port forwarding on a local port, use
  798. the `-D' option. For this one you only have to pass the port number:
  799. putty -D 4096 -load mysession
  800. For general information on port forwarding, see section 3.5.
  801. These options are not available in the file transfer tools PSCP and
  802. PSFTP.
  803. 3.11.3.6 `-m': read a remote command or script from a file
  804. The `-m' option performs a similar function to the `Remote command'
  805. box in the SSH panel of the PuTTY configuration box (see section
  806. 4.17.1). However, the `-m' option expects to be given a local file
  807. name, and it will read a command from that file.
  808. With some servers (particularly Unix systems), you can even put
  809. multiple lines in this file and execute more than one command in
  810. sequence, or a whole shell script; but this is arguably an abuse,
  811. and cannot be expected to work on all servers. In particular, it is
  812. known _not_ to work with certain `embedded' servers, such as Cisco
  813. routers.
  814. This option is not available in the file transfer tools PSCP and
  815. PSFTP.
  816. 3.11.3.7 `-P': specify a port number
  817. The `-P' option is used to specify the port number to connect to. If
  818. you have a Telnet server running on port 9696 of a machine instead
  819. of port 23, for example:
  820. putty -telnet -P 9696 host.name
  821. plink -telnet -P 9696 host.name
  822. (Note that this option is more useful in Plink than in PuTTY,
  823. because in PuTTY you can write `putty -telnet host.name 9696' in any
  824. case.)
  825. This option is equivalent to the port number control in the Session
  826. panel of the PuTTY configuration box (see section 4.1.1).
  827. 3.11.3.8 `-pwfile' and `-pw': specify a password
  828. A simple way to automate a remote login is to supply your password
  829. on the command line.
  830. The `-pwfile' option takes a file name as an argument. The first
  831. line of text in that file will be used as your password.
  832. The `-pw' option takes the password itself as an argument. This is
  833. *NOT SECURE* if anybody else uses the same computer, because the
  834. whole command line (including the password) is likely to show up
  835. if another user lists the running processes. `-pw' is retained for
  836. backwards compatibility only; you should use `-pwfile' instead.
  837. Note that these options only work when you are using the SSH
  838. protocol. Due to fundamental limitations of Telnet, Rlogin,
  839. and SUPDUP, these protocols do not support automated password
  840. authentication.
  841. 3.11.3.9 `-agent' and `-noagent': control use of Pageant for authentication
  842. The `-agent' option turns on SSH authentication using Pageant, and
  843. `-noagent' turns it off. These options are only meaningful if you
  844. are using SSH.
  845. See chapter 9 for general information on Pageant.
  846. These options are equivalent to the agent authentication checkbox in
  847. the Auth panel of the PuTTY configuration box (see section 4.21.4).
  848. 3.11.3.10 `-A' and `-a': control agent forwarding
  849. The `-A' option turns on SSH agent forwarding, and `-a' turns it
  850. off. These options are only meaningful if you are using SSH.
  851. See chapter 9 for general information on Pageant, and section 9.4
  852. for information on agent forwarding. Note that there is a security
  853. risk involved with enabling this option; see section 9.6 for
  854. details.
  855. These options are equivalent to the agent forwarding checkbox in the
  856. Auth panel of the PuTTY configuration box (see section 4.21.7).
  857. These options are not available in the file transfer tools PSCP and
  858. PSFTP.
  859. 3.11.3.11 `-X' and `-x': control X11 forwarding
  860. The `-X' option turns on X11 forwarding in SSH, and `-x' turns it
  861. off. These options are only meaningful if you are using SSH.
  862. For information on X11 forwarding, see section 3.4.
  863. These options are equivalent to the X11 forwarding checkbox in the
  864. X11 panel of the PuTTY configuration box (see section 4.25).
  865. These options are not available in the file transfer tools PSCP and
  866. PSFTP.
  867. 3.11.3.12 `-t' and `-T': control pseudo-terminal allocation
  868. The `-t' option ensures PuTTY attempts to allocate a pseudo-terminal
  869. at the server, and `-T' stops it from allocating one. These options
  870. are only meaningful if you are using SSH.
  871. These options are equivalent to the `Don't allocate a pseudo-
  872. terminal' checkbox in the SSH panel of the PuTTY configuration box
  873. (see section 4.24.1).
  874. These options are not available in the file transfer tools PSCP and
  875. PSFTP.
  876. 3.11.3.13 `-N': suppress starting a shell or command
  877. The `-N' option prevents PuTTY from attempting to start a shell or
  878. command on the remote server. You might want to use this option if
  879. you are only using the SSH connection for port forwarding, and your
  880. user account on the server does not have the ability to run a shell.
  881. This feature is only available in SSH protocol version 2 (since the
  882. version 1 protocol assumes you will always want to run a shell).
  883. This option is equivalent to the `Don't start a shell or command at
  884. all' checkbox in the SSH panel of the PuTTY configuration box (see
  885. section 4.17.2).
  886. This option is not available in the file transfer tools PSCP and
  887. PSFTP.
  888. 3.11.3.14 `-nc': make a remote network connection in place of a remote
  889. shell or command
  890. The `-nc' option prevents Plink (or PuTTY) from attempting to start
  891. a shell or command on the remote server. Instead, it will instruct
  892. the remote server to open a network connection to a host name and
  893. port number specified by you, and treat that network connection as
  894. if it were the main session.
  895. You specify a host and port as an argument to the `-nc' option, with
  896. a colon separating the host name from the port number, like this:
  897. plink host1.example.com -nc host2.example.com:1234
  898. This can be useful if you're trying to make a connection to a target
  899. host which you can only reach by SSH forwarding through a proxy
  900. host. One way to do this would be to have an existing SSH connection
  901. to the proxy host, with a port forwarding, but if you prefer to have
  902. the connection started on demand as needed, then this approach can
  903. also work.
  904. However, this does depend on the program _using_ the proxy being
  905. able to run a subprocess in place of making a network connection.
  906. PuTTY itself can do this using the `Local' proxy type, but there's a
  907. built-in more flexible way using the `SSH' proxy type. (See section
  908. 4.16.1 for a description of both.) So this feature is probably most
  909. useful with another client program as the end user.
  910. This feature is only available in SSH protocol version 2 (since the
  911. version 1 protocol assumes you will always want to run a shell). It
  912. is not available in the file transfer tools PSCP and PSFTP. It is
  913. available in PuTTY itself, although it is unlikely to be very useful
  914. in any tool other than Plink. Also, `-nc' uses the same server
  915. functionality as port forwarding, so it will not work if your server
  916. administrator has disabled port forwarding.
  917. (The option is named `-nc' after the Unix program `nc', short for
  918. `netcat'. The command `plink host1 -nc host2:port' is very similar
  919. in functionality to `plink host1 nc host2 port', which invokes `nc'
  920. on the server and tells it to connect to the specified destination.
  921. However, Plink's built-in `-nc' option does not depend on the `nc'
  922. program being installed on the server.)
  923. 3.11.3.15 `-C': enable compression
  924. The `-C' option enables compression of the data sent across the
  925. network. This option is only meaningful if you are using SSH.
  926. This option is equivalent to the `Enable compression' checkbox in
  927. the SSH panel of the PuTTY configuration box (see section 4.17.3).
  928. 3.11.3.16 `-1' and `-2': specify an SSH protocol version
  929. The `-1' and `-2' options force PuTTY to use version 1 or version 2
  930. of the SSH protocol. These options are only meaningful if you are
  931. using SSH.
  932. These options are equivalent to selecting the SSH protocol version
  933. in the SSH panel of the PuTTY configuration box (see section
  934. 4.17.4).
  935. 3.11.3.17 `-4' and `-6': specify an Internet protocol version
  936. The `-4' and `-6' options force PuTTY to use the older Internet
  937. protocol IPv4 or the newer IPv6 for most outgoing connections.
  938. These options are equivalent to selecting your preferred Internet
  939. protocol version as `IPv4' or `IPv6' in the Connection panel of the
  940. PuTTY configuration box (see section 4.14.4).
  941. 3.11.3.18 `-i': specify an SSH private key
  942. The `-i' option allows you to specify the name of a private key file
  943. in `*.PPK' format which PuTTY will use to authenticate with the
  944. server. This option is only meaningful if you are using SSH.
  945. If you are using Pageant, you can also specify a _public_ key file
  946. (in RFC 4716 or OpenSSH format) to identify a specific key file to
  947. use. (This won't work if you're not running Pageant, of course.)
  948. For general information on public-key authentication, see chapter 8.
  949. This option is equivalent to the `Private key file for
  950. authentication' box in the Auth panel of the PuTTY configuration box
  951. (see section 4.22.1).
  952. 3.11.3.19 `-cert': specify an SSH certificate
  953. The `-cert' option allows you to specify the name of a certificate
  954. file containing a signed version of your public key. If you specify
  955. this option, PuTTY will present that certificate in place of the
  956. plain public key, whenever it tries to authenticate with a key that
  957. matches. (This applies whether the key is stored in Pageant or
  958. loaded directly from a file by PuTTY.)
  959. This option is equivalent to the `Certificate to use with the
  960. private key' box in the Auth panel of the PuTTY configuration box
  961. (see section 4.22.2).
  962. 3.11.3.20 `-no-trivial-auth': disconnect if SSH authentication succeeds
  963. trivially
  964. This option causes PuTTY to abandon an SSH session if the server
  965. accepts authentication without ever having asked for any kind of
  966. password or signature or token.
  967. See section 4.21.3 for why you might want this.
  968. 3.11.3.21 `-loghost': specify a logical host name
  969. This option overrides PuTTY's normal SSH host key caching policy by
  970. telling it the name of the host you expect your connection to end up
  971. at (in cases where this differs from the location PuTTY thinks it's
  972. connecting to). It can be a plain host name, or a host name followed
  973. by a colon and a port number. See section 4.14.5 for more detail on
  974. this.
  975. 3.11.3.22 `-hostkey': manually specify an expected host key
  976. This option overrides PuTTY's normal SSH host key caching policy
  977. by telling it exactly what host key to expect, which can be
  978. useful if the normal automatic host key store in the Registry is
  979. unavailable. The argument to this option should be either a host key
  980. fingerprint, or an SSH-2 public key blob. See section 4.19.3 for
  981. more information.
  982. You can specify this option more than once if you want to configure
  983. more than one key to be accepted.
  984. 3.11.3.23 `-pgpfp': display PGP key fingerprints
  985. This option causes the PuTTY tools not to run as normal, but instead
  986. to display the fingerprints of the PuTTY PGP Master Keys, in
  987. order to aid with verifying new versions. See appendix F for more
  988. information.
  989. 3.11.3.24 `-sercfg': specify serial port configuration
  990. This option specifies the configuration parameters for the serial
  991. port (baud rate, stop bits etc). Its argument is interpreted as
  992. a comma-separated list of configuration options, which can be as
  993. follows:
  994. - Any single digit from 5 to 9 sets the number of data bits.
  995. - `1', `1.5' or `2' sets the number of stop bits.
  996. - Any other numeric string is interpreted as a baud rate.
  997. - A single lower-case letter specifies the parity: `n' for none,
  998. `o' for odd, `e' for even, `m' for mark and `s' for space.
  999. - A single upper-case letter specifies the flow control: `N' for
  1000. none, `X' for XON/XOFF, `R' for RTS/CTS and `D' for DSR/DTR.
  1001. For example, `-sercfg 19200,8,n,1,N' denotes a baud rate of 19200, 8
  1002. data bits, no parity, 1 stop bit and no flow control.
  1003. 3.11.3.25 `-sessionlog', `-sshlog', `-sshrawlog': enable session logging
  1004. These options cause the PuTTY network tools to write out a log
  1005. file. Each of them expects a file name as an argument, e.g. `-
  1006. sshlog putty.log' causes an SSH packet log to be written to a file
  1007. called `putty.log'. The three different options select different
  1008. logging modes, all available from the GUI too:
  1009. - `-sessionlog' selects `All session output' logging mode.
  1010. - `-sshlog' selects `SSH packets' logging mode.
  1011. - `-sshrawlog' selects `SSH packets and raw data' logging mode.
  1012. For more information on logging configuration, see section 4.2.
  1013. 3.11.3.26 `-logoverwrite', `-logappend': control behaviour with existing
  1014. log file
  1015. If logging has been enabled (in the saved configuration, or by
  1016. another command-line option), and the specified log file already
  1017. exists, these options tell the PuTTY network tools what to do so
  1018. that they don't have to ask the user. See section 4.2.2 for details.
  1019. 3.11.3.27 `-proxycmd': specify a local proxy command
  1020. This option enables PuTTY's mode for running a command on the local
  1021. machine and using it as a proxy for the network connection. It
  1022. expects a shell command string as an argument.
  1023. See section 4.16.1 for more information on this, and on other proxy
  1024. settings. In particular, note that since the special sequences
  1025. described there are understood in the argument string, literal
  1026. backslashes must be doubled (if you want `\' in your command, you
  1027. must put `\\' on the command line).
  1028. 3.11.3.28 `-restrict-acl': restrict the Windows process ACL
  1029. This option (on Windows only) causes PuTTY (or another PuTTY tool)
  1030. to try to lock down the operating system's access control on its own
  1031. process. If this succeeds, it should present an extra obstacle to
  1032. malware that has managed to run under the same user id as the PuTTY
  1033. process, by preventing it from attaching to PuTTY using the same
  1034. interfaces debuggers use and either reading sensitive information
  1035. out of its memory or hijacking its network session.
  1036. This option is not enabled by default, because this form of
  1037. interaction between Windows programs has many legitimate uses,
  1038. including accessibility software such as screen readers. Also,
  1039. it cannot provide full security against this class of attack in
  1040. any case, because PuTTY can only lock down its own ACL _after_ it
  1041. has started up, and malware could still get in if it attacks the
  1042. process between startup and lockdown. So it trades away noticeable
  1043. convenience, and delivers less real security than you might want.
  1044. However, if you do want to make that tradeoff anyway, the option is
  1045. available.
  1046. A PuTTY process started with `-restrict-acl' will pass that on to
  1047. any processes started with Duplicate Session, New Session etc.
  1048. (However, if you're invoking PuTTY tools explicitly, for instance as
  1049. a proxy command, you'll need to arrange to pass them the `-restrict-
  1050. acl' option yourself, if that's what you want.)
  1051. If Pageant is started with the `-restrict-acl' option, and you use
  1052. it to launch a PuTTY session from its System Tray submenu, then
  1053. Pageant will _not_ default to starting the PuTTY subprocess with
  1054. a restricted ACL. This is because PuTTY is more likely to suffer
  1055. reduced functionality as a result of restricted ACLs (e.g. screen
  1056. reader software will have a greater need to interact with it),
  1057. whereas Pageant stores the more critical information (hence benefits
  1058. more from the extra protection), so it's reasonable to want to run
  1059. Pageant but not PuTTY with the ACL restrictions. You can force
  1060. Pageant to start subsidiary PuTTY processes with a restricted ACL if
  1061. you also pass the `-restrict-putty-acl' option.
  1062. 3.11.3.29 `-host-ca': launch the host CA configuration
  1063. If you start PuTTY with the `-host-ca' option, it will not launch
  1064. a session at all. Instead, it will just display the configuration
  1065. dialog box for host certification authorities, as described in
  1066. section 4.19.4. When you dismiss that dialog box, PuTTY will
  1067. terminate.
  1068. 3.11.3.30 `-legacy-stdio-prompts': handle Windows console prompts like
  1069. older versions of PuTTY
  1070. This option applies to all of PSCP, PSFTP and Plink on Windows: all
  1071. the tools in the PuTTY suite that run in a Windows console and make
  1072. SSH connections.
  1073. These tools use the Windows console to prompt for various
  1074. information: usernames, passwords, answers to questions about host
  1075. keys, and so on.
  1076. In current versions of PuTTY, these prompts work by direct access
  1077. to the Windows console. This means that even if you redirect the
  1078. standard input or output of the tool, prompts will _still_ be sent
  1079. to the console (and not where you've redirected your output), and
  1080. the user's responses will be read from the console (and not from
  1081. where you've redirected your input).
  1082. Another advantage of reading directly from the Windows console is
  1083. that the tools can read input as Unicode. So this also allows you
  1084. to enter usernames and passwords that contain characters not in the
  1085. Windows system's default character set.
  1086. In versions of the PuTTY tools up to and including 0.81, the prompts
  1087. used the tool's ordinary I/O handles, so prompt output and user
  1088. responses could be redirected.
  1089. We think the new behaviour is more likely to be useful. For example,
  1090. if you have a local command that generates output, and you want to
  1091. pipe that output into a command running remotely via Plink, you can
  1092. run a command line such as
  1093. local_command | plink hostname remote_command
  1094. and the data piped into the remote command will be the same whether
  1095. or not Plink has to stop to ask for a password. With the old
  1096. behaviour you would have had to include the password in Plink's
  1097. input, which is more awkward.
  1098. However, we recognise that people may have customised complicated
  1099. workflows around the old behaviour. So if you need to switch back
  1100. to it, you can do so by specifying `-legacy-stdio-prompts' on the
  1101. command-line.
  1102. To fully revert to the previous behaviour, you'd also need to
  1103. specify `-legacy-charset-handling' (see the next section). (Even
  1104. without that option, prompt handling with `-legacy-stdio-prompts'
  1105. may not be fully Unicode-clean.)
  1106. 3.11.3.31 `-legacy-charset-handling': handle character set in prompts like
  1107. older versions of PuTTY
  1108. This option applies to PuTTY (on all platforms), and also to all of
  1109. PSCP, PSFTP and Plink on Windows.
  1110. In current versions of PuTTY, when you are prompted in the terminal
  1111. window for things like SSH usernames and passwords, the responses
  1112. you type are interpreted as Unicode, and transmitted to the server
  1113. as such, even if the terminal is otherwise configured to use a
  1114. different character encoding (see section 4.10.1). Similarly, the
  1115. same prompts from the Windows console tools will unconditionally
  1116. interpret their input as Unicode.
  1117. This behaviour is in line with the SSH standards; it allows things
  1118. like usernames to use the full character set of the user's native
  1119. language, and ensures that different keystrokes you type for your
  1120. password are actually treated distinctly.
  1121. However, if you are used to the behaviour of the PuTTY tools up to
  1122. version 0.81, this could cause a previously working username and/or
  1123. password not to work as you expected. For instance, if you had
  1124. set a password including some accented characters, this change in
  1125. behaviour could cause the same keystrokes you've always entered to
  1126. start sending a different sequence of bytes to the server, denying
  1127. you access (and you wouldn't even be able to see the difference,
  1128. since the password is not shown when you type it).
  1129. `-legacy-charset-handling' reverts the PuTTY tools' behaviour to
  1130. how it was previously: what you type at these prompts will be
  1131. interpreted according to the `Remote character set' (for PuTTY) or
  1132. Windows' default character set (for the Windows console tools).
  1133. (For example, this could allow you to log in to change your password
  1134. to make using this option unnecessary in future. But if you're doing
  1135. that, make sure the terminal is configured as UTF-8!)
  1136. Chapter 4: Configuring PuTTY
  1137. ----------------------------
  1138. This chapter describes all the configuration options in PuTTY.
  1139. PuTTY is configured using the control panel that comes up before you
  1140. start a session. Some options can also be changed in the middle of a
  1141. session, by selecting `Change Settings' from the window menu.
  1142. 4.1 The Session panel
  1143. The Session configuration panel contains the basic options you need
  1144. to specify in order to open a session at all, and also allows you to
  1145. save your settings to be reloaded later.
  1146. 4.1.1 The host name section
  1147. The top box on the Session panel, labelled `Specify the destination
  1148. you want to connect to', contains the details that need to be filled
  1149. in before PuTTY can open a session at all.
  1150. - The `Host Name' box is where you type the name, or the IP
  1151. address, of the server you want to connect to.
  1152. - The `Connection type' controls let you choose what type of
  1153. connection you want to make: an SSH network connection, a
  1154. connection to a local serial line, or various other kinds of
  1155. network connection.
  1156. - See section 1.2 for a summary of the differences between
  1157. the network remote login protocols SSH, Telnet, Rlogin, and
  1158. SUPDUP.
  1159. - See section 3.6 for information about using a serial line.
  1160. - See section 3.7 for an explanation of `raw' connections.
  1161. - See section 3.8 for a little information about Telnet.
  1162. - See section 3.9 for information about using Rlogin.
  1163. - See section 3.10 for information about using SUPDUP.
  1164. - The `Bare ssh-connection' option in the `Connection type'
  1165. control is intended for specialist uses not involving
  1166. network connections. See section 4.28 for some information
  1167. about it.
  1168. - The `Port' box lets you specify which port number on the server
  1169. to connect to. If you select Telnet, Rlogin, SUPDUP, or SSH,
  1170. this box will be filled in automatically to the usual value, and
  1171. you will only need to change it if you have an unusual server.
  1172. If you select Raw mode, you will almost certainly need to fill
  1173. in the `Port' box yourself.
  1174. If you select `Serial' from the `Connection type' radio buttons,
  1175. the `Host Name' and `Port' boxes are replaced by `Serial line' and
  1176. `Speed'; see section 4.29 for more details of these.
  1177. 4.1.2 Loading and storing saved sessions
  1178. The next part of the Session configuration panel allows you to save
  1179. your preferred PuTTY options so they will appear automatically the
  1180. next time you start PuTTY. It also allows you to create _saved
  1181. sessions_, which contain a full set of configuration options plus a
  1182. host name and protocol. A saved session contains all the information
  1183. PuTTY needs to start exactly the session you want.
  1184. - To save your default settings: first set up the settings the way
  1185. you want them saved. Then come back to the Session panel. Select
  1186. the `Default Settings' entry in the saved sessions list, with a
  1187. single click. Then press the `Save' button.
  1188. If there is a specific host you want to store the details of how
  1189. to connect to, you should create a saved session, which will be
  1190. separate from the Default Settings.
  1191. - To save a session: first go through the rest of the
  1192. configuration box setting up all the options you want. Then come
  1193. back to the Session panel. Enter a name for the saved session in
  1194. the `Saved Sessions' input box. (The server name is often a good
  1195. choice for a saved session name.) Then press the `Save' button.
  1196. Your saved session name should now appear in the list box.
  1197. You can also save settings in mid-session, from the `Change
  1198. Settings' dialog. Settings changed since the start of the
  1199. session will be saved with their current values; as well as
  1200. settings changed through the dialog, this includes changes in
  1201. window size, window title changes sent by the server, and so on.
  1202. - To reload a saved session: single-click to select the session
  1203. name in the list box, and then press the `Load' button. Your
  1204. saved settings should all appear in the configuration panel.
  1205. - To modify a saved session: first load it as described above.
  1206. Then make the changes you want. Come back to the Session panel,
  1207. and press the `Save' button. The new settings will be saved over
  1208. the top of the old ones.
  1209. To save the new settings under a different name, you can enter
  1210. the new name in the `Saved Sessions' box, or single-click to
  1211. select a session name in the list box to overwrite that session.
  1212. To save `Default Settings', you must single-click the name
  1213. before saving.
  1214. - To start a saved session immediately: double-click on the
  1215. session name in the list box.
  1216. - To delete a saved session: single-click to select the session
  1217. name in the list box, and then press the `Delete' button.
  1218. Each saved session is independent of the Default Settings
  1219. configuration. If you change your preferences and update Default
  1220. Settings, you must also update every saved session separately.
  1221. Saved sessions are stored in the Registry, at the location
  1222. HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions
  1223. If you need to store them in a file, you could try the method
  1224. described in section 4.33.
  1225. 4.1.3 `Close window on exit'
  1226. Finally in the Session panel, there is an option labelled `Close
  1227. window on exit'. This controls whether the PuTTY terminal window
  1228. disappears as soon as the session inside it terminates. If you are
  1229. likely to want to copy and paste text out of the session after it
  1230. has terminated, or restart the session, you should arrange for this
  1231. option to be off.
  1232. `Close window on exit' has three settings. `Always' means always
  1233. close the window on exit; `Never' means never close on exit (always
  1234. leave the window open, but inactive). The third setting, and the
  1235. default one, is `Only on clean exit'. In this mode, a session which
  1236. terminates normally will cause its window to close, but one which is
  1237. aborted unexpectedly by network trouble or a confusing message from
  1238. the server will leave the window up.
  1239. 4.2 The Logging panel
  1240. The Logging configuration panel allows you to save log files of your
  1241. PuTTY sessions, for debugging, analysis or future reference.
  1242. The main option is a radio-button set that specifies whether PuTTY
  1243. will log anything at all. The options are:
  1244. - `None'. This is the default option; in this mode PuTTY will not
  1245. create a log file at all.
  1246. - `Printable output'. In this mode, a log file will be created
  1247. and written to, but only printable text will be saved into it.
  1248. The various terminal control codes that are typically sent down
  1249. an interactive session alongside the printable text will be
  1250. omitted. This might be a useful mode if you want to read a log
  1251. file in a text editor and hope to be able to make sense of it.
  1252. - `All session output'. In this mode, _everything_ sent by the
  1253. server into your terminal session is logged. If you view the log
  1254. file in a text editor, therefore, you may well find it full of
  1255. strange control characters. This is a particularly useful mode
  1256. if you are experiencing problems with PuTTY's terminal handling:
  1257. you can record everything that went to the terminal, so that
  1258. someone else can replay the session later in slow motion and
  1259. watch to see what went wrong.
  1260. - `SSH packets'. In this mode (which is only used by SSH
  1261. connections), the SSH message packets sent over the encrypted
  1262. connection are written to the log file (as well as Event Log
  1263. entries). You might need this to debug a network-level problem,
  1264. or more likely to send to the PuTTY authors as part of a bug
  1265. report. _BE WARNED_ that if you log in using a password, the
  1266. password can appear in the log file; see section 4.2.5 for
  1267. options that may help to remove sensitive material from the log
  1268. file before you send it to anyone else.
  1269. - `SSH packets and raw data'. In this mode, as well as the
  1270. decrypted packets (as in the previous mode), the _raw_
  1271. (encrypted, compressed, etc) packets are _also_ logged. This
  1272. could be useful to diagnose corruption in transit. (The same
  1273. caveats as the previous mode apply, of course.)
  1274. Note that the non-SSH logging options (`Printable output' and `All
  1275. session output') only work with PuTTY proper; in programs without
  1276. terminal emulation (such as Plink), they will have no effect, even
  1277. if enabled via saved settings.
  1278. 4.2.1 `Log file name'
  1279. In this edit box you enter the name of the file you want to log the
  1280. session to. The `Browse' button will let you look around your file
  1281. system to find the right place to put the file; or if you already
  1282. know exactly where you want it to go, you can just type a pathname
  1283. into the edit box.
  1284. There are a few special features in this box. If you use the `&'
  1285. character in the file name box, PuTTY will insert details of the
  1286. current session in the name of the file it actually opens. The
  1287. precise replacements it will do are:
  1288. - `&Y' will be replaced by the current year, as four digits.
  1289. - `&M' will be replaced by the current month, as two digits.
  1290. - `&D' will be replaced by the current day of the month, as two
  1291. digits.
  1292. - `&T' will be replaced by the current time, as six digits
  1293. (HHMMSS) with no punctuation.
  1294. - `&H' will be replaced by the host name you are connecting to (or
  1295. the serial line, for a serial connection).
  1296. - `&P' will be replaced by the port number you are connecting to
  1297. on the target host.
  1298. (These are all case-insensitive.)
  1299. For example, if you enter the file name `c:\puttylogs\log-&h-&y&m&d-
  1300. &t.dat', you will end up with files looking like
  1301. log-server1.example.com-20010528-110859.dat
  1302. log-unixbox.somewhere.org-20010611-221001.dat
  1303. 4.2.2 `What to do if the log file already exists'
  1304. This control allows you to specify what PuTTY should do if it tries
  1305. to start writing to a log file and it finds the file already exists.
  1306. You might want to automatically destroy the existing log file and
  1307. start a new one with the same name. Alternatively, you might want to
  1308. open the existing log file and add data to the _end_ of it. Finally
  1309. (the default option), you might not want to have any automatic
  1310. behaviour, but to ask the user every time the problem comes up.
  1311. 4.2.3 `Flush log file frequently'
  1312. This option allows you to control how frequently logged data is
  1313. flushed to disc. By default, PuTTY will flush data as soon as it
  1314. is displayed, so that if you view the log file while a session is
  1315. still open, it will be up to date; and if the client system crashes,
  1316. there's a greater chance that the data will be preserved.
  1317. However, this can incur a performance penalty. If PuTTY is running
  1318. slowly with logging enabled, you could try unchecking this option.
  1319. Be warned that the log file may not always be up to date as a result
  1320. (although it will of course be flushed when it is closed, for
  1321. instance at the end of a session).
  1322. 4.2.4 `Include header'
  1323. This option allows you to choose whether to include a header line
  1324. with the date and time when the log file is opened. It may be useful
  1325. to disable this if the log file is being used as realtime input to
  1326. other programs that don't expect the header line.
  1327. 4.2.5 Options specific to SSH packet logging
  1328. These options only apply if SSH packet data is being logged.
  1329. The following options allow particularly sensitive portions of
  1330. unencrypted packets to be automatically left out of the log file.
  1331. They are only intended to deter casual nosiness; an attacker could
  1332. glean a lot of useful information from even these obfuscated logs
  1333. (e.g., length of password).
  1334. 4.2.5.1 `Omit known password fields'
  1335. When checked, decrypted password fields are removed from the log of
  1336. transmitted packets. (This includes any user responses to challenge-
  1337. response authentication methods such as `keyboard-interactive'.)
  1338. This does not include X11 authentication data if using X11
  1339. forwarding.
  1340. Note that this will only omit data that PuTTY _knows_ to be a
  1341. password. However, if you start another login session within your
  1342. PuTTY session, for instance, any password used will appear in the
  1343. clear in the packet log. The next option may be of use to protect
  1344. against this.
  1345. This option is enabled by default.
  1346. 4.2.5.2 `Omit session data'
  1347. When checked, all decrypted `session data' is omitted; this is
  1348. defined as data in terminal sessions and in forwarded channels (TCP,
  1349. X11, and authentication agent). This will usually substantially
  1350. reduce the size of the resulting log file.
  1351. This option is disabled by default.
  1352. 4.3 The Terminal panel
  1353. The Terminal configuration panel allows you to control the behaviour
  1354. of PuTTY's terminal emulation.
  1355. 4.3.1 `Auto wrap mode initially on'
  1356. Auto wrap mode controls what happens when text printed in a PuTTY
  1357. window reaches the right-hand edge of the window.
  1358. With auto wrap mode on, if a long line of text reaches the right-
  1359. hand edge, it will wrap over on to the next line so you can still
  1360. see all the text. With auto wrap mode off, the cursor will stay at
  1361. the right-hand edge of the screen, and all the characters in the
  1362. line will be printed on top of each other.
  1363. If you are running a full-screen application and you occasionally
  1364. find the screen scrolling up when it looks as if it shouldn't, you
  1365. could try turning this option off.
  1366. Auto wrap mode can be turned on and off by control sequences sent by
  1367. the server. This configuration option controls the _default_ state,
  1368. which will be restored when you reset the terminal (see section
  1369. 3.1.3.6). However, if you modify this option in mid-session using
  1370. `Change Settings', it will take effect immediately.
  1371. 4.3.2 `DEC Origin Mode initially on'
  1372. DEC Origin Mode is a minor option which controls how PuTTY
  1373. interprets cursor-position control sequences sent by the server.
  1374. The server can send a control sequence that restricts the scrolling
  1375. region of the display. For example, in an editor, the server might
  1376. reserve a line at the top of the screen and a line at the bottom,
  1377. and might send a control sequence that causes scrolling operations
  1378. to affect only the remaining lines.
  1379. With DEC Origin Mode on, cursor coordinates are counted from the top
  1380. of the scrolling region. With it turned off, cursor coordinates are
  1381. counted from the top of the whole screen regardless of the scrolling
  1382. region.
  1383. It is unlikely you would need to change this option, but if you find
  1384. a full-screen application is displaying pieces of text in what looks
  1385. like the wrong part of the screen, you could try turning DEC Origin
  1386. Mode on to see whether that helps.
  1387. DEC Origin Mode can be turned on and off by control sequences sent
  1388. by the server. This configuration option controls the _default_
  1389. state, which will be restored when you reset the terminal (see
  1390. section 3.1.3.6). However, if you modify this option in mid-session
  1391. using `Change Settings', it will take effect immediately.
  1392. 4.3.3 `Implicit CR in every LF'
  1393. Most servers send two control characters, CR and LF, to start a new
  1394. line of the screen. The CR character makes the cursor return to the
  1395. left-hand side of the screen. The LF character makes the cursor move
  1396. one line down (and might make the screen scroll).
  1397. Some servers only send LF, and expect the terminal to move the
  1398. cursor over to the left automatically. If you come across a server
  1399. that does this, you will see a stepped effect on the screen, like
  1400. this:
  1401. First line of text
  1402. Second line
  1403. Third line
  1404. If this happens to you, try enabling the `Implicit CR in every LF'
  1405. option, and things might go back to normal:
  1406. First line of text
  1407. Second line
  1408. Third line
  1409. 4.3.4 `Implicit LF in every CR'
  1410. Most servers send two control characters, CR and LF, to start a new
  1411. line of the screen. The CR character makes the cursor return to the
  1412. left-hand side of the screen. The LF character makes the cursor move
  1413. one line down (and might make the screen scroll).
  1414. Some servers only send CR, and so the newly written line is
  1415. overwritten by the following line. This option causes a line feed so
  1416. that all lines are displayed.
  1417. 4.3.5 `Use background colour to erase screen'
  1418. Not all terminals agree on what colour to turn the screen when the
  1419. server sends a `clear screen' sequence. Some terminals believe the
  1420. screen should always be cleared to the _default_ background colour.
  1421. Others believe the screen should be cleared to whatever the server
  1422. has selected as a background colour.
  1423. There exist applications that expect both kinds of behaviour.
  1424. Therefore, PuTTY can be configured to do either.
  1425. With this option disabled, screen clearing is always done in the
  1426. default background colour. With this option enabled, it is done in
  1427. the _current_ background colour.
  1428. Background-colour erase can be turned on and off by control
  1429. sequences sent by the server. This configuration option controls the
  1430. _default_ state, which will be restored when you reset the terminal
  1431. (see section 3.1.3.6). However, if you modify this option in mid-
  1432. session using `Change Settings', it will take effect immediately.
  1433. 4.3.6 `Enable blinking text'
  1434. The server can ask PuTTY to display text that blinks on and off.
  1435. This is very distracting, so PuTTY allows you to turn blinking text
  1436. off completely.
  1437. When blinking text is disabled and the server attempts to make
  1438. some text blink, PuTTY will instead display the text with a bolded
  1439. background colour.
  1440. Blinking text can be turned on and off by control sequences sent by
  1441. the server. This configuration option controls the _default_ state,
  1442. which will be restored when you reset the terminal (see section
  1443. 3.1.3.6). However, if you modify this option in mid-session using
  1444. `Change Settings', it will take effect immediately.
  1445. 4.3.7 `Answerback to ^E'
  1446. This option controls what PuTTY will send back to the server if the
  1447. server sends it the ^E enquiry character. Normally it just sends the
  1448. string `PuTTY'.
  1449. If you accidentally write the contents of a binary file to your
  1450. terminal, you will probably find that it contains more than one ^E
  1451. character, and as a result your next command line will probably
  1452. read `PuTTYPuTTYPuTTY...' as if you had typed the answerback string
  1453. multiple times at the keyboard. If you set the answerback string
  1454. to be empty, this problem should go away, but doing so might cause
  1455. other problems.
  1456. Note that this is _not_ the feature of PuTTY which the server will
  1457. typically use to determine your terminal type. That feature is the
  1458. `Terminal-type string' in the Connection panel; see section 4.15.3
  1459. for details.
  1460. You can include control characters in the answerback string using
  1461. `^C' notation. (Use `^~' to get a literal `^'.)
  1462. 4.3.8 `Local echo'
  1463. With local echo disabled, characters you type into the PuTTY window
  1464. are not echoed in the window _by PuTTY_. They are simply sent to the
  1465. server. (The _server_ might choose to echo them back to you; this
  1466. can't be controlled from the PuTTY control panel.)
  1467. Some types of session need local echo, and many do not. In its
  1468. default mode, PuTTY will automatically attempt to deduce whether
  1469. or not local echo is appropriate for the session you are working
  1470. in. If you find it has made the wrong decision, you can use this
  1471. configuration option to override its choice: you can force local
  1472. echo to be turned on, or force it to be turned off, instead of
  1473. relying on the automatic detection.
  1474. 4.3.9 `Local line editing'
  1475. Normally, every character you type into the PuTTY window is sent
  1476. immediately to the server the moment you type it.
  1477. If you enable local line editing, this changes. PuTTY will let you
  1478. edit a whole line at a time locally, and the line will only be sent
  1479. to the server when you press Return. If you make a mistake, you can
  1480. use the Backspace key to correct it before you press Return, and the
  1481. server will never see the mistake.
  1482. Since it is hard to edit a line locally without being able to see
  1483. it, local line editing is mostly used in conjunction with local echo
  1484. (section 4.3.8). This makes it ideal for use in raw mode or when
  1485. connecting to MUDs or talkers. (Although some more advanced MUDs do
  1486. occasionally turn local line editing on and turn local echo off, in
  1487. order to accept a password from the user.)
  1488. Some types of session need local line editing, and many do not. In
  1489. its default mode, PuTTY will automatically attempt to deduce whether
  1490. or not local line editing is appropriate for the session you are
  1491. working in. If you find it has made the wrong decision, you can use
  1492. this configuration option to override its choice: you can force
  1493. local line editing to be turned on, or force it to be turned off,
  1494. instead of relying on the automatic detection.
  1495. 4.3.10 Remote-controlled printing
  1496. A lot of VT100-compatible terminals support printing under control
  1497. of the remote server (sometimes called `passthrough printing').
  1498. PuTTY supports this feature as well, but it is turned off by
  1499. default.
  1500. To enable remote-controlled printing, choose a printer from
  1501. the `Printer to send ANSI printer output to' drop-down list
  1502. box. This should allow you to select from all the printers you
  1503. have installed drivers for on your computer. Alternatively, you
  1504. can type the network name of a networked printer (for example,
  1505. `\\printserver\printer1') even if you haven't already installed a
  1506. driver for it on your own machine.
  1507. When the remote server attempts to print some data, PuTTY will send
  1508. that data to the printer _raw_ - without translating it, attempting
  1509. to format it, or doing anything else to it. It is up to you to
  1510. ensure your remote server knows what type of printer it is talking
  1511. to.
  1512. Since PuTTY sends data to the printer raw, it cannot offer options
  1513. such as portrait versus landscape, print quality, or paper tray
  1514. selection. All these things would be done by your PC printer driver
  1515. (which PuTTY bypasses); if you need them done, you will have to find
  1516. a way to configure your remote server to do them.
  1517. To disable remote printing again, choose `None (printing disabled)'
  1518. from the printer selection list. This is the default state.
  1519. 4.4 The Keyboard panel
  1520. The Keyboard configuration panel allows you to control the behaviour
  1521. of the keyboard in PuTTY. The correct state for many of these
  1522. settings depends on what the server to which PuTTY is connecting
  1523. expects. With a Unix server, this is likely to depend on the
  1524. `termcap' or `terminfo' entry it uses, which in turn is likely to be
  1525. controlled by the `Terminal-type string' setting in the Connection
  1526. panel; see section 4.15.3 for details. If none of the settings here
  1527. seems to help, you may find question A.7.13 to be useful.
  1528. 4.4.1 Changing the action of the Backspace key
  1529. Some terminals believe that the Backspace key should send the same
  1530. thing to the server as Control-H (ASCII code 8). Other terminals
  1531. believe that the Backspace key should send ASCII code 127 (usually
  1532. known as Control-?) so that it can be distinguished from Control-H.
  1533. This option allows you to choose which code PuTTY generates when you
  1534. press Backspace.
  1535. If you are connecting over SSH, PuTTY by default tells the server
  1536. the value of this option (see section 4.24.2), so you may find that
  1537. the Backspace key does the right thing either way. Similarly, if
  1538. you are connecting to a Unix system, you will probably find that
  1539. the Unix `stty' command lets you configure which the server expects
  1540. to see, so again you might not need to change which one PuTTY
  1541. generates. On other systems, the server's expectation might be fixed
  1542. and you might have no choice but to configure PuTTY.
  1543. If you do have the choice, we recommend configuring PuTTY to
  1544. generate Control-? and configuring the server to expect it, because
  1545. that allows applications such as `emacs' to use Control-H for help.
  1546. (Typing Shift-Backspace will cause PuTTY to send whichever code
  1547. isn't configured here as the default.)
  1548. 4.4.2 Changing the action of the Home and End keys
  1549. The Unix terminal emulator `rxvt' disagrees with the rest of the
  1550. world about what character sequences should be sent to the server by
  1551. the Home and End keys.
  1552. `xterm', and other terminals, send `ESC [1~' for the Home key, and
  1553. `ESC [4~' for the End key. `rxvt' sends `ESC [H' for the Home key
  1554. and `ESC [Ow' for the End key.
  1555. If you find an application on which the Home and End keys aren't
  1556. working, you could try switching this option to see if it helps.
  1557. 4.4.3 Changing the action of the function keys and keypad
  1558. This option affects the function keys (F1 to F12) and the top row of
  1559. the numeric keypad.
  1560. - In the default mode, labelled `ESC [n~', the function keys
  1561. generate sequences like `ESC [11~', `ESC [12~' and so on. This
  1562. matches the general behaviour of Digital's terminals.
  1563. - In Linux mode, F6 to F12 behave just like the default mode, but
  1564. F1 to F5 generate `ESC [[A' through to `ESC [[E'. This mimics
  1565. the Linux virtual console.
  1566. - In Xterm R6 mode, F5 to F12 behave like the default mode, but
  1567. F1 to F4 generate `ESC OP' through to `ESC OS', which are the
  1568. sequences produced by the top row of the _keypad_ on Digital's
  1569. terminals.
  1570. - In VT400 mode, all the function keys behave like the default
  1571. mode, but the actual top row of the numeric keypad generates
  1572. `ESC OP' through to `ESC OS'.
  1573. - In VT100+ mode, the function keys generate `ESC OP' through to
  1574. `ESC O['
  1575. - In SCO mode, the function keys F1 to F12 generate `ESC [M'
  1576. through to `ESC [X'. Together with shift, they generate `ESC [Y'
  1577. through to `ESC [j'. With control they generate `ESC [k' through
  1578. to `ESC [v', and with shift and control together they generate
  1579. `ESC [w' through to `ESC [{'.
  1580. - In Xterm 216 mode, the unshifted function keys behave the same
  1581. as Xterm R6 mode. But pressing a function key together with
  1582. Shift or Alt or Ctrl generates a different sequence containing
  1583. an extra numeric parameter of the form (1 for Shift) + (2 for
  1584. Alt) + (4 for Ctrl) + 1. For F1-F4, the basic sequences like
  1585. `ESC OP' become ESC [1;_bitmap_P and similar; for F5 and above,
  1586. ESC[_index_~ becomes ESC[_index_;_bitmap_~.
  1587. If you don't know what any of this means, you probably don't need to
  1588. fiddle with it.
  1589. 4.4.4 Changing the action of the shifted arrow keys
  1590. This option affects the arrow keys, if you press one with any of the
  1591. modifier keys Shift, Ctrl or Alt held down.
  1592. - In the default mode, labelled `Ctrl toggles app mode', the
  1593. Ctrl key toggles between the default arrow-key sequences like
  1594. `ESC [A' and `ESC [B', and the sequences Digital's terminals
  1595. generate in `application cursor keys' mode, i.e. `ESC O A' and
  1596. so on. Shift and Alt have no effect.
  1597. - In the `xterm-style bitmap' mode, Shift, Ctrl and Alt all
  1598. generate different sequences, with a number indicating which set
  1599. of modifiers is active.
  1600. If you don't know what any of this means, you probably don't need to
  1601. fiddle with it.
  1602. 4.4.5 Controlling Application Cursor Keys mode
  1603. Application Cursor Keys mode is a way for the server to change the
  1604. control sequences sent by the arrow keys. In normal mode, the arrow
  1605. keys send `ESC [A' through to `ESC [D'. In application mode, they
  1606. send `ESC OA' through to `ESC OD'.
  1607. Application Cursor Keys mode can be turned on and off by the server,
  1608. depending on the application. PuTTY allows you to configure the
  1609. initial state.
  1610. You can also disable application cursor keys mode completely, using
  1611. the `Features' configuration panel; see section 4.6.1.
  1612. 4.4.6 Controlling Application Keypad mode
  1613. Application Keypad mode is a way for the server to change the
  1614. behaviour of the numeric keypad.
  1615. In normal mode, the keypad behaves like a normal Windows keypad:
  1616. with NumLock on, the number keys generate numbers, and with NumLock
  1617. off they act like the arrow keys and Home, End etc.
  1618. In application mode, all the keypad keys send special control
  1619. sequences, _including_ Num Lock. Num Lock stops behaving like Num
  1620. Lock and becomes another function key.
  1621. Depending on which version of Windows you run, you may find the Num
  1622. Lock light still flashes on and off every time you press Num Lock,
  1623. even when application mode is active and Num Lock is acting like a
  1624. function key. This is unavoidable.
  1625. Application keypad mode can be turned on and off by the server,
  1626. depending on the application. PuTTY allows you to configure the
  1627. initial state.
  1628. You can also disable application keypad mode completely, using the
  1629. `Features' configuration panel; see section 4.6.1.
  1630. 4.4.7 Using NetHack keypad mode
  1631. PuTTY has a special mode for playing NetHack. You can enable it
  1632. by selecting `NetHack' in the `Initial state of numeric keypad'
  1633. control.
  1634. In this mode, the numeric keypad keys 1-9 generate the NetHack
  1635. movement commands (hjklyubn). The 5 key generates the `.' command
  1636. (do nothing).
  1637. In addition, pressing Shift or Ctrl with the keypad keys generate
  1638. the Shift- or Ctrl-keys you would expect (e.g. keypad-7 generates
  1639. `y', so Shift-keypad-7 generates `Y' and Ctrl-keypad-7 generates
  1640. Ctrl-Y); these commands tell NetHack to keep moving you in the same
  1641. direction until you encounter something interesting.
  1642. For some reason, this feature only works properly when Num Lock is
  1643. on. We don't know why.
  1644. 4.4.8 Enabling a DEC-like Compose key
  1645. DEC terminals have a Compose key, which provides an easy-to-remember
  1646. way of typing accented characters. You press Compose and then type
  1647. two more characters. The two characters are `combined' to produce
  1648. an accented character. The choices of character are designed to be
  1649. easy to remember; for example, composing `e' and ``' produces the
  1650. `e-grave' character.
  1651. If your keyboard has a Windows Application key, it acts as a Compose
  1652. key in PuTTY. Alternatively, if you enable the `AltGr acts as
  1653. Compose key' option, the AltGr key will become a Compose key.
  1654. 4.4.9 `Control-Alt is different from AltGr'
  1655. Some old keyboards do not have an AltGr key, which can make it
  1656. difficult to type some characters. PuTTY can be configured to treat
  1657. the key combination Ctrl + Left Alt the same way as the AltGr key.
  1658. By default, this checkbox is checked, and the key combination Ctrl +
  1659. Left Alt does something completely different. PuTTY's usual handling
  1660. of the left Alt key is to prefix the Escape (Control-[) character to
  1661. whatever character sequence the rest of the keypress would generate.
  1662. For example, Alt-A generates Escape followed by `a'. So Alt-Ctrl-A
  1663. would generate Escape, followed by Control-A.
  1664. If you uncheck this box, Ctrl-Alt will become a synonym for AltGr,
  1665. so you can use it to type extra graphic characters if your keyboard
  1666. has any.
  1667. (However, Ctrl-Alt will never act as a Compose key, regardless of
  1668. the setting of `AltGr acts as Compose key' described in section
  1669. 4.4.8.)
  1670. 4.5 The Bell panel
  1671. The Bell panel controls the terminal bell feature: the server's
  1672. ability to cause PuTTY to beep at you.
  1673. In the default configuration, when the server sends the character
  1674. with ASCII code 7 (Control-G), PuTTY will play the Windows Default
  1675. Beep sound. This is not always what you want the terminal bell
  1676. feature to do; the Bell panel allows you to configure alternative
  1677. actions.
  1678. 4.5.1 `Set the style of bell'
  1679. This control allows you to select various different actions to occur
  1680. on a terminal bell:
  1681. - Selecting `None' disables the bell completely. In this mode, the
  1682. server can send as many Control-G characters as it likes and
  1683. nothing at all will happen.
  1684. - `Make default system alert sound' is the default setting.
  1685. It causes the Windows `Default Beep' sound to be played. To
  1686. change what this sound is, or to test it if nothing seems to
  1687. be happening, use the Sound configurer in the Windows Control
  1688. Panel.
  1689. - `Visual bell' is a silent alternative to a beeping computer. In
  1690. this mode, when the server sends a Control-G, the whole PuTTY
  1691. window will flash white for a fraction of a second.
  1692. - `Beep using the PC speaker' is self-explanatory.
  1693. - `Play a custom sound file' allows you to specify a particular
  1694. sound file to be used by PuTTY alone, or even by a particular
  1695. individual PuTTY session. This allows you to distinguish your
  1696. PuTTY beeps from any other beeps on the system. If you select
  1697. this option, you will also need to enter the name of your sound
  1698. file in the edit control `Custom sound file to play as a bell'.
  1699. 4.5.2 `Taskbar/caption indication on bell'
  1700. This feature controls what happens to the PuTTY window's entry in
  1701. the Windows Taskbar if a bell occurs while the window does not have
  1702. the input focus.
  1703. In the default state (`Disabled') nothing unusual happens.
  1704. If you select `Steady', then when a bell occurs and the window is
  1705. not in focus, the window's Taskbar entry and its title bar will
  1706. change colour to let you know that PuTTY session is asking for your
  1707. attention. The change of colour will persist until you select the
  1708. window, so you can leave several PuTTY windows minimised in your
  1709. terminal, go away from your keyboard, and be sure not to have missed
  1710. any important beeps when you get back.
  1711. `Flashing' is even more eye-catching: the Taskbar entry will
  1712. continuously flash on and off until you select the window.
  1713. 4.5.3 `Control the bell overload behaviour'
  1714. A common user error in a terminal session is to accidentally run the
  1715. Unix command `cat' (or equivalent) on an inappropriate file type,
  1716. such as an executable, image file, or ZIP file. This produces a huge
  1717. stream of non-text characters sent to the terminal, which typically
  1718. includes a lot of bell characters. As a result of this the terminal
  1719. often doesn't stop beeping for ten minutes, and everybody else in
  1720. the office gets annoyed.
  1721. To try to avoid this behaviour, or any other cause of excessive
  1722. beeping, PuTTY includes a bell overload management feature. In the
  1723. default configuration, receiving more than five bell characters in a
  1724. two-second period will cause the overload feature to activate. Once
  1725. the overload feature is active, further bells will have no effect
  1726. at all, so the rest of your binary file will be sent to the screen
  1727. in silence. After a period of five seconds during which no further
  1728. bells are received, the overload feature will turn itself off again
  1729. and bells will be re-enabled.
  1730. If you want this feature completely disabled, you can turn it off
  1731. using the checkbox `Bell is temporarily disabled when over-used'.
  1732. Alternatively, if you like the bell overload feature but don't
  1733. agree with the settings, you can configure the details: how many
  1734. bells constitute an overload, how short a time period they have to
  1735. arrive in to do so, and how much silent time is required before the
  1736. overload feature will deactivate itself.
  1737. Bell overload mode is always deactivated by any keypress in the
  1738. terminal. This means it can respond to large unexpected streams of
  1739. data, but does not interfere with ordinary command-line activities
  1740. that generate beeps (such as filename completion).
  1741. 4.6 The Features panel
  1742. PuTTY's terminal emulation is very highly featured, and can do a
  1743. lot of things under remote server control. Some of these features
  1744. can cause problems due to buggy or strangely configured server
  1745. applications.
  1746. The Features configuration panel allows you to disable some of
  1747. PuTTY's more advanced terminal features, in case they cause trouble.
  1748. 4.6.1 Disabling application keypad and cursor keys
  1749. Application keypad mode (see section 4.4.6) and application cursor
  1750. keys mode (see section 4.4.5) alter the behaviour of the keypad and
  1751. cursor keys. Some applications enable these modes but then do not
  1752. deal correctly with the modified keys. You can force these modes to
  1753. be permanently disabled no matter what the server tries to do.
  1754. 4.6.2 Disabling xterm-style mouse reporting
  1755. PuTTY allows the server to send control codes that let it take
  1756. over the mouse and use it for purposes other than copy and paste.
  1757. Applications which use this feature include the text-mode web
  1758. browser `links', the Usenet newsreader `trn' version 4, and the file
  1759. manager `mc' (Midnight Commander).
  1760. If you find this feature inconvenient, you can disable it using the
  1761. `Disable xterm-style mouse reporting' control. With this box ticked,
  1762. the mouse will _always_ do copy and paste in the normal way.
  1763. Note that even if the application takes over the mouse, you can
  1764. still manage PuTTY's copy and paste by holding down the Shift key
  1765. while you select and paste, unless you have deliberately turned this
  1766. feature off (see section 4.11.2).
  1767. 4.6.3 Disabling remote terminal resizing
  1768. PuTTY has the ability to change the terminal's size and position in
  1769. response to commands from the server. If you find PuTTY is doing
  1770. this unexpectedly or inconveniently, you can tell PuTTY not to
  1771. respond to those server commands.
  1772. 4.6.4 Disabling switching to the alternate screen
  1773. Many terminals, including PuTTY, support an `alternate screen'. This
  1774. is the same size as the ordinary terminal screen, but separate.
  1775. Typically a screen-based program such as a text editor might switch
  1776. the terminal to the alternate screen before starting up. Then at the
  1777. end of the run, it switches back to the primary screen, and you see
  1778. the screen contents just as they were before starting the editor.
  1779. Some people prefer this not to happen. If you want your editor to
  1780. run in the same screen as the rest of your terminal activity, you
  1781. can disable the alternate screen feature completely.
  1782. 4.6.5 Disabling remote window title changing
  1783. PuTTY has the ability to change the window title in response
  1784. to commands from the server. If you find PuTTY is doing this
  1785. unexpectedly or inconveniently, you can tell PuTTY not to respond to
  1786. those server commands.
  1787. 4.6.6 Response to remote window title querying
  1788. PuTTY can optionally provide the xterm service of allowing server
  1789. applications to find out the local window title. This feature is
  1790. disabled by default, but you can turn it on if you really want it.
  1791. NOTE that this feature is a _potential security hazard_. If a
  1792. malicious application can write data to your terminal (for example,
  1793. if you merely `cat' a file owned by someone else on the server
  1794. machine), it can change your window title (unless you have disabled
  1795. this as mentioned in section 4.6.5) and then use this service to
  1796. have the new window title sent back to the server as if typed at the
  1797. keyboard. This allows an attacker to fake keypresses and potentially
  1798. cause your server-side applications to do things you didn't want.
  1799. Therefore this feature is disabled by default, and we recommend you
  1800. do not set it to `Window title' unless you _really_ know what you
  1801. are doing.
  1802. There are three settings for this option:
  1803. `None'
  1804. PuTTY makes no response whatsoever to the relevant escape
  1805. sequence. This may upset server-side software that is expecting
  1806. some sort of response.
  1807. `Empty string'
  1808. PuTTY makes a well-formed response, but leaves it blank. Thus,
  1809. server-side software that expects a response is kept happy,
  1810. but an attacker cannot influence the response string. This is
  1811. probably the setting you want if you have no better ideas.
  1812. `Window title'
  1813. PuTTY responds with the actual window title. This is dangerous
  1814. for the reasons described above.
  1815. 4.6.7 Disabling remote scrollback clearing
  1816. PuTTY has the ability to clear the terminal's scrollback buffer in
  1817. response to a command from the server. If you find PuTTY is doing
  1818. this unexpectedly or inconveniently, you can tell PuTTY not to
  1819. respond to that server command.
  1820. 4.6.8 Disabling destructive backspace
  1821. Normally, when PuTTY receives character 127 (^?) from the server,
  1822. it will perform a `destructive backspace': move the cursor one
  1823. space left and delete the character under it. This can apparently
  1824. cause problems in some applications, so PuTTY provides the ability
  1825. to configure character 127 to perform a normal backspace (without
  1826. deleting a character) instead.
  1827. 4.6.9 Disabling remote character set configuration
  1828. PuTTY has the ability to change its character set configuration
  1829. in response to commands from the server. Some programs send these
  1830. commands unexpectedly or inconveniently. In particular, BitchX (an
  1831. IRC client) seems to have a habit of reconfiguring the character set
  1832. to something other than the user intended.
  1833. If you find that accented characters are not showing up the way you
  1834. expect them to, particularly if you're running BitchX, you could try
  1835. disabling the remote character set configuration commands.
  1836. 4.6.10 Disabling Arabic text shaping
  1837. PuTTY supports shaping of Arabic text, which means that if your
  1838. server sends text written in the basic Unicode Arabic alphabet then
  1839. it will convert it to the correct display forms before printing it
  1840. on the screen.
  1841. If you are using full-screen software which was not expecting
  1842. this to happen (especially if you are not an Arabic speaker and
  1843. you unexpectedly find yourself dealing with Arabic text files in
  1844. applications which are not Arabic-aware), you might find that the
  1845. display becomes corrupted. By ticking this box, you can disable
  1846. Arabic text shaping so that PuTTY displays precisely the characters
  1847. it is told to display.
  1848. You may also find you need to disable bidirectional text display;
  1849. see section 4.6.11.
  1850. 4.6.11 Disabling bidirectional text display
  1851. PuTTY supports bidirectional text display, which means that if your
  1852. server sends text written in a language which is usually displayed
  1853. from right to left (such as Arabic or Hebrew) then PuTTY will
  1854. automatically flip it round so that it is displayed in the right
  1855. direction on the screen.
  1856. If you are using full-screen software which was not expecting
  1857. this to happen (especially if you are not an Arabic speaker and
  1858. you unexpectedly find yourself dealing with Arabic text files in
  1859. applications which are not Arabic-aware), you might find that the
  1860. display becomes corrupted. By ticking this box, you can disable
  1861. bidirectional text display, so that PuTTY displays text from left to
  1862. right in all situations.
  1863. You may also find you need to disable Arabic text shaping; see
  1864. section 4.6.10.
  1865. 4.6.12 Disabling bracketed paste mode
  1866. By default, when you paste text into the terminal window, it's sent
  1867. to the server as terminal input, exactly as if you'd typed the same
  1868. text into the terminal window using the keyboard (except that it's
  1869. all sent at once, much faster than you could type it).
  1870. However, a terminal application can change that, by asking the
  1871. terminal to enable `bracketed paste mode'. In this mode, pasted data
  1872. is marked in the input stream, by sending a special control sequence
  1873. before the paste, and another one at the end.
  1874. A terminal application can use this information to treat pasted data
  1875. differently from keyboard input. For example, a terminal-based text
  1876. editor can treat the input as literal data, even if some of its
  1877. characters would normally trigger special editor functions. A shell
  1878. can treat pasted input as less trusted, in case another application
  1879. somehow sneaked a malicious shell command into your clipboard:
  1880. modern versions of bash will highlight pasted data on the command
  1881. line, and not run it until you've confirmed it by pressing Return,
  1882. even if the pasted data contained a newline character.
  1883. In edge cases, it's possible that bracketed paste mode introduces
  1884. bigger problems than the ones it solves. So you can use this
  1885. checkbox to turn it off completely. If you do that, then PuTTY will
  1886. always send your paste data exactly as if it had been typed at the
  1887. keyboard, whether or not the server asked for bracketed paste mode.
  1888. 4.7 The Window panel
  1889. The Window configuration panel allows you to control aspects of the
  1890. PuTTY window.
  1891. 4.7.1 Setting the size of the PuTTY window
  1892. The `Columns' and `Rows' boxes let you set the PuTTY window to a
  1893. precise size. Of course you can also drag the window to a new size
  1894. while a session is running.
  1895. 4.7.2 What to do when the window is resized
  1896. These options allow you to control what happens when the user tries
  1897. to resize the PuTTY window using its window furniture.
  1898. There are four options here:
  1899. - `Change the number of rows and columns': the font size will not
  1900. change. (This is the default.)
  1901. - `Change the size of the font': the number of rows and columns in
  1902. the terminal will stay the same, and the font size will change.
  1903. - `Change font size when maximised': when the window is resized,
  1904. the number of rows and columns will change, _except_ when the
  1905. window is maximised (or restored), when the font size will
  1906. change. (In this mode, holding down the Alt key while resizing
  1907. will also cause the font size to change.)
  1908. - `Forbid resizing completely': the terminal will refuse to be
  1909. resized at all.
  1910. 4.7.3 Controlling scrollback
  1911. These options let you configure the way PuTTY keeps text after it
  1912. scrolls off the top of the screen (see section 3.1.2).
  1913. The `Lines of scrollback' box lets you configure how many lines of
  1914. text PuTTY keeps. The `Display scrollbar' options allow you to hide
  1915. the scrollbar (although you can still view the scrollback using
  1916. the keyboard as described in section 3.1.2). You can separately
  1917. configure whether the scrollbar is shown in full-screen mode and in
  1918. normal modes.
  1919. If you are viewing part of the scrollback when the server sends
  1920. more text to PuTTY, the screen will revert to showing the current
  1921. terminal contents. You can disable this behaviour by turning off
  1922. `Reset scrollback on display activity'. You can also make the screen
  1923. revert when you press a key, by turning on `Reset scrollback on
  1924. keypress'.
  1925. 4.7.4 `Push erased text into scrollback'
  1926. When this option is enabled, the contents of the terminal screen
  1927. will be pushed into the scrollback when a server-side application
  1928. clears the screen, so that your scrollback will contain a better
  1929. record of what was on your screen in the past.
  1930. If the application switches to the alternate screen (see section
  1931. 4.6.4 for more about this), then the contents of the primary screen
  1932. will be visible in the scrollback until the application switches
  1933. back again.
  1934. This option is enabled by default.
  1935. 4.8 The Appearance panel
  1936. The Appearance configuration panel allows you to control aspects of
  1937. the appearance of PuTTY's window.
  1938. 4.8.1 Controlling the appearance of the cursor
  1939. The `Cursor appearance' option lets you configure the cursor to be a
  1940. block, an underline, or a vertical line. A block cursor becomes an
  1941. empty box when the window loses focus; an underline or a vertical
  1942. line becomes dotted.
  1943. The `Cursor blinks' option makes the cursor blink on and off. This
  1944. works in any of the cursor modes.
  1945. 4.8.2 Controlling the font used in the terminal window
  1946. This option allows you to choose what font, in what size, the PuTTY
  1947. terminal window uses to display the text in the session.
  1948. By default, you will be offered a choice from all the fixed-width
  1949. fonts installed on the system, since VT100-style terminal handling
  1950. expects a fixed-width font. If you tick the box marked `Allow
  1951. selection of variable-pitch fonts', however, PuTTY will offer
  1952. variable-width fonts as well: if you select one of these, the font
  1953. will be coerced into fixed-size character cells, which will probably
  1954. not look very good (but can work OK with some fonts).
  1955. 4.8.3 `Hide mouse pointer when typing in window'
  1956. If you enable this option, the mouse pointer will disappear if the
  1957. PuTTY window is selected and you press a key. This way, it will
  1958. not obscure any of the text in the window while you work in your
  1959. session. As soon as you move the mouse, the pointer will reappear.
  1960. This option is disabled by default, so the mouse pointer remains
  1961. visible at all times.
  1962. 4.8.4 Controlling the window border
  1963. PuTTY allows you to configure the appearance of the window border to
  1964. some extent.
  1965. The checkbox marked `Sunken-edge border' changes the appearance of
  1966. the window border to something more like a DOS box: the inside edge
  1967. of the border is highlighted as if it sank down to meet the surface
  1968. inside the window. This makes the border a little bit thicker as
  1969. well. It's hard to describe well. Try it and see if you like it.
  1970. You can also configure a completely blank gap between the text in
  1971. the window and the border, using the `Gap between text and window
  1972. edge' control. By default this is set at one pixel. You can reduce
  1973. it to zero, or increase it further.
  1974. 4.9 The Behaviour panel
  1975. The Behaviour configuration panel allows you to control aspects of
  1976. the behaviour of PuTTY's window.
  1977. 4.9.1 Controlling the window title
  1978. The `Window title' edit box allows you to set the title of the PuTTY
  1979. window. By default the window title will contain the host name
  1980. followed by `PuTTY', for example `server1.example.com - PuTTY'. If
  1981. you want a different window title, this is where to set it.
  1982. PuTTY allows the server to send `xterm' control sequences which
  1983. modify the title of the window in mid-session (unless this is
  1984. disabled - see section 4.6.5); the title string set here is
  1985. therefore only the _initial_ window title.
  1986. As well as the _window_ title, there is also an `xterm' sequence
  1987. to modify the title of the window's _icon_. This makes sense in a
  1988. windowing system where the window becomes an icon when minimised,
  1989. such as Windows 3.1 or most X Window System setups; but in the
  1990. Windows 95-like user interface it isn't as applicable.
  1991. By default, PuTTY only uses the server-supplied _window_ title,
  1992. and ignores the icon title entirely. If for some reason you want
  1993. to see both titles, check the box marked `Separate window and icon
  1994. titles'. If you do this, PuTTY's window title and Taskbar caption
  1995. will change into the server-supplied icon title if you minimise the
  1996. PuTTY window, and change back to the server-supplied window title if
  1997. you restore it. (If the server has not bothered to supply a window
  1998. or icon title, none of this will happen.)
  1999. 4.9.2 `Warn before closing window'
  2000. If you press the Close button in a PuTTY window that contains a
  2001. running session, PuTTY will put up a warning window asking if you
  2002. really meant to close the window. A window whose session has already
  2003. terminated can always be closed without a warning.
  2004. If you want to be able to close a window quickly, you can disable
  2005. the `Warn before closing window' option.
  2006. 4.9.3 `Window closes on ALT-F4'
  2007. By default, pressing ALT-F4 causes the window to close (or a warning
  2008. box to appear; see section 4.9.2). If you disable the `Window closes
  2009. on ALT-F4' option, then pressing ALT-F4 will simply send a key
  2010. sequence to the server.
  2011. 4.9.4 `System menu appears on ALT-Space'
  2012. If this option is enabled, then pressing ALT-Space will bring up the
  2013. PuTTY window's menu, like clicking on the top left corner. If it is
  2014. disabled, then pressing ALT-Space will just send `ESC SPACE' to the
  2015. server.
  2016. Some accessibility programs for Windows may need this option
  2017. enabling to be able to control PuTTY's window successfully. For
  2018. instance, Dragon NaturallySpeaking requires it both to open the
  2019. system menu via voice, and to close, minimise, maximise and restore
  2020. the window.
  2021. 4.9.5 `System menu appears on Alt alone'
  2022. If this option is enabled, then pressing and releasing ALT will
  2023. bring up the PuTTY window's menu, like clicking on the top left
  2024. corner. If it is disabled, then pressing and releasing ALT will have
  2025. no effect.
  2026. 4.9.6 `Ensure window is always on top'
  2027. If this option is enabled, the PuTTY window will stay on top of all
  2028. other windows.
  2029. 4.9.7 `Full screen on Alt-Enter'
  2030. If this option is enabled, then pressing Alt-Enter will cause the
  2031. PuTTY window to become full-screen. Pressing Alt-Enter again will
  2032. restore the previous window size.
  2033. The full-screen feature is also available from the System menu, even
  2034. when it is configured not to be available on the Alt-Enter key. See
  2035. section 3.1.3.7.
  2036. 4.10 The Translation panel
  2037. The Translation configuration panel allows you to control the
  2038. translation between the character set understood by the server and
  2039. the character set understood by PuTTY.
  2040. 4.10.1 Controlling character set translation
  2041. During an interactive session, PuTTY receives a stream of 8-bit
  2042. bytes from the server, and in order to display them on the screen it
  2043. needs to know what character set to interpret them in. Similarly,
  2044. PuTTY needs to know how to translate your keystrokes into the
  2045. encoding the server expects. Unfortunately, there is no satisfactory
  2046. mechanism for PuTTY and the server to communicate this information,
  2047. so it must usually be manually configured.
  2048. There are a lot of character sets to choose from. The `Remote
  2049. character set' option lets you select one.
  2050. By default PuTTY will use the UTF-8 encoding of Unicode, which can
  2051. represent pretty much any character; data coming from the server
  2052. is interpreted as UTF-8, and keystrokes are sent UTF-8 encoded.
  2053. This is what most modern distributions of Linux will expect by
  2054. default. However, if this is wrong for your server, you can select a
  2055. different character set using this control.
  2056. A few other notable character sets are:
  2057. - The ISO-8859 series are all standard character sets that include
  2058. various accented characters appropriate for different sets of
  2059. languages.
  2060. - The Win125x series are defined by Microsoft, for similar
  2061. purposes. In particular Win1252 is almost equivalent to ISO-
  2062. 8859-1, but contains a few extra characters such as matched
  2063. quotes and the Euro symbol.
  2064. - If you want the old IBM PC character set with block graphics and
  2065. line-drawing characters, you can select `CP437'.
  2066. If you need support for a numeric code page which is not listed in
  2067. the drop-down list, such as code page 866, then you can try entering
  2068. its name manually (`CP866' for example) in the list box. If the
  2069. underlying version of Windows has the appropriate translation table
  2070. installed, PuTTY will use it.
  2071. 4.10.2 `Treat CJK ambiguous characters as wide'
  2072. There are some Unicode characters whose width is not well-defined.
  2073. In most contexts, such characters should be treated as single-
  2074. width for the purposes of wrapping and so on; however, in some CJK
  2075. contexts, they are better treated as double-width for historical
  2076. reasons, and some server-side applications may expect them to be
  2077. displayed as such. Setting this option will cause PuTTY to take the
  2078. double-width interpretation.
  2079. If you use legacy CJK applications, and you find your lines are
  2080. wrapping in the wrong places, or you are having other display
  2081. problems, you might want to play with this setting.
  2082. This option only has any effect in UTF-8 mode (see section 4.10.1).
  2083. 4.10.3 `Caps Lock acts as Cyrillic switch'
  2084. This feature allows you to switch between a US/UK keyboard layout
  2085. and a Cyrillic keyboard layout by using the Caps Lock key, if you
  2086. need to type (for example) Russian and English side by side in the
  2087. same document.
  2088. Currently this feature is not expected to work properly if your
  2089. native keyboard layout is not US or UK.
  2090. 4.10.4 Controlling display of line-drawing characters
  2091. VT100-series terminals allow the server to send control sequences
  2092. that shift temporarily into a separate character set for drawing
  2093. simple lines and boxes. However, there are a variety of ways in
  2094. which PuTTY can attempt to find appropriate characters, and the
  2095. right one to use depends on the locally configured font. In general
  2096. you should probably try lots of options until you find one that your
  2097. particular font supports.
  2098. - `Use Unicode line drawing code points' tries to use the box
  2099. characters that are present in Unicode. For good Unicode-
  2100. supporting fonts this is probably the most reliable and
  2101. functional option.
  2102. - `Poor man's line drawing' assumes that the font _cannot_
  2103. generate the line and box characters at all, so it will use the
  2104. `+', `-' and `|' characters to draw approximations to boxes. You
  2105. should use this option if none of the other options works.
  2106. - `Font has XWindows encoding' is for use with fonts that have a
  2107. special encoding, where the lowest 32 character positions (below
  2108. the ASCII printable range) contain the line-drawing characters.
  2109. This is unlikely to be the case with any standard Windows font;
  2110. it will probably only apply to custom-built fonts or fonts that
  2111. have been automatically converted from the X Window System.
  2112. - `Use font in both ANSI and OEM modes' tries to use the same font
  2113. in two different character sets, to obtain a wider range of
  2114. characters. This doesn't always work; some fonts claim to be a
  2115. different size depending on which character set you try to use.
  2116. - `Use font in OEM mode only' is more reliable than that, but can
  2117. miss out other characters from the main character set.
  2118. 4.10.5 Controlling copy and paste of line drawing characters
  2119. By default, when you copy and paste a piece of the PuTTY screen that
  2120. contains VT100 line and box drawing characters, PuTTY will paste
  2121. them in the form they appear on the screen: either Unicode line
  2122. drawing code points, or the `poor man's' line-drawing characters
  2123. `+', `-' and `|'. The checkbox `Copy and paste VT100 line drawing
  2124. chars as lqqqk' disables this feature, so line-drawing characters
  2125. will be pasted as the ASCII characters that were printed to produce
  2126. them. This will typically mean they come out mostly as `q' and `x',
  2127. with a scattering of `jklmntuvw' at the corners. This might be
  2128. useful if you were trying to recreate the same box layout in another
  2129. program, for example.
  2130. Note that this option only applies to line-drawing characters which
  2131. _were_ printed by using the VT100 mechanism. Line-drawing characters
  2132. that were received as Unicode code points will paste as Unicode
  2133. always.
  2134. 4.10.6 Combining VT100 line-drawing with UTF-8
  2135. If PuTTY is configured to treat data from the server as encoded in
  2136. UTF-8, then by default it disables the older VT100-style system
  2137. of control sequences that cause the lower-case letters to be
  2138. temporarily replaced by line drawing characters.
  2139. The rationale is that in UTF-8 mode you don't need those control
  2140. sequences anyway, because all the line-drawing characters they
  2141. access are available as Unicode characters already, so there's no
  2142. need for applications to put the terminal into a special state to
  2143. get at them.
  2144. Also, it removes a risk of the terminal _accidentally_ getting into
  2145. that state: if you accidentally write uncontrolled binary data to a
  2146. non-UTF-8 terminal, it can be surprisingly common to find that your
  2147. next shell prompt appears as a sequence of line-drawing characters
  2148. and then you have to remember or look up how to get out of that
  2149. mode. So by default, UTF-8 mode simply doesn't _have_ a confusing
  2150. mode like that to get into, accidentally or on purpose.
  2151. However, not all applications will see it that way. Even UTF-8
  2152. terminal users will still sometimes have to run software that tries
  2153. to print line-drawing characters in the old-fashioned way. So the
  2154. configuration option `Enable VT100 line drawing even in UTF-8 mode'
  2155. puts PuTTY into a hybrid mode in which it understands the VT100-
  2156. style control sequences that change the meaning of the ASCII lower
  2157. case letters, _and_ understands UTF-8.
  2158. 4.11 The Selection panel
  2159. The Selection panel allows you to control the way copy and paste
  2160. work in the PuTTY window.
  2161. 4.11.1 Changing the actions of the mouse buttons
  2162. PuTTY's copy and paste mechanism is by default modelled on the Unix
  2163. `xterm' application. The X Window System uses a three-button mouse,
  2164. and the convention in that system is that the left button selects,
  2165. the right button extends an existing selection, and the middle
  2166. button pastes.
  2167. Windows often only has two mouse buttons, so when run on
  2168. Windows, PuTTY is configurable. In PuTTY's default configuration
  2169. (`Compromise'), the _right_ button pastes, and the _middle_ button
  2170. (if you have one) extends a selection.
  2171. If you have a three-button mouse and you are already used to the
  2172. `xterm' arrangement, you can select it using the `Action of mouse
  2173. buttons' control.
  2174. Alternatively, with the `Windows' option selected, the middle button
  2175. extends, and the right button brings up a context menu (on which one
  2176. of the options is `Paste'). (This context menu is always available
  2177. by holding down Ctrl and right-clicking, regardless of the setting
  2178. of this option.)
  2179. (When PuTTY itself is running on Unix, it follows the X Window
  2180. System convention.)
  2181. 4.11.2 `Shift overrides application's use of mouse'
  2182. PuTTY allows the server to send control codes that let it take
  2183. over the mouse and use it for purposes other than copy and paste.
  2184. Applications which use this feature include the text-mode web
  2185. browser `links', the Usenet newsreader `trn' version 4, and the file
  2186. manager `mc' (Midnight Commander).
  2187. When running one of these applications, pressing the mouse buttons
  2188. no longer performs copy and paste. If you do need to copy and paste,
  2189. you can still do so if you hold down Shift while you do your mouse
  2190. clicks.
  2191. However, it is possible in theory for applications to even detect
  2192. and make use of Shift + mouse clicks. We don't know of any
  2193. applications that do this, but in case someone ever writes one,
  2194. unchecking the `Shift overrides application's use of mouse' checkbox
  2195. will cause Shift + mouse clicks to go to the server as well (so that
  2196. mouse-driven copy and paste will be completely disabled).
  2197. If you want to prevent the application from taking over the mouse at
  2198. all, you can do this using the Features control panel; see section
  2199. 4.6.2.
  2200. 4.11.3 Default selection mode
  2201. As described in section 3.1.1, PuTTY has two modes of selecting
  2202. text to be copied to the clipboard. In the default mode (`Normal'),
  2203. dragging the mouse from point A to point B selects to the end of
  2204. the line containing A, all the lines in between, and from the very
  2205. beginning of the line containing B. In the other mode (`Rectangular
  2206. block'), dragging the mouse between two points defines a rectangle,
  2207. and everything within that rectangle is copied.
  2208. Normally, you have to hold down Alt while dragging the mouse to
  2209. select a rectangular block. Using the `Default selection mode'
  2210. control, you can set rectangular selection as the default, and then
  2211. you have to hold down Alt to get the _normal_ behaviour.
  2212. 4.11.4 Assigning copy and paste actions to clipboards
  2213. Here you can configure which clipboard(s) are written or read by
  2214. PuTTY's various copy and paste actions.
  2215. Most platforms, including Windows, have a single system clipboard.
  2216. On these platforms, PuTTY provides a second clipboard-like
  2217. facility by permitting you to paste the text you last selected in
  2218. _this window_, whether or not it is currently also in the system
  2219. clipboard. This is not enabled by default.
  2220. The X Window System (which underlies most Unix graphical
  2221. interfaces) provides multiple clipboards (or `selections'), and
  2222. many applications support more than one of them by a different user
  2223. interface mechanism. When PuTTY itself is running on Unix, it has
  2224. more configurability relating to these selections.
  2225. The two most commonly used selections are called `PRIMARY' and
  2226. `CLIPBOARD'; in applications supporting both, the usual behaviour
  2227. is that PRIMARY is used by mouse-only actions (selecting text
  2228. automatically copies it to PRIMARY, and middle-clicking pastes from
  2229. PRIMARY), whereas CLIPBOARD is used by explicit Copy and Paste menu
  2230. items or keypresses such as Ctrl-C and Ctrl-V.
  2231. 4.11.4.1 `Auto-copy selected text'
  2232. The checkbox `Auto-copy selected text to system clipboard' controls
  2233. whether or not selecting text in the PuTTY terminal window
  2234. automatically has the side effect of copying it to the system
  2235. clipboard, without requiring a separate user interface action.
  2236. On X, the wording of this option is changed slightly so that
  2237. `CLIPBOARD' is mentioned in place of the `system clipboard'. Text
  2238. selected in the terminal window will _always_ be automatically
  2239. placed in the PRIMARY selection, as is conventional, but if you tick
  2240. this box, it will _also_ be placed in `CLIPBOARD' at the same time.
  2241. 4.11.4.2 Choosing a clipboard for UI actions
  2242. PuTTY has three user-interface actions which can be configured to
  2243. paste into the terminal (not counting menu items). You can click
  2244. whichever mouse button (if any) is configured to paste (see section
  2245. 4.11.1); you can press Shift-Ins; or you can press Ctrl-Shift-V,
  2246. although that action is not enabled by default.
  2247. You can configure which of the available clipboards each of these
  2248. actions pastes from (including turning the paste action off
  2249. completely). On platforms with a single system clipboard (such as
  2250. Windows), the available options are to paste from that clipboard
  2251. or to paste from PuTTY's internal memory of the last selected text
  2252. within that window. On X, the standard options are CLIPBOARD or
  2253. PRIMARY.
  2254. (PRIMARY is conceptually similar in that it _also_ refers to the
  2255. last selected text - just across all applications instead of just
  2256. this window.)
  2257. The two keyboard options each come with a corresponding key to copy
  2258. _to_ the same clipboard. Whatever you configure Shift-Ins to paste
  2259. from, Ctrl-Ins will copy to the same location; similarly, Ctrl-
  2260. Shift-C will copy to whatever Ctrl-Shift-V pastes from.
  2261. On X, you can also enter a selection name of your choice. For
  2262. example, there is a rarely-used standard selection called
  2263. `SECONDARY', which Emacs (for example) can work with if you hold
  2264. down the Meta key while dragging to select or clicking to paste; if
  2265. you configure a PuTTY keyboard action to access this clipboard, then
  2266. you can interoperate with other applications' use of it. Another
  2267. thing you could do would be to invent a clipboard name yourself, to
  2268. create a special clipboard shared _only_ between instances of PuTTY,
  2269. or between just instances configured in that particular way.
  2270. 4.11.5 `Permit control characters in pasted text'
  2271. It is possible for the clipboard to contain not just text (with
  2272. newlines and tabs) but also control characters such as ESC which
  2273. could have surprising effects if pasted into a terminal session,
  2274. depending on what program is running on the server side. Copying
  2275. text from a mischievous web page could put such characters onto the
  2276. clipboard.
  2277. By default, PuTTY filters out the more unusual control characters,
  2278. only letting through the more obvious text-formatting characters
  2279. (newlines, tab, backspace, and DEL).
  2280. Setting this option stops this filtering; on paste, any character
  2281. on the clipboard is sent to the session uncensored. This might be
  2282. useful if you are deliberately using control character pasting as a
  2283. simple form of scripting, for instance.
  2284. 4.12 The Copy panel
  2285. The Copy configuration panel controls behaviour specifically related
  2286. to copying from the terminal window to the clipboard.
  2287. 4.12.1 Character classes
  2288. PuTTY will select a word at a time in the terminal window if you
  2289. double-click to begin the drag. This section allows you to control
  2290. precisely what is considered to be a word.
  2291. Each character is given a _class_, which is a small number
  2292. (typically 0, 1 or 2). PuTTY considers a single word to be any
  2293. number of adjacent characters in the same class. So by modifying the
  2294. assignment of characters to classes, you can modify the word-by-word
  2295. selection behaviour.
  2296. In the default configuration, the character classes are:
  2297. - Class 0 contains white space and control characters.
  2298. - Class 1 contains most punctuation.
  2299. - Class 2 contains letters, numbers and a few pieces of
  2300. punctuation (the double quote, minus sign, period, forward slash
  2301. and underscore).
  2302. So, for example, if you assign the `@' symbol into character class
  2303. 2, you will be able to select an e-mail address with just a double
  2304. click.
  2305. In order to adjust these assignments, you start by selecting a group
  2306. of characters in the list box. Then enter a class number in the edit
  2307. box below, and press the `Set' button.
  2308. This mechanism currently only covers ASCII characters, because it
  2309. isn't feasible to expand the list to cover the whole of Unicode.
  2310. Character class definitions can be modified by control sequences
  2311. sent by the server. This configuration option controls the _default_
  2312. state, which will be restored when you reset the terminal (see
  2313. section 3.1.3.6). However, if you modify this option in mid-session
  2314. using `Change Settings', it will take effect immediately.
  2315. 4.12.2 Copying in Rich Text Format
  2316. If you enable `Copy to clipboard in RTF as well as plain text',
  2317. PuTTY will write formatting information to the clipboard as well
  2318. as the actual text you copy. The effect of this is that if you
  2319. paste into (say) a word processor, the text will appear in the word
  2320. processor in the same font, colour, and style (e.g. bold, underline)
  2321. PuTTY was using to display it.
  2322. This option can easily be inconvenient, so by default it is
  2323. disabled.
  2324. 4.13 The Colours panel
  2325. The Colours panel allows you to control PuTTY's use of colour.
  2326. 4.13.1 `Allow terminal to specify ANSI colours'
  2327. This option is enabled by default. If it is disabled, PuTTY will
  2328. ignore any control sequences sent by the server to request coloured
  2329. text.
  2330. If you have a particularly garish application, you might want to
  2331. turn this option off and make PuTTY only use the default foreground
  2332. and background colours.
  2333. 4.13.2 `Allow terminal to use xterm 256-colour mode'
  2334. This option is enabled by default. If it is disabled, PuTTY will
  2335. ignore any control sequences sent by the server which use the
  2336. extended 256-colour mode supported by recent versions of xterm.
  2337. If you have an application which is supposed to use 256-colour mode
  2338. and it isn't working, you may find you need to tell your server that
  2339. your terminal supports 256 colours. On Unix, you do this by ensuring
  2340. that the setting of TERM describes a 256-colour-capable terminal.
  2341. You can check this using a command such as `infocmp':
  2342. $ infocmp | grep colors
  2343. colors#256, cols#80, it#8, lines#24, pairs#256,
  2344. If you do not see `colors#256' in the output, you may need to change
  2345. your terminal setting. On modern Linux machines, you could try
  2346. `xterm-256color'.
  2347. 4.13.3 `Allow terminal to use 24-bit colour'
  2348. This option is enabled by default. If it is disabled, PuTTY will
  2349. ignore any control sequences sent by the server which use the
  2350. control sequences supported by modern terminals to specify arbitrary
  2351. 24-bit RGB colour value.
  2352. 4.13.4 `Indicate bolded text by changing...'
  2353. When the server sends a control sequence indicating that some text
  2354. should be displayed in bold, PuTTY can handle this in several ways.
  2355. It can either change the font for a bold version, or use the same
  2356. font in a brighter colour, or it can do both (brighten the colour
  2357. _and_ embolden the font). This control lets you choose which.
  2358. By default bold is indicated by colour, so non-bold text is
  2359. displayed in light grey and bold text is displayed in bright white
  2360. (and similarly in other colours). If you change the setting to `The
  2361. font' box, bold and non-bold text will be displayed in the same
  2362. colour, and instead the font will change to indicate the difference.
  2363. If you select `Both', the font and the colour will both change.
  2364. Some applications rely on `bold black' being distinguishable from a
  2365. black background; if you choose `The font', their text may become
  2366. invisible.
  2367. 4.13.5 `Attempt to use logical palettes'
  2368. Logical palettes are a mechanism by which a Windows application
  2369. running on an 8-bit colour display can select precisely the colours
  2370. it wants instead of going with the Windows standard defaults.
  2371. If you are not getting the colours you ask for on an 8-bit display,
  2372. you can try enabling this option. However, be warned that it's never
  2373. worked very well.
  2374. 4.13.6 `Use system colours'
  2375. Enabling this option will cause PuTTY to ignore the configured
  2376. colours for `Default Background/Foreground' and `Cursor Colour/Text'
  2377. (see section 4.13.7), instead going with the system-wide defaults.
  2378. Note that non-bold and bold text will be the same colour if this
  2379. option is enabled. You might want to change to indicating bold text
  2380. by font changes (see section 4.13.4).
  2381. 4.13.7 Adjusting the colours in the terminal window
  2382. The main colour control allows you to specify exactly what colours
  2383. things should be displayed in. To modify one of the PuTTY colours,
  2384. use the list box to select which colour you want to modify. The
  2385. RGB values for that colour will appear on the right-hand side of
  2386. the list box. Now, if you press the `Modify' button, you will be
  2387. presented with a colour selector, in which you can choose a new
  2388. colour to go in place of the old one. (You may also edit the RGB
  2389. values directly in the edit boxes, if you wish; each value is an
  2390. integer from 0 to 255.)
  2391. PuTTY allows you to set the cursor colour, the default foreground
  2392. and background, and the precise shades of all the ANSI configurable
  2393. colours (black, red, green, yellow, blue, magenta, cyan, and white).
  2394. You can also modify the precise shades used for the bold versions
  2395. of these colours; these are used to display bold text if you have
  2396. chosen to indicate that by colour (see section 4.13.4), and can also
  2397. be used if the server asks specifically to use them. (Note that
  2398. `Default Bold Background' is _not_ the background colour used for
  2399. bold text; it is only used if the server specifically asks for a
  2400. bold background.)
  2401. 4.14 The Connection panel
  2402. The Connection panel allows you to configure options that apply to
  2403. more than one type of connection.
  2404. 4.14.1 Using keepalives to prevent disconnection
  2405. If you find your sessions are closing unexpectedly (most often with
  2406. `Connection reset by peer') after they have been idle for a while,
  2407. you might want to try using this option.
  2408. Some network routers and firewalls need to keep track of all
  2409. connections through them. Usually, these firewalls will assume a
  2410. connection is dead if no data is transferred in either direction
  2411. after a certain time interval. This can cause PuTTY sessions to be
  2412. unexpectedly closed by the firewall if no traffic is seen in the
  2413. session for some time.
  2414. The keepalive option (`Seconds between keepalives') allows you
  2415. to configure PuTTY to send data through the session at regular
  2416. intervals, in a way that does not disrupt the actual terminal
  2417. session. If you find your firewall is cutting idle connections off,
  2418. you can try entering a non-zero value in this field. The value
  2419. is measured in seconds; so, for example, if your firewall cuts
  2420. connections off after ten minutes then you might want to enter 300
  2421. seconds (5 minutes) in the box.
  2422. Note that keepalives are not always helpful. They help if you have
  2423. a firewall which drops your connection after an idle period; but
  2424. if the network between you and the server suffers from breaks in
  2425. connectivity then keepalives can actually make things worse. If a
  2426. session is idle, and connectivity is temporarily lost between the
  2427. endpoints, but the connectivity is restored before either side
  2428. tries to send anything, then there will be no problem - neither
  2429. endpoint will notice that anything was wrong. However, if one side
  2430. does send something during the break, it will repeatedly try to
  2431. re-send, and eventually give up and abandon the connection. Then
  2432. when connectivity is restored, the other side will find that the
  2433. first side doesn't believe there is an open connection any more.
  2434. Keepalives can make this sort of problem worse, because they
  2435. increase the probability that PuTTY will attempt to send data during
  2436. a break in connectivity. (Other types of periodic network activity
  2437. can cause this behaviour; in particular, SSH-2 re-keys can have this
  2438. effect. See section 4.18.2.)
  2439. Therefore, you might find that keepalives help connection loss,
  2440. or you might find they make it worse, depending on what _kind_ of
  2441. network problems you have between you and the server.
  2442. Keepalives are only supported in Telnet and SSH; the Rlogin, SUPDUP,
  2443. and Raw protocols offer no way of implementing them. (For an
  2444. alternative, see section 4.14.3.)
  2445. Note that if you are using SSH-1 and the server has a bug that makes
  2446. it unable to deal with SSH-1 ignore messages (see section 4.27.14),
  2447. enabling keepalives will have no effect.
  2448. 4.14.2 `Disable Nagle's algorithm'
  2449. Nagle's algorithm is a detail of TCP/IP implementations that tries
  2450. to minimise the number of small data packets sent down a network
  2451. connection. With Nagle's algorithm enabled, PuTTY's bandwidth usage
  2452. will be slightly more efficient; with it disabled, you may find you
  2453. get a faster response to your keystrokes when connecting to some
  2454. types of server.
  2455. The Nagle algorithm is disabled by default for interactive
  2456. connections.
  2457. 4.14.3 `Enable TCP keepalives'
  2458. _NOTE:_ TCP keepalives should not be confused with the application-
  2459. level keepalives described in section 4.14.1. If in doubt, you
  2460. probably want application-level keepalives; TCP keepalives are
  2461. provided for completeness.
  2462. The idea of TCP keepalives is similar to application-level
  2463. keepalives, and the same caveats apply. The main differences are:
  2464. - TCP keepalives are available on _all_ network connection types,
  2465. including Raw, Rlogin, and SUPDUP.
  2466. - The interval between TCP keepalives is usually much longer,
  2467. typically two hours; this is set by the operating system, and
  2468. cannot be configured within PuTTY.
  2469. - If the operating system does not receive a response to a
  2470. keepalive, it may send out more in quick succession and
  2471. terminate the connection if no response is received.
  2472. TCP keepalives may be more useful for ensuring that half-open
  2473. connections are terminated than for keeping a connection alive.
  2474. TCP keepalives are disabled by default.
  2475. 4.14.4 `Internet protocol version'
  2476. This option allows the user to select between the old and new
  2477. Internet protocols and addressing schemes (IPv4 and IPv6). The
  2478. selected protocol will be used for most outgoing network connections
  2479. (including connections to proxies); however, tunnels have their own
  2480. configuration, for which see section 4.26.2.
  2481. The default setting is `Auto', which means PuTTY will do something
  2482. sensible and try to guess which protocol you wanted. (If you specify
  2483. a literal Internet address, it will use whichever protocol that
  2484. address implies. If you provide a hostname, it will see what kinds
  2485. of address exist for that hostname; it will use IPv6 if there is an
  2486. IPv6 address available, and fall back to IPv4 if not.)
  2487. If you need to force PuTTY to use a particular protocol, you can
  2488. explicitly set this to `IPv4' or `IPv6'.
  2489. 4.14.5 `Logical name of remote host'
  2490. This allows you to tell PuTTY that the host it will really end up
  2491. connecting to is different from where it thinks it is making a
  2492. network connection.
  2493. You might use this, for instance, if you had set up an SSH port
  2494. forwarding in one PuTTY session so that connections to some
  2495. arbitrary port (say, localhost port 10022) were forwarded to a
  2496. second machine's SSH port (say, foovax port 22), and then started a
  2497. second PuTTY connecting to the forwarded port.
  2498. In normal usage, the second PuTTY will access the host key cache
  2499. under the host name and port it actually connected to (i.e.
  2500. localhost port 10022 in this example). Using the logical host name
  2501. option, however, you can configure the second PuTTY to cache the
  2502. host key under the name of the host _you_ know that it's _really_
  2503. going to end up talking to (here `foovax').
  2504. This can be useful if you expect to connect to the same actual
  2505. server through many different channels (perhaps because your port
  2506. forwarding arrangements keep changing): by consistently setting the
  2507. logical host name, you can arrange that PuTTY will not keep asking
  2508. you to reconfirm its host key. Conversely, if you expect to use the
  2509. same local port number for port forwardings to lots of different
  2510. servers, you probably didn't want any particular server's host
  2511. key cached under that local port number. (For this latter case,
  2512. you could instead explicitly configure host keys in the relevant
  2513. sessions; see section 4.19.3.)
  2514. If you just enter a host name for this option, PuTTY will cache the
  2515. SSH host key under the default SSH port for that host, irrespective
  2516. of the port you really connected to (since the typical scenario is
  2517. like the above example: you connect to a silly real port number and
  2518. your connection ends up forwarded to the normal port-22 SSH server
  2519. of some other machine). To override this, you can append a port
  2520. number to the logical host name, separated by a colon. E.g. entering
  2521. `foovax:2200' as the logical host name will cause the host key to be
  2522. cached as if you had connected to port 2200 of `foovax'.
  2523. If you provide a host name using this option, it is also displayed
  2524. in other locations which contain the remote host name, such as the
  2525. default window title and the default SSH password prompt. This
  2526. reflects the fact that this is the host you're _really_ connecting
  2527. to, which is more important than the mere means you happen to be
  2528. using to contact that host. (This applies even if you're using a
  2529. protocol other than SSH.)
  2530. 4.15 The Data panel
  2531. The Data panel allows you to configure various pieces of data which
  2532. can be sent to the server to affect your connection at the far end.
  2533. Each option on this panel applies to more than one protocol.
  2534. Options which apply to only one protocol appear on that protocol's
  2535. configuration panels.
  2536. 4.15.1 `Auto-login username'
  2537. All three of the SSH, Telnet, and Rlogin protocols allow you to
  2538. specify what user name you want to log in as, without having to type
  2539. it explicitly every time. (Some Telnet servers don't support this.)
  2540. In this box you can type that user name.
  2541. 4.15.2 Use of system username
  2542. When the previous box (section 4.15.1) is left blank, by default,
  2543. PuTTY will prompt for a username at the time you make a connection.
  2544. In some environments, such as the networks of large organisations
  2545. implementing single sign-on, a more sensible default may be to use
  2546. the name of the user logged in to the local operating system (if
  2547. any); this is particularly likely to be useful with GSSAPI key
  2548. exchange and user authentication (see section 4.23 and section
  2549. 4.18.1.1). This control allows you to change the default behaviour.
  2550. The current system username is displayed in the dialog as a
  2551. convenience. It is not saved in the configuration; if a saved
  2552. session is later used by a different user, that user's name will be
  2553. used.
  2554. 4.15.3 `Terminal-type string'
  2555. Most servers you might connect to with PuTTY are designed to be
  2556. connected to from lots of different types of terminal. In order to
  2557. send the right control sequences to each one, the server will need
  2558. to know what type of terminal it is dealing with. Therefore, each
  2559. of the SSH, Telnet, and Rlogin protocols allow a text string to be
  2560. sent down the connection describing the terminal. On a Unix server,
  2561. this selects an entry from the `termcap' or `terminfo' database that
  2562. tells applications what control sequences to send to the terminal,
  2563. and what character sequences to expect the keyboard to generate.
  2564. PuTTY attempts to emulate the Unix `xterm' program, and by default
  2565. it reflects this by sending `xterm' as a terminal-type string. If
  2566. you find this is not doing what you want - perhaps the remote system
  2567. reports `Unknown terminal type' - you could try setting this to
  2568. something different, such as `vt220'.
  2569. If you're not sure whether a problem is due to the terminal type
  2570. setting or not, you probably need to consult the manual for your
  2571. application or your server.
  2572. 4.15.4 `Terminal speeds'
  2573. The Telnet, Rlogin, and SSH protocols allow the client to specify
  2574. terminal speeds to the server.
  2575. This parameter does _not_ affect the actual speed of the connection,
  2576. which is always `as fast as possible'; it is just a hint that is
  2577. sometimes used by server software to modify its behaviour. For
  2578. instance, if a slow speed is indicated, the server may switch to a
  2579. less bandwidth-hungry display mode.
  2580. The value is usually meaningless in a network environment, but PuTTY
  2581. lets you configure it, in case you find the server is reacting badly
  2582. to the default value.
  2583. The format is a pair of numbers separated by a comma, for instance,
  2584. `38400,38400'. The first number represents the output speed (_from_
  2585. the server) in bits per second, and the second is the input speed
  2586. (_to_ the server). (Only the first is used in the Rlogin protocol.)
  2587. This option has no effect on Raw connections.
  2588. 4.15.5 Setting environment variables on the server
  2589. The Telnet protocol provides a means for the client to pass
  2590. environment variables to the server. Many Telnet servers have
  2591. stopped supporting this feature due to security flaws, but PuTTY
  2592. still supports it for the benefit of any servers which have found
  2593. other ways around the security problems than just disabling the
  2594. whole mechanism.
  2595. Version 2 of the SSH protocol also provides a similar mechanism,
  2596. which is easier to implement without security flaws. Newer SSH-2
  2597. servers are more likely to support it than older ones.
  2598. This configuration data is not used in the SSH-1, rlogin or raw
  2599. protocols.
  2600. To add an environment variable to the list transmitted down the
  2601. connection, you enter the variable name in the `Variable' box, enter
  2602. its value in the `Value' box, and press the `Add' button. To remove
  2603. one from the list, select it in the list box and press `Remove'.
  2604. 4.16 The Proxy panel
  2605. The Proxy panel allows you to configure PuTTY to use various types
  2606. of proxy in order to make its network connections. The settings in
  2607. this panel affect the primary network connection forming your PuTTY
  2608. session, and also any extra connections made as a result of SSH port
  2609. forwarding (see section 3.5).
  2610. Note that unlike some software (such as web browsers), PuTTY does
  2611. not attempt to automatically determine whether to use a proxy and
  2612. (if so) which one to use for a given destination. If you need to use
  2613. a proxy, it must always be explicitly configured.
  2614. 4.16.1 Setting the proxy type
  2615. The `Proxy type' drop-down allows you to configure what type of
  2616. proxy you want PuTTY to use for its network connections. The default
  2617. setting is `None'; in this mode no proxy is used for any connection.
  2618. - Selecting `HTTP CONNECT' allows you to proxy your connections
  2619. through a web server supporting the HTTP CONNECT command, as
  2620. documented in RFC 2817.
  2621. - Selecting `SOCKS 4' or `SOCKS 5' allows you to proxy your
  2622. connections through a SOCKS server.
  2623. - Many firewalls implement a less formal type of proxy in
  2624. which a user can make a Telnet or TCP connection directly
  2625. to the firewall machine and enter a command such as
  2626. `connect myhost.com 22' to connect through to an external host.
  2627. Selecting `Telnet' allows you to tell PuTTY to use this type
  2628. of proxy, with the precise command specified as described in
  2629. section 4.16.5.
  2630. - There are several ways to use a SSH server as a proxy. All of
  2631. these cause PuTTY to make a secondary SSH connection to the
  2632. proxy host (sometimes called a `jump host' in this context).
  2633. The `Proxy hostname' field will be interpreted as the name of a
  2634. PuTTY saved session if one exists, or a hostname if not. This
  2635. allows multi-hop jump paths, if the referenced saved session is
  2636. itself configured to use an SSH proxy; and it allows combining
  2637. SSH and non-SSH proxying.
  2638. - `SSH to proxy and use port forwarding' causes PuTTY to use
  2639. the secondary SSH connection to open a port-forwarding
  2640. channel to the final destination host (similar to OpenSSH's
  2641. -J option).
  2642. - `SSH to proxy and execute a command' causes PuTTY to run an
  2643. arbitrary remote command on the proxy SSH server and use
  2644. that command's standard input and output streams to run
  2645. the primary connection over. The remote command line is
  2646. specified as described in section 4.16.5.
  2647. - `SSH to proxy and invoke a subsystem' is similar but causes
  2648. PuTTY to start an SSH `subsystem' rather than an ordinary
  2649. command line. This might be useful with a specially set up
  2650. SSH proxy server.
  2651. - Selecting `Local' allows you to specify an arbitrary command
  2652. on the local machine to act as a proxy. When the session is
  2653. started, instead of creating a TCP connection, PuTTY runs the
  2654. command (specified in section 4.16.5), and uses its standard
  2655. input and output streams.
  2656. This could be used, for instance, to talk to some kind of
  2657. network proxy that PuTTY does not natively support; or you could
  2658. tunnel a connection over something other than TCP/IP entirely.
  2659. You can also enable this mode on the command line; see section
  2660. 3.11.3.27.
  2661. 4.16.2 Excluding parts of the network from proxying
  2662. Typically you will only need to use a proxy to connect to non-local
  2663. parts of your network; for example, your proxy might be required for
  2664. connections outside your company's internal network. In the `Exclude
  2665. Hosts/IPs' box you can enter ranges of IP addresses, or ranges of
  2666. DNS names, for which PuTTY will avoid using the proxy and make a
  2667. direct connection instead.
  2668. The `Exclude Hosts/IPs' box may contain more than one exclusion
  2669. range, separated by commas. Each range can be an IP address or a DNS
  2670. name, with a `*' character allowing wildcards. For example:
  2671. *.example.com
  2672. This excludes any host with a name ending in `.example.com' from
  2673. proxying.
  2674. 192.168.88.*
  2675. This excludes any host with an IP address starting with 192.168.88
  2676. from proxying.
  2677. 192.168.88.*,*.example.com
  2678. This excludes both of the above ranges at once.
  2679. Connections to the local host (the host name `localhost', and any
  2680. loopback IP address) are never proxied, even if the proxy exclude
  2681. list does not explicitly contain them. It is very unlikely that this
  2682. behaviour would ever cause problems, but if it does you can change
  2683. it by enabling `Consider proxying local host connections'.
  2684. Note that if you are doing DNS at the proxy (see section 4.16.3),
  2685. you should make sure that your proxy exclusion settings do not
  2686. depend on knowing the IP address of a host. If the name is passed on
  2687. to the proxy without PuTTY looking it up, it will never know the IP
  2688. address and cannot check it against your list.
  2689. 4.16.3 Name resolution when using a proxy
  2690. If you are using a proxy to access a private network, it can make a
  2691. difference whether DNS name resolution is performed by PuTTY itself
  2692. (on the client machine) or performed by the proxy.
  2693. The `Do DNS name lookup at proxy end' configuration option allows
  2694. you to control this. If you set it to `No', PuTTY will always do its
  2695. own DNS, and will always pass an IP address to the proxy. If you set
  2696. it to `Yes', PuTTY will always pass host names straight to the proxy
  2697. without trying to look them up first.
  2698. If you set this option to `Auto' (the default), PuTTY will do
  2699. something it considers appropriate for each type of proxy. Most
  2700. types of proxy (HTTP, SOCK5, SSH, Telnet, and local) will have host
  2701. names passed straight to them; SOCKS4 proxies will not.
  2702. Note that if you are doing DNS at the proxy, you should make sure
  2703. that your proxy exclusion settings (see section 4.16.2) do not
  2704. depend on knowing the IP address of a host. If the name is passed on
  2705. to the proxy without PuTTY looking it up, it will never know the IP
  2706. address and cannot check it against your list.
  2707. The original SOCKS 4 protocol does not support proxy-side DNS. There
  2708. is a protocol extension (SOCKS 4A) which does support it, but not
  2709. all SOCKS 4 servers provide this extension. If you enable proxy DNS
  2710. and your SOCKS 4 server cannot deal with it, this might be why.
  2711. If you want to avoid PuTTY making _any_ DNS query related to your
  2712. destination host name (for example, because your local DNS resolver
  2713. is very slow to return a negative response in that situation), then
  2714. as well as setting this control to `Yes', you may also need to
  2715. turn off GSSAPI authentication and GSSAPI key exchange in SSH (see
  2716. section 4.23 and section 4.18.1.1 respectively). This is because
  2717. GSSAPI setup also involves a DNS query for the destination host
  2718. name, and that query is performed by the separate GSSAPI library, so
  2719. PuTTY can't override or reconfigure it.
  2720. 4.16.4 Username and password
  2721. You can enter a username and a password in the `Username' and
  2722. `Password' boxes, which will be used if your proxy requires
  2723. authentication.
  2724. Note that if you save your session, the proxy password will be saved
  2725. in plain text, so anyone who can access your PuTTY configuration
  2726. data will be able to discover it.
  2727. If PuTTY discovers that it needs a proxy username or password
  2728. and you have not specified one here, PuTTY will prompt for it
  2729. interactively in the terminal window.
  2730. Authentication is not fully supported for all forms of proxy:
  2731. - Username and password authentication is supported for HTTP
  2732. proxies and SOCKS 5 proxies.
  2733. - With SOCKS 5, authentication is via CHAP if the proxy
  2734. supports it (this is not supported in PuTTYtel); otherwise
  2735. the password is sent to the proxy in plain text.
  2736. - With HTTP proxying, authentication is via `HTTP Digest'
  2737. if possible (again, not supported in PuTTYtel), or `HTTP
  2738. Basic'. In the latter case, the password is sent to the
  2739. proxy in plain text.
  2740. - SOCKS 4 can use the `Username' field, but does not support
  2741. passwords.
  2742. - SSH proxying can use all the same forms of SSH authentication
  2743. supported by PuTTY for its main connection. If the SSH server
  2744. requests password authentication, any configured proxy password
  2745. will be used, but other authentication methods such as public
  2746. keys and GSSAPI will be tried first, just as for a primary
  2747. SSH connection, and if they require credentials such as a key
  2748. passphrase, PuTTY will interactively prompt for these.
  2749. - You can specify a way to include a username and password in the
  2750. Telnet/Local proxy command (see section 4.16.5). If you do so,
  2751. and don't also specify the actual username and/or password in
  2752. the configuration, PuTTY will interactively prompt for them.
  2753. 4.16.5 Specifying the Telnet, SSH, or Local proxy command
  2754. If you are using the Telnet proxy type, the usual command required
  2755. by the firewall's Telnet server is `connect', followed by a host
  2756. name and a port number. If your proxy needs a different command, you
  2757. can enter an alternative in the `Command to send to proxy' box.
  2758. If you are using the Local proxy type, the local command to run is
  2759. specified here.
  2760. If you are using the `SSH to proxy and execute a command' type,
  2761. the command to run on the SSH proxy server is specified here.
  2762. Similarly, if you are using `SSH to proxy and invoke a subsystem',
  2763. the subsystem name is constructed as specified here.
  2764. In this string, you can use `\n' to represent a new-line, `\r' to
  2765. represent a carriage return, `\t' to represent a tab character, and
  2766. `\x' followed by two hex digits to represent any other character.
  2767. `\\' is used to encode the `\' character itself.
  2768. Also, the special strings `%host' and `%port' will be replaced by
  2769. the host name and port number you want to connect to. For Telnet and
  2770. Local proxy types, the strings `%user' and `%pass' will be replaced
  2771. by the proxy username and password (which, if not specified in the
  2772. configuration, will be prompted for) - this does not happen with SSH
  2773. proxy types (because the proxy username/password are used for SSH
  2774. authentication). The strings `%proxyhost' and `%proxyport' will be
  2775. replaced by the host details specified on the _Proxy_ panel, if any
  2776. (this is most likely to be useful for proxy types using a local or
  2777. remote command). To get a literal `%' sign, enter `%%'.
  2778. If a Telnet proxy server prompts for a username and password before
  2779. commands can be sent, you can use a command such as:
  2780. %user\n%pass\nconnect %host %port\n
  2781. This will send your username and password as the first two lines to
  2782. the proxy, followed by a command to connect to the desired host and
  2783. port. Note that if you do not include the `%user' or `%pass' tokens
  2784. in the Telnet command, then anything specified in `Username' and
  2785. `Password' configuration fields will be ignored.
  2786. 4.16.6 Controlling proxy logging
  2787. Often the proxy interaction has its own diagnostic output; this is
  2788. particularly the case for local proxy commands.
  2789. The setting `Print proxy diagnostics in the terminal window' lets
  2790. you control how much of the proxy's diagnostics are printed to the
  2791. main terminal window, along with output from your main session.
  2792. By default (`No'), proxy diagnostics are only sent to the Event Log;
  2793. with `Yes' they are also printed to the terminal, where they may
  2794. get mixed up with your main session. `Only until session starts' is
  2795. a compromise; proxy messages will go to the terminal window until
  2796. the main session is deemed to have started (in a protocol-dependent
  2797. way), which is when they're most likely to be interesting; any
  2798. further proxy-related messages during the session will only go to
  2799. the Event Log.
  2800. 4.17 The SSH panel
  2801. The SSH panel allows you to configure options that only apply to SSH
  2802. sessions.
  2803. 4.17.1 Executing a specific command on the server
  2804. In SSH, you don't have to run a general shell session on the server.
  2805. Instead, you can choose to run a single specific command (such as
  2806. a mail user agent, for example). If you want to do this, enter the
  2807. command in the `Remote command' box.
  2808. Note that most servers will close the session after executing the
  2809. command.
  2810. 4.17.2 `Don't start a shell or command at all'
  2811. If you tick this box, PuTTY will not attempt to run a shell or
  2812. command after connecting to the remote server. You might want to
  2813. use this option if you are only using the SSH connection for port
  2814. forwarding, and your user account on the server does not have the
  2815. ability to run a shell.
  2816. This feature is only available in SSH protocol version 2 (since the
  2817. version 1 protocol assumes you will always want to run a shell).
  2818. This feature can also be enabled using the `-N' command-line option;
  2819. see section 3.11.3.13.
  2820. If you use this feature in Plink, you will not be able to terminate
  2821. the Plink process by any graceful means; the only way to kill it
  2822. will be by pressing Control-C or sending a kill signal from another
  2823. program.
  2824. 4.17.3 `Enable compression'
  2825. This enables data compression in the SSH connection: data sent by
  2826. the server is compressed before sending, and decompressed at the
  2827. client end. Likewise, data sent by PuTTY to the server is compressed
  2828. first and the server decompresses it at the other end. This can help
  2829. make the most of a low-bandwidth connection.
  2830. 4.17.4 `SSH protocol version'
  2831. This allows you to select whether to use SSH protocol version 2 or
  2832. the older version 1.
  2833. You should normally leave this at the default of `2'. As well
  2834. as having fewer features, the older SSH-1 protocol is no longer
  2835. developed, has many known cryptographic weaknesses, and is generally
  2836. not considered to be secure. PuTTY's protocol 1 implementation is
  2837. provided mainly for compatibility, and is no longer being enhanced.
  2838. If a server offers both versions, prefer `2'. If you have some
  2839. server or piece of equipment that only talks SSH-1, select `1' here,
  2840. and do not treat the resulting connection as secure.
  2841. PuTTY will not automatically fall back to the other version of the
  2842. protocol if the server turns out not to match your selection here;
  2843. instead, it will put up an error message and abort the connection.
  2844. This prevents an active attacker downgrading an intended SSH-2
  2845. connection to SSH-1.
  2846. 4.17.5 Sharing an SSH connection between PuTTY tools
  2847. The controls in this box allow you to configure PuTTY to reuse an
  2848. existing SSH connection, where possible.
  2849. The SSH-2 protocol permits you to run multiple data channels over
  2850. the same SSH connection, so that you can log in just once (and do
  2851. the expensive encryption setup just once) and then have more than
  2852. one terminal window open.
  2853. Each instance of PuTTY can still run at most one terminal session,
  2854. but using the controls in this box, you can configure PuTTY to check
  2855. if another instance of itself has already connected to the target
  2856. host, and if so, share that instance's SSH connection instead of
  2857. starting a separate new one.
  2858. To enable this feature, just tick the box `Share SSH connections if
  2859. possible'. Then, whenever you start up a PuTTY session connecting to
  2860. a particular host, it will try to reuse an existing SSH connection
  2861. if one is available. For example, selecting `Duplicate Session' from
  2862. the system menu will launch another session on the same host, and if
  2863. sharing is enabled then it will reuse the existing SSH connection.
  2864. When this mode is in use, the first PuTTY that connected to a given
  2865. server becomes the `upstream', which means that it is the one
  2866. managing the real SSH connection. All subsequent PuTTYs which reuse
  2867. the connection are referred to as `downstreams': they do not connect
  2868. to the real server at all, but instead connect to the upstream PuTTY
  2869. via local inter-process communication methods.
  2870. For this system to be activated, _both_ the upstream and downstream
  2871. instances of PuTTY must have the sharing option enabled.
  2872. The upstream PuTTY can therefore not terminate until all its
  2873. downstreams have closed. This is similar to the effect you get with
  2874. port forwarding or X11 forwarding, in which a PuTTY whose terminal
  2875. session has already finished will still remain open so as to keep
  2876. serving forwarded connections.
  2877. In case you need to configure this system in more detail, there
  2878. are two additional checkboxes which allow you to specify whether a
  2879. particular PuTTY can act as an upstream or a downstream or both.
  2880. (These boxes only take effect if the main `Share SSH connections if
  2881. possible' box is also ticked.) By default both of these boxes are
  2882. ticked, so that multiple PuTTYs started from the same configuration
  2883. will designate one of themselves as the upstream and share a single
  2884. connection; but if for some reason you need a particular PuTTY
  2885. configuration _not_ to be an upstream (e.g. because you definitely
  2886. need it to close promptly) or not to be a downstream (e.g. because
  2887. it needs to do its own authentication using a special private key)
  2888. then you can untick one or the other of these boxes.
  2889. I have referred to `PuTTY' throughout the above discussion, but
  2890. all the other PuTTY tools which make SSH connections can use this
  2891. mechanism too. For example, if PSCP or PSFTP loads a configuration
  2892. with sharing enabled, then it can act as a downstream and use an
  2893. existing SSH connection set up by an instance of GUI PuTTY. The one
  2894. special case is that PSCP and PSFTP will _never_ act as upstreams.
  2895. It is possible to test programmatically for the existence of a live
  2896. upstream using Plink. See section 7.2.3.4.
  2897. 4.18 The Kex panel
  2898. The Kex panel (short for `key exchange') allows you to configure
  2899. options related to SSH-2 key exchange.
  2900. Key exchange occurs at the start of an SSH connection (and
  2901. occasionally thereafter); it establishes a shared secret that
  2902. is used as the basis for all of SSH's security features. It is
  2903. therefore very important for the security of the connection that the
  2904. key exchange is secure.
  2905. Key exchange is a cryptographically intensive process; if either
  2906. the client or the server is a relatively slow machine, the slower
  2907. methods may take several tens of seconds to complete.
  2908. If connection startup is too slow, or the connection hangs
  2909. periodically, you may want to try changing these settings.
  2910. If you don't understand what any of this means, it's safe to leave
  2911. these settings alone.
  2912. This entire panel is only relevant to SSH protocol version 2; none
  2913. of these settings affect SSH-1 at all.
  2914. 4.18.1 Key exchange algorithm selection
  2915. PuTTY supports a variety of SSH-2 key exchange methods, and allows
  2916. you to choose which one you prefer to use; configuration is similar
  2917. to cipher selection (see section 4.20).
  2918. PuTTY currently supports the following key exchange methods:
  2919. - `NTRU Prime / Curve25519 hybrid': `Streamlined NTRU Prime' is
  2920. a lattice-based algorithm intended to resist quantum attacks.
  2921. In this key exchange method, it is run in parallel with a
  2922. conventional Curve25519-based method (one of those included in
  2923. `ECDH'), in such a way that it should be no _less_ secure than
  2924. that commonly-used method, and hopefully also resistant to a new
  2925. class of attacks.
  2926. - `ML-KEM / Curve25519 hybrid' and `ML-KEM NIST ECDH hybrid':
  2927. similar hybrid constructs of ML-KEM, another lattice-based key
  2928. exchange method intended to be quantum-resistant. In the former,
  2929. ML-KEM is hybridised with Curve25519; in the latter, with NIST
  2930. P384 or P256.
  2931. - `ECDH': elliptic curve Diffie-Hellman key exchange, with a
  2932. variety of standard curves and hash algorithms.
  2933. - The original form of Diffie-Hellman key exchange, with a variety
  2934. of well-known groups and hashes:
  2935. - `Group 18', a well-known 8192-bit group, used with the SHA-
  2936. 512 hash function.
  2937. - `Group 17', a well-known 6144-bit group, used with the SHA-
  2938. 512 hash function.
  2939. - `Group 16', a well-known 4096-bit group, used with the SHA-
  2940. 512 hash function.
  2941. - `Group 15', a well-known 3072-bit group, used with the SHA-
  2942. 512 hash function.
  2943. - `Group 14': a well-known 2048-bit group, used with the SHA-
  2944. 256 hash function or, if the server doesn't support that,
  2945. SHA-1.
  2946. - `Group 1': a well-known 1024-bit group, used with the SHA-
  2947. 1 hash function. Neither we nor current SSH standards
  2948. recommend using this method any longer, and it's not used by
  2949. default in new installations; however, it may be the only
  2950. method supported by very old server software.
  2951. - `Diffie-Hellman group exchange': with this method, instead of
  2952. using a fixed group, PuTTY requests that the server suggest a
  2953. group to use for a subsequent Diffie-Hellman key exchange; the
  2954. server can avoid groups known to be weak, and possibly invent
  2955. new ones over time, without any changes required to PuTTY's
  2956. configuration. This key exchange method uses the SHA-256 hash
  2957. or, if the server doesn't support that, SHA-1.
  2958. - `RSA-based key exchange': this requires much less computational
  2959. effort on the part of the client, and somewhat less on the part
  2960. of the server, than Diffie-Hellman key exchange.
  2961. - `GSSAPI key exchange': see section 4.18.1.1.
  2962. If the first algorithm PuTTY finds is below the `warn below here'
  2963. line, you will see a warning box when you make the connection,
  2964. similar to that for cipher selection (see section 4.20).
  2965. 4.18.1.1 GSSAPI-based key exchange
  2966. PuTTY supports a set of key exchange methods that also incorporates
  2967. GSSAPI-based authentication. They are enabled with the `Attempt
  2968. GSSAPI key exchange' checkbox (which also appears on the `GSSAPI'
  2969. panel).
  2970. PuTTY can only perform the GSSAPI-authenticated key exchange methods
  2971. when using Kerberos V5, and not other GSSAPI mechanisms. If the user
  2972. running PuTTY has current Kerberos V5 credentials, then PuTTY will
  2973. select the GSSAPI key exchange methods in preference to any of the
  2974. ordinary SSH key exchange methods configured in the preference list.
  2975. There's a GSSAPI-based equivalent to most of the ordinary methods
  2976. listed in section 4.18.1; server support determines which one will
  2977. be used. (PuTTY's preference order for GSSAPI-authenticated key
  2978. exchange methods is fixed, not controlled by the preference list.)
  2979. The advantage of doing GSSAPI authentication as part of the SSH
  2980. key exchange is apparent when you are using credential delegation
  2981. (see section 4.23.1). The SSH key exchange can be repeated later in
  2982. the session, and this allows your Kerberos V5 credentials (which
  2983. are typically short-lived) to be automatically re-delegated to the
  2984. server when they are refreshed on the client. (This feature is
  2985. commonly referred to as `cascading credentials'.)
  2986. If your server doesn't support GSSAPI key exchange, it may still
  2987. support GSSAPI in the SSH user authentication phase. This will still
  2988. let you log in using your Kerberos credentials, but will only allow
  2989. you to delegate the credentials that are active at the beginning of
  2990. the session; they can't be refreshed automatically later, in a long-
  2991. running session. See section 4.23 for how to control GSSAPI user
  2992. authentication in PuTTY.
  2993. Another effect of GSSAPI key exchange is that it replaces the usual
  2994. SSH mechanism of permanent host keys described in section 2.2. So
  2995. if you use this method, then you won't be asked any interactive
  2996. questions about whether to accept the server's host key. Instead,
  2997. the Kerberos exchange will verify the identity of the host you
  2998. connect to, at the same time as verifying your identity to it.
  2999. 4.18.2 Repeat key exchange
  3000. If the session key negotiated at connection startup is used too much
  3001. or for too long, it may become feasible to mount attacks against the
  3002. SSH connection. Therefore, the SSH-2 protocol specifies that a new
  3003. key exchange should take place every so often; this can be initiated
  3004. by either the client or the server.
  3005. While this renegotiation is taking place, no data can pass through
  3006. the SSH connection, so it may appear to `freeze'. (The occurrence
  3007. of repeat key exchange is noted in the Event Log; see section
  3008. 3.1.3.1.) Usually the same algorithm is used as at the start of the
  3009. connection, with a similar overhead.
  3010. These options control how often PuTTY will initiate a repeat key
  3011. exchange (`rekey'). You can also force a key exchange at any time
  3012. from the Special Commands menu (see section 3.1.3.2).
  3013. - `Max minutes before rekey' specifies the amount of time that
  3014. is allowed to elapse before a rekey is initiated. If this is
  3015. set to zero, PuTTY will not rekey due to elapsed time. The SSH-
  3016. 2 protocol specification recommends a timeout of at most 60
  3017. minutes.
  3018. You might have a need to disable time-based rekeys completely
  3019. for the same reasons that keepalives aren't always helpful. If
  3020. you anticipate suffering a network dropout of several hours in
  3021. the middle of an SSH connection, but were not actually planning
  3022. to send _data_ down that connection during those hours, then an
  3023. attempted rekey in the middle of the dropout will probably cause
  3024. the connection to be abandoned, whereas if rekeys are disabled
  3025. then the connection should in principle survive (in the absence
  3026. of interfering firewalls). See section 4.14.1 for more discussion
  3027. of these issues; for these purposes, rekeys have much the same
  3028. properties as keepalives. (Except that rekeys have cryptographic
  3029. value in themselves, so you should bear that in mind when deciding
  3030. whether to turn them off.) Note, however, the the SSH _server_ can
  3031. still initiate rekeys.
  3032. - `Minutes between GSSAPI checks', if you're using GSSAPI key
  3033. exchange, specifies how often the GSSAPI credential cache is
  3034. checked to see whether new tickets are available for delegation,
  3035. or current ones are near expiration. If forwarding of GSSAPI
  3036. credentials is enabled, PuTTY will try to rekey as necessary to
  3037. keep the delegated credentials from expiring. Frequent checks
  3038. are recommended; rekeying only happens when needed.
  3039. - `Max data before rekey' specifies the amount of data (in bytes)
  3040. that is permitted to flow in either direction before a rekey is
  3041. initiated. If this is set to zero, PuTTY will not rekey due to
  3042. transferred data. The SSH-2 protocol specification recommends a
  3043. limit of at most 1 gigabyte.
  3044. As well as specifying a value in bytes, the following shorthand
  3045. can be used:
  3046. - `1k' specifies 1 kilobyte (1024 bytes).
  3047. - `1M' specifies 1 megabyte (1024 kilobytes).
  3048. - `1G' specifies 1 gigabyte (1024 megabytes).
  3049. Disabling data-based rekeys entirely is a bad idea. The integrity,
  3050. and to a lesser extent, confidentiality of the SSH-2 protocol depend
  3051. in part on rekeys occurring before a 32-bit packet sequence number
  3052. wraps around. Unlike time-based rekeys, data-based rekeys won't
  3053. occur when the SSH connection is idle, so they shouldn't cause the
  3054. same problems. The SSH-1 protocol, incidentally, has even weaker
  3055. integrity protection than SSH-2 without rekeys.
  3056. 4.19 The Host Keys panel
  3057. The Host Keys panel allows you to configure options related to host
  3058. key management.
  3059. Host keys are used to prove the server's identity, and assure you
  3060. that the server is not being spoofed (either by a man-in-the-middle
  3061. attack or by completely replacing it on the network). See section
  3062. 2.2 for a basic introduction to host keys.
  3063. Much of this panel is only relevant to SSH protocol version 2; SSH-1
  3064. only supports one type of host key.
  3065. 4.19.1 Host key type selection
  3066. PuTTY supports a variety of SSH-2 host key types, and allows you
  3067. to choose which one you prefer to use to identify the server.
  3068. Configuration is similar to cipher selection (see section 4.20).
  3069. PuTTY currently supports the following host key types:
  3070. - `Ed25519': Edwards-curve DSA using a twisted Edwards curve with
  3071. modulus 2^255-19.
  3072. - `Ed448': another Edwards-curve DSA type, using a larger elliptic
  3073. curve with a 448-bit instead of 255-bit modulus (so it has a
  3074. higher security level than Ed25519).
  3075. - `ECDSA': elliptic curve DSA using one of the NIST-standardised
  3076. elliptic curves.
  3077. - `DSA': straightforward DSA using modular exponentiation.
  3078. - `RSA': the ordinary RSA algorithm.
  3079. If PuTTY already has one or more host keys stored for the server, it
  3080. will by default prefer to use one of those, even if the server has
  3081. a key type that is higher in the preference order. You can add such
  3082. a key to PuTTY's cache from within an existing session using the
  3083. `Special Commands' menu; see section 3.1.3.2.
  3084. Otherwise, PuTTY will choose a key type based purely on the
  3085. preference order you specify in the configuration.
  3086. If the first key type PuTTY finds is below the `warn below here'
  3087. line, you will see a warning box when you make the connection,
  3088. similar to that for cipher selection (see section 4.20).
  3089. 4.19.2 Preferring known host keys
  3090. By default, PuTTY will adjust the preference order for SSH-2 host
  3091. key algorithms so that any host keys it already knows are moved to
  3092. the top of the list.
  3093. This prevents you from having to check and confirm a new host key
  3094. for a server you already had one for (e.g. because the server has
  3095. generated an alternative key of a type higher in PuTTY's preference
  3096. order, or because you changed the preference order itself).
  3097. However, on the other hand, it can leak information to a listener
  3098. in the network about _whether_ you already know a host key for this
  3099. server.
  3100. For this reason, this policy is configurable. By turning this
  3101. checkbox off, you can reset PuTTY to always use the exact order of
  3102. host key algorithms configured in the preference list described in
  3103. section 4.19.1, so that a listener will find out nothing about what
  3104. keys you had stored.
  3105. 4.19.3 Manually configuring host keys
  3106. In some situations, if PuTTY's automated host key management is not
  3107. doing what you need, you might need to manually configure PuTTY to
  3108. accept a specific host key, or one of a specific set of host keys.
  3109. One reason why you might want to do this is because the host name
  3110. PuTTY is connecting to is using round-robin DNS to return one of
  3111. multiple actual servers, and they all have different host keys. In
  3112. that situation, you might need to configure PuTTY to accept any of
  3113. a list of host keys for the possible servers, while still rejecting
  3114. any key not in that list.
  3115. Another reason is if PuTTY's automated host key management is
  3116. completely unavailable, e.g. because PuTTY (or Plink or PSFTP, etc)
  3117. is running in a Windows environment without access to the Registry.
  3118. In that situation, you will probably want to use the -hostkey
  3119. command-line option to configure the expected host key(s); see
  3120. section 3.11.3.22.
  3121. For situations where PuTTY's automated host key management simply
  3122. picks the wrong host name to store a key under, you may want to
  3123. consider setting a `logical host name' instead; see section 4.14.5.
  3124. To configure manual host keys via the GUI, enter some text
  3125. describing the host key into the edit box in the `Manually configure
  3126. host keys for this connection' container, and press the `Add'
  3127. button. The text will appear in the `Host keys or fingerprints
  3128. to accept' list box. You can remove keys again with the `Remove'
  3129. button.
  3130. The text describing a host key can be in one of the following
  3131. formats:
  3132. - An SHA-256-based host key fingerprint of the form displayed in
  3133. PuTTY's Event Log and host key dialog boxes, i.e. `SHA256:'
  3134. followed by 43 case-sensitive characters.
  3135. - An MD5-based host key fingerprint, i.e. sixteen 2-digit hex
  3136. numbers separated by colons, optionally preceded by the prefix
  3137. `MD5:'. (The case of the characters does not matter.)
  3138. - A base64-encoded blob describing an SSH-2 public key in
  3139. OpenSSH's one-line public key format. How you acquire
  3140. a public key in this format is server-dependent; on an
  3141. OpenSSH server it can typically be found in a location like
  3142. `/etc/ssh/ssh_host_rsa_key.pub'.
  3143. If this box contains at least one host key or fingerprint when PuTTY
  3144. makes an SSH connection, then PuTTY's automated host key management
  3145. is completely bypassed: the connection will be permitted if and only
  3146. if the host key presented by the server is one of the keys listed
  3147. in this box, and the host key store in the Registry will be neither
  3148. read _nor written_, unless you explicitly do so.
  3149. If the box is empty (as it usually is), then PuTTY's automated host
  3150. key management will work as normal.
  3151. 4.19.4 Configuring PuTTY to accept host certificates
  3152. In some environments, the SSH host keys for a lot of servers will
  3153. all be signed in turn by a central `certification authority' (`CA'
  3154. for short). This simplifies host key configuration for users,
  3155. because if they configure their SSH client to accept host keys
  3156. certified by that CA, then they don't need to individually confirm
  3157. each host key the first time they connect to that server.
  3158. In order to do this, press the `Configure host CAs' button in the
  3159. `Host keys' configuration panel. This will launch a secondary
  3160. configuration dialog box where you can configure what CAs PuTTY will
  3161. accept signatures from.
  3162. *Note that this configuration is common to all saved sessions*.
  3163. Everything in the main PuTTY configuration is specific to one
  3164. saved session, and you can prepare a separate session with all the
  3165. configuration different. But there's only one copy of the host CA
  3166. configuration, and it applies to all sessions PuTTY runs, whether
  3167. saved or not.
  3168. (Otherwise, it would be useless - configuring a CA by hand for each
  3169. new host wouldn't be any more convenient than pressing the `confirm'
  3170. button for each new host's host key.)
  3171. To set up a new CA using this config box:
  3172. First, load the CA's public key from a file, or paste it directly
  3173. into the `Public key of certification authority' edit box. If your
  3174. organisation signs its host keys in this way, they will publish the
  3175. public key of their CA so that SSH users can include it in their
  3176. configuration.
  3177. Next, in the `Valid hosts this key is trusted to certify' box,
  3178. configure at least one hostname wildcard to say what servers PuTTY
  3179. should trust this CA to speak for. For example, suppose you work for
  3180. Example Corporation (example.com), and the Example Corporation IT
  3181. department has advertised a CA that signs all the Example internal
  3182. machines' host keys. Then probably you want to trust that CA to
  3183. sign host keys for machines in the domain example.com, but not for
  3184. anything else. So you might enter `*.example.com' into the `Valid
  3185. hosts' box.
  3186. *It's important to limit what the CA key is allowed to sign*. Don't
  3187. just enter `*' in that box! If you do that, you're saying that
  3188. Example Corporation IT department is authorised to sign a host key
  3189. for _anything at all_ you might decide to connect to - even if
  3190. you're connecting out of the company network to a machine somewhere
  3191. else, such as your own personal server. So that configuration would
  3192. enable the Example IT department to act as a `man-in-the-middle'
  3193. between your PuTTY process and your server, and listen in to your
  3194. communications - exactly the thing SSH is supposed to avoid.
  3195. So, if the CA was provided to you by the sysadmins responsible for
  3196. example.com (or whatever), make sure PuTTY will _only_ trust it for
  3197. machines in the example.com domain.
  3198. For the full syntax of the `Valid hosts' expression, see section
  3199. 4.19.4.1.
  3200. Finally, choose an identifying name for this CA; enter that name
  3201. in the `Name for this CA' edit box at the top of the window, and
  3202. press `Save' to record the CA in your configuration. The name you
  3203. chose will appear in the list of saved CAs to the left of the `Save'
  3204. button.
  3205. The identifying name can be anything you like. It's there so that if
  3206. you store multiple certificates you can tell which is which later
  3207. when you want to edit or delete them. It also appears in the PuTTY
  3208. Event Log when a server presents a certificate signed by that CA.
  3209. To reload an existing CA configuration, select it in the list box
  3210. and press `Load'. Then you can make changes, and save it again.
  3211. To remove a CA from your configuration completely, select it in the
  3212. list and press `Delete'.
  3213. 4.19.4.1 Expressions you can enter in `Valid hosts'
  3214. The simplest thing you can enter in the `Valid hosts this key is
  3215. trusted to certify' edit box is just a hostname wildcard such as
  3216. `*.example.com'. This matches any host in any subdomain, so both
  3217. `ssh.example.com' and `login.dept.example.com' would match, but
  3218. `prod.example.net' would not.
  3219. But you can also enter multiple host name wildcards, and port number
  3220. ranges, and make complicated Boolean expressions out of them using
  3221. the operators `&&' for `and', `||' for `or', `!' for `not', and
  3222. parentheses.
  3223. For example, here are some other things you could enter.
  3224. - `*.foo.example.com || *.bar.example.com'. This means the CA is
  3225. trusted to sign the host key for a connection if the host name
  3226. matches `*.foo.example.com' _or_ it matches `*.bar.example.com'.
  3227. In other words, the CA has authority over those two particular
  3228. subdomains of example.com, but not for anything else, like
  3229. www.example.com.
  3230. - `*.example.com && ! *.extrasecure.example.com'. This means
  3231. the CA is trusted to sign the host key for a connection if
  3232. the host name matches `*.example.com' _but does not_ match
  3233. `*.extrasecure.example.com'. (Imagine if there was one top-
  3234. secret set of servers in your company that the main IT
  3235. department didn't have security clearance to administer.)
  3236. - `*.example.com && port:22'. This means the CA is trusted to
  3237. sign the host key for a connection if the host name matches
  3238. `*.example.com' _and_ the port number is 22. SSH servers running
  3239. on other ports would not be covered.
  3240. - `(*.foo.example.com || *.bar.example.com) && port:0-1023'. This
  3241. matches two subdomains of example.com, as before, but _also_
  3242. restricts the port number to the range 0-1023.
  3243. A certificate configuration expression consists of one or more
  3244. individual requirements which can each be a hostname wildcard, a
  3245. single port number, or a port number range, combined together with
  3246. these Boolean operators.
  3247. Unlike other languages such as C, there is no implied priority
  3248. between `&&' and `||'. If you write `A && B || C' (where A, B
  3249. and C are some particular requirements), then PuTTY will report
  3250. a syntax error, because you haven't said which of the `&&' and
  3251. `||' takes priority tightly. You will have to write either
  3252. `(A && B) || C', meaning `both of A and B, or alternatively just C',
  3253. or `A && (B || C)' (`A, and also at least one of B and C'), to make
  3254. it clear.
  3255. 4.19.4.2 RSA signature types in certificates
  3256. RSA keys can be used to generate signatures with a choice of
  3257. secure hash function. Typically, any version of OpenSSH new enough
  3258. to support certificates at all will also be new enough to avoid
  3259. using SHA-1, so the default settings of accepting the more modern
  3260. SHA-256 and SHA-512 should be suitable for nearly all cases.
  3261. For completeness, however, you can configure which types of RSA
  3262. signature PuTTY will accept in a certificate from a CA using an RSA
  3263. key.
  3264. 4.20 The Cipher panel
  3265. PuTTY supports a variety of different encryption algorithms, and
  3266. allows you to choose which one you prefer to use. You can do this by
  3267. dragging the algorithms up and down in the list box (or moving them
  3268. using the Up and Down buttons) to specify a preference order. When
  3269. you make an SSH connection, PuTTY will search down the list from the
  3270. top until it finds an algorithm supported by the server, and then
  3271. use that.
  3272. PuTTY currently supports the following algorithms:
  3273. - ChaCha20-Poly1305, a combined cipher and MAC (SSH-2 only)
  3274. - AES (Rijndael) - 256, 192, or 128-bit SDCTR or CBC, or 256 or
  3275. 128-bit GCM (SSH-2 only)
  3276. - Arcfour (RC4) - 256 or 128-bit stream cipher (SSH-2 only)
  3277. - Blowfish - 256-bit SDCTR (SSH-2 only) or 128-bit CBC
  3278. - Triple-DES - 168-bit SDCTR (SSH-2 only) or CBC
  3279. - Single-DES - 56-bit CBC (see below for SSH-2)
  3280. If the algorithm PuTTY finds is below the `warn below here' line,
  3281. you will see a warning box when you make the connection:
  3282. The first cipher supported by the server
  3283. is single-DES, which is below the configured
  3284. warning threshold.
  3285. Do you want to continue with this connection?
  3286. This warns you that the first available encryption is not a very
  3287. secure one. Typically you would put the `warn below here' line
  3288. between the encryptions you consider secure and the ones you
  3289. consider substandard. By default, PuTTY supplies a preference order
  3290. intended to reflect a reasonable preference in terms of security and
  3291. speed.
  3292. In SSH-2, the encryption algorithm is negotiated independently for
  3293. each direction of the connection, although PuTTY does not support
  3294. separate configuration of the preference orders. As a result you may
  3295. get two warnings similar to the one above, possibly with different
  3296. encryptions.
  3297. Single-DES is not recommended in the SSH-2 protocol standards, but
  3298. one or two server implementations do support it. PuTTY can use
  3299. single-DES to interoperate with these servers if you enable the
  3300. `Enable legacy use of single-DES in SSH-2' option; by default this
  3301. is disabled and PuTTY will stick to recommended ciphers.
  3302. 4.21 The Auth panel
  3303. The Auth panel allows you to configure authentication options for
  3304. SSH sessions.
  3305. 4.21.1 `Display pre-authentication banner'
  3306. SSH-2 servers can provide a message for clients to display to the
  3307. prospective user before the user logs in; this is sometimes known
  3308. as a pre-authentication `banner'. Typically this is used to provide
  3309. information about the server and legal notices.
  3310. By default, PuTTY displays this message before prompting for a
  3311. password or similar credentials (although, unfortunately, not before
  3312. prompting for a login name, due to the nature of the protocol
  3313. design). By unchecking this option, display of the banner can be
  3314. suppressed entirely.
  3315. 4.21.2 `Bypass authentication entirely'
  3316. In SSH-2, it is in principle possible to establish a connection
  3317. without using SSH's mechanisms to identify or prove who you are to
  3318. the server. An SSH server could prefer to handle authentication
  3319. in the data channel, for instance, or simply require no user
  3320. authentication whatsoever.
  3321. By default, PuTTY assumes the server requires authentication (we've
  3322. never heard of one that doesn't), and thus must start this process
  3323. with a username. If you find you are getting username prompts that
  3324. you cannot answer, you could try enabling this option. However, most
  3325. SSH servers will reject this.
  3326. This is not the option you want if you have a username and just
  3327. want PuTTY to remember it; for that see section 4.15.1. It's
  3328. also probably not what if you're trying to set up passwordless
  3329. login to a mainstream SSH server; depending on the server, you
  3330. probably wanted public-key authentication (chapter 8) or perhaps
  3331. GSSAPI authentication (section 4.23). (These are still forms of
  3332. authentication, even if you don't have to interact with them.)
  3333. This option only affects SSH-2 connections. SSH-1 connections always
  3334. require an authentication step.
  3335. 4.21.3 `Disconnect if authentication succeeds trivially'
  3336. This option causes PuTTY to abandon an SSH session and disconnect
  3337. from the server, if the server accepted authentication without ever
  3338. having asked for any kind of password or signature or token.
  3339. This might be used as a security measure. There are some forms
  3340. of attack against an SSH client user which work by terminating
  3341. the SSH authentication stage early, and then doing something in
  3342. the main part of the SSH session which _looks_ like part of the
  3343. authentication, but isn't really.
  3344. For example, instead of demanding a signature from your public key,
  3345. for which PuTTY would ask for your key's passphrase, a compromised
  3346. or malicious server might allow you to log in with no signature or
  3347. password at all, and then print a message that _imitates_ PuTTY's
  3348. request for your passphrase, in the hope that you would type it in.
  3349. (In fact, the passphrase for your public key should not be sent to
  3350. any server.)
  3351. PuTTY's main defence against attacks of this type is the `trust
  3352. sigil' system: messages in the PuTTY window that are truly
  3353. originated by PuTTY itself are shown next to a small copy of the
  3354. PuTTY icon, which the server cannot fake when it tries to imitate
  3355. the same message using terminal output.
  3356. However, if you think you might be at risk of this kind of thing
  3357. anyway (if you don't watch closely for the trust sigils, or if you
  3358. think you're at extra risk of one of your servers being malicious),
  3359. then you could enable this option as an extra defence. Then, if the
  3360. server tries any of these attacks involving letting you through the
  3361. authentication stage, PuTTY will disconnect from the server before
  3362. it can send a follow-up fake prompt or other type of attack.
  3363. On the other hand, some servers _legitimately_ let you through
  3364. the SSH authentication phase trivially, either because they are
  3365. genuinely public, or because the important authentication step
  3366. happens during the terminal session. (An example might be an SSH
  3367. server that connects you directly to the terminal login prompt of a
  3368. legacy mainframe.) So enabling this option might cause some kinds of
  3369. session to stop working. It's up to you.
  3370. 4.21.4 `Attempt authentication using Pageant'
  3371. If this option is enabled, then PuTTY will look for Pageant (the
  3372. SSH private-key storage agent) and attempt to authenticate with any
  3373. suitable public keys Pageant currently holds.
  3374. This behaviour is almost always desirable, and is therefore enabled
  3375. by default. In rare cases you might need to turn it off in order
  3376. to force authentication by some non-public-key method such as
  3377. passwords.
  3378. This option can also be controlled using the `-noagent' command-line
  3379. option. See section 3.11.3.9.
  3380. See chapter 9 for more information about Pageant in general.
  3381. 4.21.5 `Attempt TIS or CryptoCard authentication'
  3382. TIS and CryptoCard authentication are (despite their names) generic
  3383. forms of simple challenge/response authentication available in SSH
  3384. protocol version 1 only. You might use them if you were using S/Key
  3385. one-time passwords, for example, or if you had a physical security
  3386. token that generated responses to authentication challenges. They
  3387. can even be used to prompt for simple passwords.
  3388. With this switch enabled, PuTTY will attempt these forms of
  3389. authentication if the server is willing to try them. You will be
  3390. presented with a challenge string (which may be different every
  3391. time) and must supply the correct response in order to log in.
  3392. If your server supports this, you should talk to your system
  3393. administrator about precisely what form these challenges and
  3394. responses take.
  3395. 4.21.6 `Attempt keyboard-interactive authentication'
  3396. The SSH-2 equivalent of TIS authentication is called `keyboard-
  3397. interactive'. It is a flexible authentication method using an
  3398. arbitrary sequence of requests and responses; so it is not only
  3399. useful for challenge/response mechanisms such as S/Key, but it can
  3400. also be used for (for example) asking the user for a new password
  3401. when the old one has expired.
  3402. PuTTY leaves this option enabled by default, but supplies a switch
  3403. to turn it off in case you should have trouble with it.
  3404. 4.21.7 `Allow agent forwarding'
  3405. This option allows the SSH server to open forwarded connections back
  3406. to your local copy of Pageant. If you are not running Pageant, this
  3407. option will do nothing.
  3408. See chapter 9 for general information on Pageant, and section 9.4
  3409. for information on agent forwarding. Note that there is a security
  3410. risk involved with enabling this option; see section 9.6 for
  3411. details.
  3412. 4.21.8 `Allow attempted changes of username in SSH-2'
  3413. In the SSH-1 protocol, it is impossible to change username after
  3414. failing to authenticate. So if you mis-type your username at the
  3415. PuTTY `login as:' prompt, you will not be able to change it except
  3416. by restarting PuTTY.
  3417. The SSH-2 protocol _does_ allow changes of username, in principle,
  3418. but does not make it mandatory for SSH-2 servers to accept them.
  3419. In particular, OpenSSH does not accept a change of username; once
  3420. you have sent one username, it will reject attempts to try to
  3421. authenticate as another user. (Depending on the version of OpenSSH,
  3422. it may quietly return failure for all login attempts, or it may send
  3423. an error message.)
  3424. For this reason, PuTTY will by default not prompt you for your
  3425. username more than once, in case the server complains. If you know
  3426. your server can cope with it, you can enable the `Allow attempted
  3427. changes of username' option to modify PuTTY's behaviour.
  3428. 4.22 The Credentials panel
  3429. This subpane of the Auth panel contains configuration options that
  3430. specify actual _credentials_ to present to the server: key files and
  3431. certificates.
  3432. 4.22.1 `Private key file for authentication'
  3433. This box is where you enter the name of your private key file if you
  3434. are using public key authentication. See chapter 8 for information
  3435. about public key authentication in SSH.
  3436. This key must be in PuTTY's native format (`*.PPK'). If you have a
  3437. private key in another format that you want to use with PuTTY, see
  3438. section 8.2.15.
  3439. You can use the authentication agent Pageant so that you do not need
  3440. to explicitly configure a key here; see chapter 9.
  3441. If a private key file is specified here with Pageant running, PuTTY
  3442. will first try asking Pageant to authenticate with that key, and
  3443. ignore any other keys Pageant may have. If that fails, PuTTY will
  3444. ask for a passphrase as normal. You can also specify a _public_
  3445. key file in this case (in RFC 4716 or OpenSSH format), as that's
  3446. sufficient to identify the key to Pageant, but of course if Pageant
  3447. isn't present PuTTY can't fall back to using this file itself.
  3448. 4.22.2 `Certificate to use with the private key'
  3449. (This is optional. If you don't know you need it, you can leave this
  3450. blank.)
  3451. In some environments, user authentication keys can be signed in turn
  3452. by a `certifying authority' (`CA' for short), and user accounts
  3453. on an SSH server can be configured to automatically trust any key
  3454. that's certified by the right signature.
  3455. This can be a convenient setup if you have a very large number of
  3456. servers. When you change your key pair, you might otherwise have to
  3457. edit the authorized_keys file on every server individually, to make
  3458. them all accept the new key. But if instead you configure all those
  3459. servers _once_ to accept keys signed as yours by a CA, then when you
  3460. change your public key, all you have to do is to get the new key
  3461. certified by the same CA as before, and then all your servers will
  3462. automatically accept it without needing individual reconfiguration.
  3463. One way to use a certificate is to incorporate it into your private
  3464. key file. Section 8.2.9 explains how to do that using PuTTYgen. But
  3465. another approach is to tell PuTTY itself where to find the public
  3466. certificate file, and then it will automatically present that
  3467. certificate when authenticating with the corresponding private key.
  3468. To do this, enter the pathname of the certificate file into the
  3469. `Certificate to use with the private key' file selector.
  3470. When this setting is configured, PuTTY will honour it no matter
  3471. whether the private key is found in a file, or loaded into Pageant.
  3472. 4.22.3 `Plugin to provide authentication responses'
  3473. An SSH server can use the `keyboard-interactive' protocol to present
  3474. a series of arbitrary questions and answers. Sometimes this is
  3475. used for ordinary passwords, but sometimes the server will use the
  3476. same mechanism for something more complicated, such as a one-time
  3477. password system.
  3478. Some of these systems can be automated. For this purpose, PuTTY
  3479. allows you to provide a separate program to act as a `plugin' which
  3480. will take over the authentication and send answers to the questions
  3481. on your behalf.
  3482. If you have been provided with a plugin of this type, you can
  3483. configure it here, by entering a full command line in the `Plugin
  3484. command to run' box.
  3485. (If you want to _write_ a plugin of this type, see appendix H for
  3486. the full specification of how the plugin is expected to behave.)
  3487. 4.23 The GSSAPI panel
  3488. The `GSSAPI' subpanel of the `Auth' panel controls the use of
  3489. GSSAPI authentication. This is a mechanism which delegates the
  3490. authentication exchange to a library elsewhere on the client
  3491. machine, which in principle can authenticate in many different ways
  3492. but in practice is usually used with the Kerberos single sign-on
  3493. protocol to implement passwordless login.
  3494. GSSAPI authentication is only available in the SSH-2 protocol.
  3495. PuTTY supports two forms of GSSAPI-based authentication. In one of
  3496. them, the SSH key exchange happens in the normal way, and GSSAPI
  3497. is only involved in authenticating the user. The checkbox labelled
  3498. `Attempt GSSAPI authentication' controls this form.
  3499. In the other method, GSSAPI-based authentication is combined
  3500. with the SSH key exchange phase. If this succeeds, then the SSH
  3501. authentication step has nothing left to do. See section 4.18.1.1 for
  3502. more information about this method. The checkbox labelled `Attempt
  3503. GSSAPI key exchange' controls this form. (The same checkbox appears
  3504. on the `Kex' panel.)
  3505. If one or both of these controls is enabled, then GSSAPI
  3506. authentication will be attempted in one form or the other, and
  3507. (typically) if your client machine has valid Kerberos credentials
  3508. loaded, then PuTTY should be able to authenticate automatically to
  3509. servers that support Kerberos logins.
  3510. If both of those checkboxes are disabled, PuTTY will not try any
  3511. form of GSSAPI at all, and the rest of this panel will be unused.
  3512. 4.23.1 `Allow GSSAPI credential delegation'
  3513. GSSAPI credential delegation is a mechanism for passing on your
  3514. Kerberos (or other) identity to the session on the SSH server. If
  3515. you enable this option, then not only will PuTTY be able to log in
  3516. automatically to a server that accepts your Kerberos credentials,
  3517. but also you will be able to connect out from that server to other
  3518. Kerberos-supporting services and use the same credentials just as
  3519. automatically.
  3520. (This option is the Kerberos analogue of SSH agent forwarding; see
  3521. section 9.4 for some information on that.)
  3522. Note that, like SSH agent forwarding, there is a security
  3523. implication in the use of this option: the administrator of
  3524. the server you connect to, or anyone else who has cracked the
  3525. administrator account on that server, could fake your identity
  3526. when connecting to further Kerberos-supporting services. However,
  3527. Kerberos sites are typically run by a central authority, so the
  3528. administrator of one server is likely to already have access to the
  3529. other services too; so this would typically be less of a risk than
  3530. SSH agent forwarding.
  3531. If your connection is not using GSSAPI key exchange, it is possible
  3532. for the delegation to expire during your session. See section
  3533. 4.18.1.1 for more information.
  3534. 4.23.2 Preference order for GSSAPI libraries
  3535. GSSAPI is a mechanism which allows more than one authentication
  3536. method to be accessed through the same interface. Therefore, more
  3537. than one authentication library may exist on your system which can
  3538. be accessed using GSSAPI.
  3539. PuTTY contains native support for a few well-known such libraries
  3540. (including Windows' SSPI), and will look for all of them on your
  3541. system and use whichever it finds. If more than one exists on your
  3542. system and you need to use a specific one, you can adjust the order
  3543. in which it will search using this preference list control.
  3544. One of the options in the preference list is to use a user-specified
  3545. GSSAPI library. If the library you want to use is not mentioned by
  3546. name in PuTTY's list of options, you can enter its full pathname in
  3547. the `User-supplied GSSAPI library path' field, and move the `User-
  3548. supplied GSSAPI library' option in the preference list to make sure
  3549. it is selected before anything else.
  3550. On Windows, such libraries are files with a .dll extension, and
  3551. must have been built in the same way as the PuTTY executable you're
  3552. running; if you have a 32-bit DLL, you must run a 32-bit version
  3553. of PuTTY, and the same with 64-bit (see question A.6.10). On Unix,
  3554. shared libraries generally have a .so extension.
  3555. 4.24 The TTY panel
  3556. The TTY panel lets you configure the remote pseudo-terminal.
  3557. 4.24.1 `Don't allocate a pseudo-terminal'
  3558. When connecting to a Unix system, most interactive shell sessions
  3559. are run in a _pseudo-terminal_, which allows the Unix system to
  3560. pretend it's talking to a real physical terminal device but allows
  3561. the SSH server to catch all the data coming from that fake device
  3562. and send it back to the client.
  3563. Occasionally you might find you have a need to run a session _not_
  3564. in a pseudo-terminal. In PuTTY, this is generally only useful for
  3565. very specialist purposes; although in Plink (see chapter 7) it is
  3566. the usual way of working.
  3567. 4.24.2 Sending terminal modes
  3568. The SSH protocol allows the client to send `terminal modes' for
  3569. the remote pseudo-terminal. These usually control the server's
  3570. expectation of the local terminal's behaviour.
  3571. If your server does not have sensible defaults for these modes, you
  3572. may find that changing them here helps, although the server is at
  3573. liberty to ignore your changes. If you don't understand any of this,
  3574. it's safe to leave these settings alone.
  3575. (None of these settings will have any effect if no pseudo-terminal
  3576. is requested or allocated.)
  3577. You can change what happens for a particular mode by selecting it in
  3578. the list, choosing one of the options and specifying the exact value
  3579. if necessary, and hitting `Set'. The effect of the options is as
  3580. follows:
  3581. - If the `Auto' option is selected, the PuTTY tools will decide
  3582. whether to specify that mode to the server, and if so, will send
  3583. a sensible value.
  3584. PuTTY proper will send modes that it has an opinion on
  3585. (currently only the code for the Backspace key, ERASE, and
  3586. whether the character set is UTF-8, IUTF8). Plink on Unix will
  3587. propagate appropriate modes from the local terminal, if any.
  3588. - If `Nothing' is selected, no value for the mode will be
  3589. specified to the server under any circumstances.
  3590. - If a value is specified, it will be sent to the server under all
  3591. circumstances. The precise syntax of the value box depends on
  3592. the mode.
  3593. By default, all of the available modes are listed as `Auto', which
  3594. should do the right thing in most circumstances.
  3595. The precise effect of each setting, if any, is up to the server.
  3596. Their names come from POSIX and other Unix systems, and they are
  3597. most likely to have a useful effect on such systems. (These are the
  3598. same settings that can usually be changed using the `stty' command
  3599. once logged in to such servers.)
  3600. Some notable modes are described below; for fuller explanations, see
  3601. your server documentation.
  3602. - ERASE is the character that when typed by the user will delete
  3603. one space to the left. When set to `Auto' (the default setting),
  3604. this follows the setting of the local Backspace key in PuTTY
  3605. (see section 4.4.1).
  3606. This and other special characters are specified using `^C'
  3607. notation for Ctrl-C, and so on. Use `^<27>' or `^<0x1B>' to
  3608. specify a character numerically, and `^~' to get a literal `^'.
  3609. Other non-control characters are denoted by themselves. Leaving
  3610. the box entirely blank indicates that _no_ character should be
  3611. assigned to the specified function, although this may not be
  3612. supported by all servers.
  3613. - QUIT is a special character that usually forcefully ends the
  3614. current process on the server (SIGQUIT). On many servers its
  3615. default setting is Ctrl-backslash (`^\'), which is easy to
  3616. accidentally invoke on many keyboards. If this is getting in
  3617. your way, you may want to change it to another character or turn
  3618. it off entirely.
  3619. - Boolean modes such as ECHO and ICANON can be specified in PuTTY
  3620. in a variety of ways, such as true/false, yes/no, and 0/1.
  3621. (Explicitly specifying a value of no is different from not
  3622. sending the mode at all.)
  3623. - The boolean mode IUTF8 signals to the server whether the
  3624. terminal character set is UTF-8 or not, for purposes such as
  3625. basic line editing; if this is set incorrectly, the backspace
  3626. key may erase the wrong amount of text, for instance. However,
  3627. simply setting this is not usually sufficient for the server to
  3628. use UTF-8; POSIX servers will generally also require the locale
  3629. to be set (by some server-dependent means), although many newer
  3630. installations default to UTF-8. Also, since this mode was added
  3631. to the SSH protocol much later than the others, many servers
  3632. (particularly older servers) do not honour this mode sent over
  3633. SSH; indeed, a few poorly-written servers object to its mere
  3634. presence, so you may find you need to set it to not be sent
  3635. at all. When set to `Auto', this follows the local configured
  3636. character set (see section 4.10.1).
  3637. - Terminal speeds are configured elsewhere; see section 4.15.4.
  3638. 4.25 The X11 panel
  3639. The X11 panel allows you to configure forwarding of X11 over an SSH
  3640. connection.
  3641. If your server lets you run X Window System graphical applications,
  3642. X11 forwarding allows you to securely give those applications access
  3643. to a local X display on your PC.
  3644. To enable X11 forwarding, check the `Enable X11 forwarding' box.
  3645. If your X display is somewhere unusual, you will need to enter its
  3646. location in the `X display location' box; if this is left blank,
  3647. PuTTY will try to find a sensible default in the environment, or use
  3648. the primary local display (`:0') if that fails.
  3649. See section 3.4 for more information about X11 forwarding.
  3650. 4.25.1 Remote X11 authentication
  3651. If you are using X11 forwarding, the virtual X server created on the
  3652. SSH server machine will be protected by authorisation data. This
  3653. data is invented, and checked, by PuTTY.
  3654. The usual authorisation method used for this is called MIT-MAGIC-
  3655. COOKIE-1. This is a simple password-style protocol: the X client
  3656. sends some cookie data to the server, and the server checks that it
  3657. matches the real cookie. The cookie data is sent over an unencrypted
  3658. X11 connection; so if you allow a client on a third machine to
  3659. access the virtual X server, then the cookie will be sent in the
  3660. clear.
  3661. PuTTY offers the alternative protocol XDM-AUTHORIZATION-1. This is
  3662. a cryptographically authenticated protocol: the data sent by the X
  3663. client is different every time, and it depends on the IP address
  3664. and port of the client's end of the connection and is also stamped
  3665. with the current time. So an eavesdropper who captures an XDM-
  3666. AUTHORIZATION-1 string cannot immediately re-use it for their own X
  3667. connection.
  3668. PuTTY's support for XDM-AUTHORIZATION-1 is a somewhat experimental
  3669. feature, and may encounter several problems:
  3670. - Some X clients probably do not even support XDM-AUTHORIZATION-
  3671. 1, so they will not know what to do with the data PuTTY has
  3672. provided.
  3673. - This authentication mechanism will only work in SSH-2. In SSH-
  3674. 1, the SSH server does not tell the client the source address
  3675. of a forwarded connection in a machine-readable format, so it's
  3676. impossible to verify the XDM-AUTHORIZATION-1 data.
  3677. - You may find this feature causes problems with some SSH servers,
  3678. which will not clean up XDM-AUTHORIZATION-1 data after a
  3679. session, so that if you then connect to the same server using
  3680. a client which only does MIT-MAGIC-COOKIE-1 and are allocated
  3681. the same remote display number, you might find that out-of-date
  3682. authentication data is still present on your server and your X
  3683. connections fail.
  3684. PuTTY's default is MIT-MAGIC-COOKIE-1. If you change it, you should
  3685. be sure you know what you're doing.
  3686. 4.25.2 X authority file for local display
  3687. If you are using X11 forwarding, the local X server to which your
  3688. forwarded connections are eventually directed may itself require
  3689. authorisation.
  3690. Some Windows X servers do not require this: they do authorisation
  3691. by simpler means, such as accepting any connection from the local
  3692. machine but not from anywhere else. However, if your X server does
  3693. require authorisation, then PuTTY needs to know what authorisation
  3694. is required.
  3695. One way in which this data might be made available is for the X
  3696. server to store it somewhere in a file which has the same format
  3697. as the Unix `.Xauthority' file. If this is how your Windows X
  3698. server works, then you can tell PuTTY where to find this file by
  3699. configuring this option. By default, PuTTY will not attempt to find
  3700. any authorisation for your local display.
  3701. 4.26 The Tunnels panel
  3702. The Tunnels panel allows you to configure tunnelling of arbitrary
  3703. connection types through an SSH connection.
  3704. Port forwarding allows you to tunnel other types of network
  3705. connection down an SSH session. See section 3.5 for a general
  3706. discussion of port forwarding and how it works.
  3707. The port forwarding section in the Tunnels panel shows a list of all
  3708. the port forwardings that PuTTY will try to set up when it connects
  3709. to the server. By default no port forwardings are set up, so this
  3710. list is empty.
  3711. To add a port forwarding:
  3712. - Set one of the `Local' or `Remote' radio buttons, depending on
  3713. whether you want to forward a local port to a remote destination
  3714. (`Local') or forward a remote port to a local destination
  3715. (`Remote'). Alternatively, select `Dynamic' if you want PuTTY to
  3716. provide a local SOCKS 4/4A/5 proxy on a local port (note that
  3717. this proxy only supports TCP connections; the SSH protocol does
  3718. not support forwarding UDP).
  3719. - Enter a source port number into the `Source port' box. For local
  3720. forwardings, PuTTY will listen on this port of your PC. For
  3721. remote forwardings, your SSH server will listen on this port of
  3722. the remote machine. Note that most servers will not allow you to
  3723. listen on port numbers less than 1024.
  3724. - If you have selected `Local' or `Remote' (this step is not
  3725. needed with `Dynamic'), enter a hostname and port number
  3726. separated by a colon, in the `Destination' box. Connections
  3727. received on the source port will be directed to this
  3728. destination. For example, to connect to a POP-3 server, you
  3729. might enter `popserver.example.com:110'. (If you need to enter
  3730. a literal IPv6 address, enclose it in square brackets, for
  3731. instance `[::1]:2200'.)
  3732. - Click the `Add' button. Your forwarding details should appear in
  3733. the list box.
  3734. To remove a port forwarding, simply select its details in the list
  3735. box, and click the `Remove' button.
  3736. In the `Source port' box, you can also optionally enter an IP
  3737. address to listen on, by specifying (for instance) `127.0.0.5:79'.
  3738. See section 3.5 for more information on how this works and its
  3739. restrictions.
  3740. In place of port numbers, you can enter service names, if they are
  3741. known to the local system. For instance, in the `Destination' box,
  3742. you could enter `popserver.example.com:pop3'.
  3743. You can modify the currently active set of port forwardings in mid-
  3744. session using `Change Settings' (see section 3.1.3.4). If you delete
  3745. a local or dynamic port forwarding in mid-session, PuTTY will stop
  3746. listening for connections on that port, so it can be re-used by
  3747. another program. If you delete a remote port forwarding, note that:
  3748. - The SSH-1 protocol contains no mechanism for asking the server
  3749. to stop listening on a remote port.
  3750. - The SSH-2 protocol does contain such a mechanism, but not all
  3751. SSH servers support it. (In particular, OpenSSH does not support
  3752. it in any version earlier than 3.9.)
  3753. If you ask to delete a remote port forwarding and PuTTY cannot make
  3754. the server actually stop listening on the port, it will instead
  3755. just start refusing incoming connections on that port. Therefore,
  3756. although the port cannot be reused by another program, you can at
  3757. least be reasonably sure that server-side programs can no longer
  3758. access the service at your end of the port forwarding.
  3759. If you delete a forwarding, any existing connections established
  3760. using that forwarding remain open. Similarly, changes to global
  3761. settings such as `Local ports accept connections from other hosts'
  3762. only take effect on new forwardings.
  3763. If the connection you are forwarding over SSH is itself a second
  3764. SSH connection made by another copy of PuTTY, you might find the
  3765. `logical host name' configuration option useful to warn PuTTY of
  3766. which host key it should be expecting. See section 4.14.5 for
  3767. details of this.
  3768. 4.26.1 Controlling the visibility of forwarded ports
  3769. The source port for a forwarded connection usually does not accept
  3770. connections from any machine except the SSH client or server machine
  3771. itself (for local and remote forwardings respectively). There are
  3772. controls in the Tunnels panel to change this:
  3773. - The `Local ports accept connections from other hosts' option
  3774. allows you to set up local-to-remote port forwardings in such a
  3775. way that machines other than your client PC can connect to the
  3776. forwarded port. (This also applies to dynamic SOCKS forwarding.)
  3777. - The `Remote ports do the same' option does the same thing for
  3778. remote-to-local port forwardings (so that machines other than
  3779. the SSH server machine can connect to the forwarded port.) Note
  3780. that this feature is only available in the SSH-2 protocol, and
  3781. not all SSH-2 servers support it (OpenSSH 3.0 does not, for
  3782. example).
  3783. 4.26.2 Selecting Internet protocol version for forwarded ports
  3784. This switch allows you to select a specific Internet protocol (IPv4
  3785. or IPv6) for the local end of a forwarded port. By default, it is
  3786. set on `Auto', which means that:
  3787. - for a local-to-remote port forwarding, PuTTY will listen for
  3788. incoming connections in both IPv4 and (if available) IPv6
  3789. - for a remote-to-local port forwarding, PuTTY will choose a
  3790. sensible protocol for the outgoing connection.
  3791. This overrides the general Internet protocol version preference on
  3792. the Connection panel (see section 4.14.4).
  3793. Note that some operating systems may listen for incoming connections
  3794. in IPv4 even if you specifically asked for IPv6, because their IPv4
  3795. and IPv6 protocol stacks are linked together. Apparently Linux does
  3796. this, and Windows does not. So if you're running PuTTY on Windows
  3797. and you tick `IPv6' for a local or dynamic port forwarding, it will
  3798. _only_ be usable by connecting to it using IPv6; whereas if you do
  3799. the same on Linux, you can also use it with IPv4. However, ticking
  3800. `Auto' should always give you a port which you can connect to using
  3801. either protocol.
  3802. 4.27 The Bugs and More Bugs panels
  3803. Not all SSH servers work properly. Various existing servers have
  3804. bugs in them, which can make it impossible for a client to talk to
  3805. them unless it knows about the bug and works around it.
  3806. Since most servers announce their software version number at the
  3807. beginning of the SSH connection, PuTTY will attempt to detect which
  3808. bugs it can expect to see in the server and automatically enable
  3809. workarounds. However, sometimes it will make mistakes; if the server
  3810. has been deliberately configured to conceal its version number, or
  3811. if the server is a version which PuTTY's bug database does not know
  3812. about, then PuTTY will not know what bugs to expect.
  3813. The Bugs and More Bugs panels (there are two because we have so many
  3814. bug compatibility modes) allow you to manually configure the bugs
  3815. PuTTY expects to see in the server. Each bug can be configured in
  3816. three states:
  3817. - `Off': PuTTY will assume the server does not have the bug.
  3818. - `On': PuTTY will assume the server _does_ have the bug.
  3819. - `Auto': PuTTY will use the server's version number announcement
  3820. to try to guess whether or not the server has the bug. (This
  3821. option is not available for bugs that _cannot_ be detected from
  3822. the server version, e.g. because they must be acted on before
  3823. the server version is known.)
  3824. (The PuTTY project has a defined policy about when we're prepared to
  3825. add auto-detection for a bug workaround. See section B.6.)
  3826. 4.27.1 `Chokes on SSH-2 ignore messages'
  3827. An ignore message (SSH_MSG_IGNORE) is a message in the SSH protocol
  3828. which can be sent from the client to the server, or from the server
  3829. to the client, at any time. Either side is required to ignore the
  3830. message whenever it receives it. PuTTY uses ignore messages in
  3831. SSH-2 to confuse the encrypted data stream and make it harder to
  3832. cryptanalyse. It also uses ignore messages for connection keepalives
  3833. (see section 4.14.1).
  3834. If it believes the server to have this bug, PuTTY will stop using
  3835. ignore messages. If this bug is enabled when talking to a correct
  3836. server, the session will succeed, but keepalives will not work and
  3837. the session might be less cryptographically secure than it could be.
  3838. 4.27.2 `Handles SSH-2 key re-exchange badly'
  3839. Some SSH servers cannot cope with repeat key exchange at all, and
  3840. will ignore attempts by the client to start one. Since PuTTY pauses
  3841. the session while performing a repeat key exchange, the effect of
  3842. this would be to cause the session to hang after an hour (unless
  3843. you have your rekey timeout set differently; see section 4.18.2 for
  3844. more about rekeys). Other, very old, SSH servers handle repeat key
  3845. exchange even more badly, and disconnect upon receiving a repeat key
  3846. exchange request.
  3847. If this bug is detected, PuTTY will never initiate a repeat key
  3848. exchange. If this bug is enabled when talking to a correct server,
  3849. the session should still function, but may be less secure than you
  3850. would expect.
  3851. This is an SSH-2-specific bug.
  3852. 4.27.3 `Chokes on PuTTY's SSH-2 `winadj' requests'
  3853. PuTTY sometimes sends a special request to SSH servers in the middle
  3854. of channel data, with the name [email protected]
  3855. (see section G.1). The purpose of this request is to measure the
  3856. round-trip time to the server, which PuTTY uses to tune its flow
  3857. control. The server does not actually have to _understand_ the
  3858. message; it is expected to send back a SSH_MSG_CHANNEL_FAILURE
  3859. message indicating that it didn't understand it. (All PuTTY needs
  3860. for its timing calculations is _some_ kind of response.)
  3861. It has been known for some SSH servers to get confused by this
  3862. message in one way or another - because it has a long name, or
  3863. because they can't cope with unrecognised request names even to the
  3864. extent of sending back the correct failure response, or because they
  3865. handle it sensibly but fill up the server's log file with pointless
  3866. spam, or whatever. PuTTY therefore supports this bug-compatibility
  3867. flag: if it believes the server has this bug, it will never send
  3868. its `[email protected]' request, and will make do
  3869. without its timing data.
  3870. 4.27.4 `Replies to requests on closed channels'
  3871. The SSH protocol as published in RFC 4254 has an ambiguity which
  3872. arises if one side of a connection tries to close a channel, while
  3873. the other side simultaneously sends a request within the channel and
  3874. asks for a reply. RFC 4254 leaves it unclear whether the closing
  3875. side should reply to the channel request after having announced its
  3876. intention to close the channel.
  3877. Discussion on the ietf-ssh mailing list in April 2014 formed a clear
  3878. consensus that the right answer is no. However, because of the
  3879. ambiguity in the specification, some SSH servers have implemented
  3880. the other policy; for example, OpenSSH used to until it was fixed.
  3881. Because PuTTY sends channel requests with the `want reply'
  3882. flag throughout channels' lifetime (see section 4.27.3), it's
  3883. possible that when connecting to such a server it might receive
  3884. a reply to a request after it thinks the channel has entirely
  3885. closed, and terminate with an error along the lines of `Received
  3886. SSH2_MSG_CHANNEL_FAILURE for nonexistent channel 256'.
  3887. 4.27.5 `Ignores SSH-2 maximum packet size'
  3888. When an SSH-2 channel is set up, each end announces the maximum size
  3889. of data packet that it is willing to receive for that channel. Some
  3890. servers ignore PuTTY's announcement and send packets larger than
  3891. PuTTY is willing to accept, causing it to report `Incoming packet
  3892. was garbled on decryption'.
  3893. If this bug is detected, PuTTY never allows the channel's flow-
  3894. control window to grow large enough to allow the server to send an
  3895. over-sized packet. If this bug is enabled when talking to a correct
  3896. server, the session will work correctly, but download performance
  3897. will be less than it could be.
  3898. 4.27.6 `Discards data sent before its greeting'
  3899. Just occasionally, an SSH connection can be established over some
  3900. channel that will accidentally discard outgoing data very early in
  3901. the connection.
  3902. This is not typically seen as a bug in an actual SSH server, but
  3903. it can sometimes occur in situations involving a complicated proxy
  3904. process. An example is Debian bug #991958, in which a connection
  3905. going over the console of a User Mode Linux kernel can lose outgoing
  3906. data before the kernel has fully booted.
  3907. You can work around this problem by manually enabling this bug flag,
  3908. which will cause PuTTY to wait to send its initial SSH greeting
  3909. until after it sees the greeting from the server.
  3910. Note that this bug flag can never be automatically detected,
  3911. since auto-detection relies on the version string in the server's
  3912. greeting, and PuTTY has to decide whether to expect this bug
  3913. _before_ it sees the server's greeting. So this is a manual
  3914. workaround only.
  3915. 4.27.7 `Chokes on PuTTY's full KEXINIT'
  3916. At the start of an SSH connection, the client and server exchange
  3917. long messages of type SSH_MSG_KEXINIT, containing lists of all the
  3918. cryptographic algorithms they're prepared to use. This is used to
  3919. negotiate a set of algorithms that both ends can speak.
  3920. Occasionally, a badly written server might have a length limit on
  3921. the list it's prepared to receive, and refuse to make a connection
  3922. simply because PuTTY is giving it too many choices.
  3923. A workaround is to enable this flag, which will make PuTTY wait to
  3924. send KEXINIT until after it receives the one from the server, and
  3925. then filter its own KEXINIT to leave out any algorithm the server
  3926. doesn't also announce support for. This will generally make PuTTY's
  3927. KEXINIT at most the size of the server's, and will otherwise make no
  3928. difference to the algorithm negotiation.
  3929. This flag is a minor violation of the SSH protocol, because both
  3930. sides are supposed to send KEXINIT proactively. It still works
  3931. provided _one_ side sends its KEXINIT without waiting, but if both
  3932. client and server waited for the other one to speak first, the
  3933. connection would deadlock. We don't know of any servers that do
  3934. this, but if there is one, then this flag will make PuTTY unable to
  3935. speak to them at all.
  3936. 4.27.8 `Old RSA/SHA2 cert algorithm naming'
  3937. If PuTTY is trying to do SSH-2 user authentication using an RSA
  3938. key, and the server is using one of the newer SHA-2 based versions
  3939. of the SSH RSA protocol, and the user's key is also a certificate,
  3940. then earlier versions of OpenSSH (up to 7.7) disagree with later
  3941. versions about the right key algorithm string to send in the
  3942. SSH2_MSG_USERAUTH_REQUEST packet. Modern versions send a string
  3943. that indicates both the SHA-2 nature and the certificate nature
  3944. of the key, such as `[email protected]'. Earlier
  3945. versions would reject that, and insist on seeing `ssh-rsa-cert-
  3946. [email protected]' followed by a SHA-2 based signature.
  3947. PuTTY should auto-detect the presence of this bug in earlier OpenSSH
  3948. and adjust to send the right string.
  3949. 4.27.9 `Requires padding on SSH-2 RSA signatures'
  3950. Versions below 3.3 of OpenSSH require SSH-2 RSA signatures to be
  3951. padded with zero bytes to the same length as the RSA key modulus.
  3952. The SSH-2 specification says that an unpadded signature MUST be
  3953. accepted, so this is a bug. A typical symptom of this problem is
  3954. that PuTTY mysteriously fails RSA authentication once in every few
  3955. hundred attempts, and falls back to passwords.
  3956. If this bug is detected, PuTTY will pad its signatures in the way
  3957. OpenSSH expects. If this bug is enabled when talking to a correct
  3958. server, it is likely that no damage will be done, since correct
  3959. servers usually still accept padded signatures because they're used
  3960. to talking to OpenSSH.
  3961. This is an SSH-2-specific bug.
  3962. 4.27.10 `Only supports pre-RFC4419 SSH-2 DH GEX'
  3963. The SSH key exchange method that uses Diffie-Hellman group exchange
  3964. was redesigned after its original release, to use a slightly more
  3965. sophisticated setup message. Almost all SSH implementations switched
  3966. over to the new version. (PuTTY was one of the last.) A few old
  3967. servers still only support the old one.
  3968. If this bug is detected, and the client and server negotiate Diffie-
  3969. Hellman group exchange, then PuTTY will send the old message now
  3970. known as SSH2_MSG_KEX_DH_GEX_REQUEST_OLD in place of the new
  3971. SSH2_MSG_KEX_DH_GEX_REQUEST.
  3972. This is an SSH-2-specific bug.
  3973. 4.27.11 `Miscomputes SSH-2 HMAC keys'
  3974. Versions 2.3.0 and below of the SSH server software from ssh.com
  3975. compute the keys for their HMAC message authentication codes
  3976. incorrectly. A typical symptom of this problem is that PuTTY dies
  3977. unexpectedly at the beginning of the session, saying `Incorrect MAC
  3978. received on packet'.
  3979. If this bug is detected, PuTTY will compute its HMAC keys in the
  3980. same way as the buggy server, so that communication will still be
  3981. possible. If this bug is enabled when talking to a correct server,
  3982. communication will fail.
  3983. This is an SSH-2-specific bug.
  3984. 4.27.12 `Misuses the session ID in SSH-2 PK auth'
  3985. Versions below 2.3 of OpenSSH require SSH-2 public-key
  3986. authentication to be done slightly differently: the data to be
  3987. signed by the client contains the session ID formatted in a
  3988. different way. If public-key authentication mysteriously does
  3989. not work but the Event Log (see section 3.1.3.1) thinks it has
  3990. successfully sent a signature, it might be worth enabling the
  3991. workaround for this bug to see if it helps.
  3992. If this bug is detected, PuTTY will sign data in the way OpenSSH
  3993. expects. If this bug is enabled when talking to a correct server,
  3994. SSH-2 public-key authentication will fail.
  3995. This is an SSH-2-specific bug.
  3996. 4.27.13 `Miscomputes SSH-2 encryption keys'
  3997. Versions below 2.0.11 of the SSH server software from ssh.com
  3998. compute the keys for the session encryption incorrectly. This
  3999. problem can cause various error messages, such as `Incoming packet
  4000. was garbled on decryption', or possibly even `Out of memory'.
  4001. If this bug is detected, PuTTY will compute its encryption keys
  4002. in the same way as the buggy server, so that communication will
  4003. still be possible. If this bug is enabled when talking to a correct
  4004. server, communication will fail.
  4005. This is an SSH-2-specific bug.
  4006. 4.27.14 `Chokes on SSH-1 ignore messages'
  4007. An ignore message (SSH_MSG_IGNORE) is a message in the SSH protocol
  4008. which can be sent from the client to the server, or from the server
  4009. to the client, at any time. Either side is required to ignore the
  4010. message whenever it receives it. PuTTY uses ignore messages to hide
  4011. the password packet in SSH-1, so that a listener cannot tell the
  4012. length of the user's password; it also uses ignore messages for
  4013. connection keepalives (see section 4.14.1).
  4014. If this bug is detected, PuTTY will stop using ignore messages.
  4015. This means that keepalives will stop working, and PuTTY will
  4016. have to fall back to a secondary defence against SSH-1 password-
  4017. length eavesdropping. See section 4.27.15. If this bug is enabled
  4018. when talking to a correct server, the session will succeed, but
  4019. keepalives will not work and the session might be more vulnerable to
  4020. eavesdroppers than it could be.
  4021. 4.27.15 `Refuses all SSH-1 password camouflage'
  4022. When talking to an SSH-1 server which cannot deal with ignore
  4023. messages (see section 4.27.14), PuTTY will attempt to disguise the
  4024. length of the user's password by sending additional padding _within_
  4025. the password packet. This is technically a violation of the SSH-
  4026. 1 specification, and so PuTTY will only do it when it cannot use
  4027. standards-compliant ignore messages as camouflage. In this sense,
  4028. for a server to refuse to accept a padded password packet is not
  4029. really a bug, but it does make life inconvenient if the server can
  4030. also not handle ignore messages.
  4031. If this `bug' is detected, PuTTY will assume that neither ignore
  4032. messages nor padding are acceptable, and that it thus has no choice
  4033. but to send the user's password with no form of camouflage, so
  4034. that an eavesdropping user will be easily able to find out the
  4035. exact length of the password. If this bug is enabled when talking
  4036. to a correct server, the session will succeed, but will be more
  4037. vulnerable to eavesdroppers than it could be.
  4038. This is an SSH-1-specific bug. SSH-2 is secure against this type of
  4039. attack.
  4040. 4.27.16 `Chokes on SSH-1 RSA authentication'
  4041. Some SSH-1 servers cannot deal with RSA authentication messages at
  4042. all. If Pageant is running and contains any SSH-1 keys, PuTTY will
  4043. normally automatically try RSA authentication before falling back
  4044. to passwords, so these servers will crash when they see the RSA
  4045. attempt.
  4046. If this bug is detected, PuTTY will go straight to password
  4047. authentication. If this bug is enabled when talking to a correct
  4048. server, the session will succeed, but of course RSA authentication
  4049. will be impossible.
  4050. This is an SSH-1-specific bug.
  4051. 4.28 The `Bare ssh-connection' protocol
  4052. In addition to SSH itself, PuTTY also supports a second protocol
  4053. that is derived from SSH. It's listed in the PuTTY GUI under the
  4054. name `Bare ssh-connection'.
  4055. This protocol consists of just the innermost of SSH-2's three
  4056. layers: it leaves out the cryptography layer providing network
  4057. security, and it leaves out the authentication layer where you
  4058. provide a username and prove you're allowed to log in as that user.
  4059. It is therefore *completely unsuited to any network connection*.
  4060. Don't try to use it over a network!
  4061. The purpose of this protocol is for various specialist circumstances
  4062. in which the `connection' is not over a real network, but is a pipe
  4063. or IPC channel between different processes running on the _same_
  4064. computer. In these contexts, the operating system will already have
  4065. guaranteed that each of the two communicating processes is owned by
  4066. the expected user (so that no authentication is necessary), and that
  4067. the communications channel cannot be tapped by a hostile user on the
  4068. same machine (so that no cryptography is necessary either). Examples
  4069. of possible uses involve communicating with a strongly separated
  4070. context such as the inside of a container, or a VM, or a different
  4071. network namespace.
  4072. Explicit support for this protocol is new in PuTTY 0.75. As of 2021-
  4073. 04, the only known server for the bare ssh-connection protocol is
  4074. the Unix program `psusan' that is also part of the PuTTY tool suite.
  4075. (However, this protocol is also the same one used between instances
  4076. of PuTTY to implement connection sharing: see section 4.17.5. In
  4077. fact, in the Unix version of PuTTY, when a sharing upstream records
  4078. `Sharing this connection at [pathname]' in the Event Log, it's
  4079. possible to connect another instance of PuTTY directly to that Unix
  4080. socket, by entering its pathname in the host name box and selecting
  4081. `Bare ssh-connection' as the protocol!)
  4082. Many of the options under the SSH panel also affect this protocol,
  4083. although options to do with cryptography and authentication do not,
  4084. for obvious reasons.
  4085. I repeat, *DON'T TRY TO USE THIS PROTOCOL FOR NETWORK CONNECTIONS!*
  4086. That's not what it's for, and it's not at all safe to do it.
  4087. 4.29 The Serial panel
  4088. The Serial panel allows you to configure options that only apply
  4089. when PuTTY is connecting to a local serial line.
  4090. 4.29.1 Selecting a serial line to connect to
  4091. The `Serial line to connect to' box allows you to choose which
  4092. serial line you want PuTTY to talk to, if your computer has more
  4093. than one serial port.
  4094. On Windows, the first serial line is called COM1, and if there is a
  4095. second it is called COM2, and so on.
  4096. This configuration setting is also visible on the Session panel,
  4097. where it replaces the `Host Name' box (see section 4.1.1) if the
  4098. connection type is set to `Serial'.
  4099. 4.29.2 Selecting the speed of your serial line
  4100. The `Speed' box allows you to choose the speed (or `baud rate') at
  4101. which to talk to the serial line. Typical values might be 9600,
  4102. 19200, 38400 or 57600. Which one you need will depend on the device
  4103. at the other end of the serial cable; consult the manual for that
  4104. device if you are in doubt.
  4105. This configuration setting is also visible on the Session panel,
  4106. where it replaces the `Port' box (see section 4.1.1) if the
  4107. connection type is set to `Serial'.
  4108. 4.29.3 Selecting the number of data bits
  4109. The `Data bits' box allows you to choose how many data bits are
  4110. transmitted in each byte sent or received through the serial line.
  4111. Typical values are 7 or 8.
  4112. 4.29.4 Selecting the number of stop bits
  4113. The `Stop bits' box allows you to choose how many stop bits are used
  4114. in the serial line protocol. Typical values are 1, 1.5 or 2.
  4115. 4.29.5 Selecting the serial parity checking scheme
  4116. The `Parity' box allows you to choose what type of parity checking
  4117. is used on the serial line. The settings are:
  4118. - `None': no parity bit is sent at all.
  4119. - `Odd': an extra parity bit is sent alongside each byte, and
  4120. arranged so that the total number of 1 bits is odd.
  4121. - `Even': an extra parity bit is sent alongside each byte, and
  4122. arranged so that the total number of 1 bits is even.
  4123. - `Mark': an extra parity bit is sent alongside each byte, and
  4124. always set to 1.
  4125. - `Space': an extra parity bit is sent alongside each byte, and
  4126. always set to 0.
  4127. 4.29.6 Selecting the serial flow control scheme
  4128. The `Flow control' box allows you to choose what type of flow
  4129. control checking is used on the serial line. The settings are:
  4130. - `None': no flow control is done. Data may be lost if either side
  4131. attempts to send faster than the serial line permits.
  4132. - `XON/XOFF': flow control is done by sending XON and XOFF
  4133. characters within the data stream.
  4134. - `RTS/CTS': flow control is done using the RTS and CTS wires on
  4135. the serial line.
  4136. - `DSR/DTR': flow control is done using the DSR and DTR wires on
  4137. the serial line.
  4138. 4.30 The Telnet panel
  4139. The Telnet panel allows you to configure options that only apply to
  4140. Telnet sessions.
  4141. 4.30.1 `Handling of OLD_ENVIRON ambiguity'
  4142. The original Telnet mechanism for passing environment variables was
  4143. badly specified. At the time the standard (RFC 1408) was written,
  4144. BSD telnet implementations were already supporting the feature, and
  4145. the intention of the standard was to describe the behaviour the BSD
  4146. implementations were already using.
  4147. Sadly there was a typing error in the standard when it was issued,
  4148. and two vital function codes were specified the wrong way round. BSD
  4149. implementations did not change, and the standard was not corrected.
  4150. Therefore, it's possible you might find either BSD or RFC-compliant
  4151. implementations out there. This switch allows you to choose which
  4152. one PuTTY claims to be.
  4153. The problem was solved by issuing a second standard, defining a
  4154. new Telnet mechanism called NEW_ENVIRON, which behaved exactly
  4155. like the original OLD_ENVIRON but was not encumbered by existing
  4156. implementations. Most Telnet servers now support this, and it's
  4157. unambiguous. This feature should only be needed if you have trouble
  4158. passing environment variables to quite an old server.
  4159. 4.30.2 Passive and active Telnet negotiation modes
  4160. In a Telnet connection, there are two types of data passed between
  4161. the client and the server: actual text, and _negotiations_ about
  4162. which Telnet extra features to use.
  4163. PuTTY can use two different strategies for negotiation:
  4164. - In _active_ mode, PuTTY starts to send negotiations as soon as
  4165. the connection is opened.
  4166. - In _passive_ mode, PuTTY will wait to negotiate until it sees a
  4167. negotiation from the server.
  4168. The obvious disadvantage of passive mode is that if the server is
  4169. also operating in a passive mode, then negotiation will never begin
  4170. at all. For this reason PuTTY defaults to active mode.
  4171. However, sometimes passive mode is required in order to successfully
  4172. get through certain types of firewall and Telnet proxy server. If
  4173. you have confusing trouble with a firewall, you could try enabling
  4174. passive mode to see if it helps.
  4175. 4.30.3 `Keyboard sends Telnet special commands'
  4176. If this box is checked, several key sequences will have their normal
  4177. actions modified:
  4178. - the Backspace key on the keyboard will send the Telnet special
  4179. backspace code;
  4180. - Control-C will send the Telnet special Interrupt Process code;
  4181. - Control-Z will send the Telnet special Suspend Process code.
  4182. You probably shouldn't enable this unless you know what you're
  4183. doing.
  4184. 4.30.4 `Return key sends Telnet New Line instead of ^M'
  4185. Unlike most other remote login protocols, the Telnet protocol has
  4186. a special `new line' code that is not the same as the usual line
  4187. endings of Control-M or Control-J. By default, PuTTY sends the
  4188. Telnet New Line code when you press Return, instead of sending
  4189. Control-M as it does in most other protocols.
  4190. Most Unix-style Telnet servers don't mind whether they receive
  4191. Telnet New Line or Control-M; some servers do expect New Line,
  4192. and some servers prefer to see ^M. If you are seeing surprising
  4193. behaviour when you press Return in a Telnet session, you might try
  4194. turning this option off to see if it helps.
  4195. 4.31 The Rlogin panel
  4196. The Rlogin panel allows you to configure options that only apply to
  4197. Rlogin sessions.
  4198. 4.31.1 `Local username'
  4199. Rlogin allows an automated (password-free) form of login by means
  4200. of a file called `.rhosts' on the server. You put a line in your
  4201. `.rhosts' file saying something like `[email protected]', and
  4202. then when you make an Rlogin connection the client transmits the
  4203. username of the user running the Rlogin client. The server checks
  4204. the username and hostname against `.rhosts', and if they match it
  4205. does not ask for a password.
  4206. This only works because Unix systems contain a safeguard to stop a
  4207. user from pretending to be another user in an Rlogin connection.
  4208. Rlogin connections have to come from port numbers below 1024, and
  4209. Unix systems prohibit this to unprivileged processes; so when the
  4210. server sees a connection from a low-numbered port, it assumes the
  4211. client end of the connection is held by a privileged (and therefore
  4212. trusted) process, so it believes the claim of who the user is.
  4213. Windows does not have this restriction: _any_ user can initiate
  4214. an outgoing connection from a low-numbered port. Hence, the
  4215. Rlogin `.rhosts' mechanism is completely useless for securely
  4216. distinguishing several different users on a Windows machine. If you
  4217. have a `.rhosts' entry pointing at a Windows PC, you should assume
  4218. that _anyone_ using that PC can spoof your username in an Rlogin
  4219. connection and access your account on the server.
  4220. The `Local username' control allows you to specify what user name
  4221. PuTTY should claim you have, in case it doesn't match your Windows
  4222. user name (or in case you didn't bother to set up a Windows user
  4223. name).
  4224. 4.32 The SUPDUP panel
  4225. The SUPDUP panel allows you to configure options that only apply
  4226. to SUPDUP sessions. See section 3.10 for more about the SUPDUP
  4227. protocol.
  4228. 4.32.1 `Location string'
  4229. In SUPDUP, the client sends a piece of text of its choice to the
  4230. server giving the user's location. This is typically displayed in
  4231. lists of logged-in users.
  4232. By default, PuTTY just defaults this to "The Internet". If you
  4233. want your location to show up as something more specific, you can
  4234. configure it here.
  4235. 4.32.2 `Extended ASCII Character set'
  4236. This declares what kind of character set extension your terminal
  4237. supports. If the server supports it, it will send text using
  4238. that character set. `None' means the standard 95 printable ASCII
  4239. characters. `ITS' means ASCII extended with printable characters in
  4240. the control character range. This character set is documented in the
  4241. SUPDUP protocol definition. `WAITS' is similar to `ITS' but uses
  4242. some alternative characters in the extended set: most prominently,
  4243. it will display arrows instead of `^' and `_', and `}' instead of
  4244. `~'. `ITS' extended ASCII is used by ITS and Lisp machines, whilst
  4245. `WAITS' is only used by the WAITS operating system from the Stanford
  4246. AI Laboratory.
  4247. 4.32.3 `**MORE** processing'
  4248. When **MORE** processing is enabled, the server causes output to
  4249. pause at the bottom of the screen, until a space is typed.
  4250. 4.32.4 `Terminal scrolling'
  4251. This controls whether the terminal will perform scrolling when the
  4252. cursor goes below the last line, or if the cursor will return to the
  4253. first line.
  4254. 4.33 Storing configuration in a file
  4255. PuTTY does not currently support storing its configuration in a file
  4256. instead of the Registry. However, you can work around this with a
  4257. couple of batch files.
  4258. You will need a file called (say) `PUTTY.BAT' which imports the
  4259. contents of a file into the Registry, then runs PuTTY, exports
  4260. the contents of the Registry back into the file, and deletes the
  4261. Registry entries. This can all be done using the Regedit command
  4262. line options, so it's all automatic. Here is what you need in
  4263. `PUTTY.BAT':
  4264. @ECHO OFF
  4265. regedit /s putty.reg
  4266. regedit /s puttyrnd.reg
  4267. start /w putty.exe
  4268. regedit /ea new.reg HKEY_CURRENT_USER\Software\SimonTatham\PuTTY
  4269. copy new.reg putty.reg
  4270. del new.reg
  4271. regedit /s puttydel.reg
  4272. This batch file needs two auxiliary files: `PUTTYRND.REG' which sets
  4273. up an initial safe location for the `PUTTY.RND' random seed file,
  4274. and `PUTTYDEL.REG' which destroys everything in the Registry once
  4275. it's been successfully saved back to the file.
  4276. Here is `PUTTYDEL.REG':
  4277. REGEDIT4
  4278. [-HKEY_CURRENT_USER\Software\SimonTatham\PuTTY]
  4279. Here is an example `PUTTYRND.REG' file:
  4280. REGEDIT4
  4281. [HKEY_CURRENT_USER\Software\SimonTatham\PuTTY]
  4282. "RandSeedFile"="a:\\putty.rnd"
  4283. You should replace `a:\putty.rnd' with the location where you want
  4284. to store your random number data. If the aim is to carry around
  4285. PuTTY and its settings on one USB stick, you probably want to store
  4286. it on the USB stick.
  4287. Chapter 5: Using PSCP to transfer files securely
  4288. ------------------------------------------------
  4289. PSCP, the PuTTY Secure Copy client, is a tool for transferring files
  4290. securely between computers using an SSH connection.
  4291. If you have an SSH-2 server, you might prefer PSFTP (see chapter
  4292. 6) for interactive use. PSFTP does not in general work with SSH-1
  4293. servers, however.
  4294. 5.1 Starting PSCP
  4295. PSCP is a command line application. This means that you cannot just
  4296. double-click on its icon to run it and instead you have to bring up
  4297. a console window. With Windows 95, 98, and ME, this is called an
  4298. `MS-DOS Prompt' and with Windows NT, 2000, and XP, it is called a
  4299. `Command Prompt'. It should be available from the Programs section
  4300. of your Start Menu.
  4301. To start PSCP it will need either to be on your `PATH' or in your
  4302. current directory. To add the directory containing PSCP to your
  4303. `PATH' environment variable, type into the console window:
  4304. set PATH=C:\path\to\putty\directory;%PATH%
  4305. This will only work for the lifetime of that particular console
  4306. window. To set your `PATH' more permanently on Windows NT, 2000, and
  4307. XP, use the Environment tab of the System Control Panel. On Windows
  4308. 95, 98, and ME, you will need to edit your `AUTOEXEC.BAT' to include
  4309. a `set' command like the one above.
  4310. 5.2 PSCP Usage
  4311. Once you've got a console window to type into, you can type `pscp -
  4312. h' to bring up a usage message. This tells you the version of PSCP
  4313. you're using, and gives you a brief summary of how to use PSCP:
  4314. C:\>pscp -h
  4315. PuTTY Secure Copy client
  4316. Release 0.83
  4317. Usage: pscp [options] [user@]host:source target
  4318. pscp [options] source [source...] [user@]host:target
  4319. pscp [options] -ls [user@]host:filespec
  4320. Options:
  4321. -V print version information and exit
  4322. -pgpfp print PGP key fingerprints and exit
  4323. -p preserve file attributes
  4324. -q quiet, don't show statistics
  4325. -r copy directories recursively
  4326. -v show verbose messages
  4327. -load sessname Load settings from saved session
  4328. -P port connect to specified port
  4329. -l user connect with specified username
  4330. -pwfile file login with password read from specified file
  4331. -1 -2 force use of particular SSH protocol version
  4332. -ssh -ssh-connection
  4333. force use of particular SSH protocol variant
  4334. -4 -6 force use of IPv4 or IPv6
  4335. -C enable compression
  4336. -i key private key file for user authentication
  4337. -noagent disable use of Pageant
  4338. -agent enable use of Pageant
  4339. -no-trivial-auth
  4340. disconnect if SSH authentication succeeds trivially
  4341. -hostkey keyid
  4342. manually specify a host key (may be repeated)
  4343. -batch disable all interactive prompts
  4344. -no-sanitise-stderr don't strip control chars from standard error
  4345. -proxycmd command
  4346. use 'command' as local proxy
  4347. -unsafe allow server-side wildcards (DANGEROUS)
  4348. -sftp force use of SFTP protocol
  4349. -scp force use of SCP protocol
  4350. -sshlog file
  4351. -sshrawlog file
  4352. log protocol details to a file
  4353. -logoverwrite
  4354. -logappend
  4355. control what happens when a log file already exists
  4356. (PSCP's interface is much like the Unix `scp' command, if you're
  4357. familiar with that.)
  4358. 5.2.1 The basics
  4359. To receive (a) file(s) from a remote server:
  4360. pscp [options] [user@]host:source target
  4361. So to copy the file `/etc/hosts' from the server `example.com' as
  4362. user `fred' to the file `c:\temp\example-hosts.txt', you would type:
  4363. pscp [email protected]:/etc/hosts c:\temp\example-hosts.txt
  4364. To send (a) file(s) to a remote server:
  4365. pscp [options] source [source...] [user@]host:target
  4366. So to copy the local file `c:\documents\foo.txt' to the server
  4367. `example.com' as user `fred' to the file `/tmp/foo' you would type:
  4368. pscp c:\documents\foo.txt [email protected]:/tmp/foo
  4369. You can use wildcards to transfer multiple files in either
  4370. direction, like this:
  4371. pscp c:\documents\*.doc [email protected]:docfiles
  4372. pscp [email protected]:source/*.c c:\source
  4373. However, in the second case (using a wildcard for multiple remote
  4374. files) you may see a warning saying something like `warning: remote
  4375. host tried to write to a file called `terminal.c' when we requested
  4376. a file called `*.c'. If this is a wildcard, consider upgrading to
  4377. SSH-2 or using the `-unsafe' option. Renaming of this file has been
  4378. disallowed'.
  4379. This is due to a fundamental insecurity in the old-style SCP
  4380. protocol: the client sends the wildcard string (`*.c') to the
  4381. server, and the server sends back a sequence of file names that
  4382. match the wildcard pattern. However, there is nothing to stop the
  4383. server sending back a _different_ pattern and writing over one of
  4384. your other files: if you request `*.c', the server might send back
  4385. the file name `AUTOEXEC.BAT' and install a virus for you. Since the
  4386. wildcard matching rules are decided by the server, the client cannot
  4387. reliably verify that the filenames sent back match the pattern.
  4388. PSCP will attempt to use the newer SFTP protocol (part of SSH-2)
  4389. where possible, which does not suffer from this security flaw. If
  4390. you are talking to an SSH-2 server which supports SFTP, you will
  4391. never see this warning. (You can force use of the SFTP protocol, if
  4392. available, with `-sftp' - see section 5.2.2.6.)
  4393. If you really need to use a server-side wildcard with an SSH-1
  4394. server, you can use the `-unsafe' command line option with PSCP:
  4395. pscp -unsafe [email protected]:source/*.c c:\source
  4396. This will suppress the warning message and the file transfer will
  4397. happen. However, you should be aware that by using this option you
  4398. are giving the server the ability to write to _any_ file in the
  4399. target directory, so you should only use this option if you trust
  4400. the server administrator not to be malicious (and not to let the
  4401. server machine be cracked by malicious people). Alternatively, do
  4402. any such download in a newly created empty directory. (Even in
  4403. `unsafe' mode, PSCP will still protect you against the server trying
  4404. to get out of that directory using pathnames including `..'.)
  4405. 5.2.1.1 `user'
  4406. The login name on the remote server. If this is omitted, and `host'
  4407. is a PuTTY saved session, PSCP will use any username specified by
  4408. that saved session. Otherwise, PSCP will attempt to use the local
  4409. Windows username.
  4410. 5.2.1.2 `host'
  4411. The name of the remote server, or the name of an existing PuTTY
  4412. saved session. In the latter case, the session's settings for
  4413. hostname, port number, cipher type and username will be used.
  4414. 5.2.1.3 `source'
  4415. One or more source files. Wildcards are allowed. The syntax of
  4416. wildcards depends on the system to which they apply, so if you are
  4417. copying _from_ a Windows system _to_ a UNIX system, you should use
  4418. Windows wildcard syntax (e.g. `*.*'), but if you are copying _from_
  4419. a UNIX system _to_ a Windows system, you would use the wildcard
  4420. syntax allowed by your UNIX shell (e.g. `*').
  4421. If the source is a remote server and you do not specify a full
  4422. pathname (in UNIX, a pathname beginning with a `/' (slash)
  4423. character), what you specify as a source will be interpreted
  4424. relative to your home directory on the remote server.
  4425. 5.2.1.4 `target'
  4426. The filename or directory to put the file(s). When copying from a
  4427. remote server to a local host, you may wish simply to place the
  4428. file(s) in the current directory. To do this, you should specify a
  4429. target of `.'. For example:
  4430. pscp [email protected]:/home/tom/.emacs .
  4431. ...would copy `/home/tom/.emacs' on the remote server to the current
  4432. directory.
  4433. As with the `source' parameter, if the target is on a remote server
  4434. and is not a full path name, it is interpreted relative to your home
  4435. directory on the remote server.
  4436. 5.2.2 Options
  4437. PSCP accepts all the general command line options supported by the
  4438. PuTTY tools, except the ones which make no sense in a file transfer
  4439. utility. See section 3.11.3 for a description of these options. (The
  4440. ones not supported by PSCP are clearly marked.)
  4441. PSCP also supports some of its own options. The following sections
  4442. describe PSCP's specific command-line options.
  4443. 5.2.2.1 `-ls' list remote files
  4444. If the `-ls' option is given, no files are transferred; instead,
  4445. remote files are listed. Only a hostname specification and optional
  4446. remote file specification need be given. For example:
  4447. pscp -ls [email protected]:dir1
  4448. The SCP protocol does not contain within itself a means of listing
  4449. files. If SCP is in use, this option therefore assumes that the
  4450. server responds appropriately to the command `ls -la'; this may not
  4451. work with all servers.
  4452. If SFTP is in use, this option should work with all servers.
  4453. 5.2.2.2 `-p' preserve file attributes
  4454. By default, files copied with PSCP are timestamped with the date
  4455. and time they were copied. The `-p' option preserves the original
  4456. timestamp on copied files.
  4457. 5.2.2.3 `-q' quiet, don't show statistics
  4458. By default, PSCP displays a meter displaying the progress of the
  4459. current transfer:
  4460. mibs.tar | 168 kB | 84.0 kB/s | ETA: 00:00:13 | 13%
  4461. The fields in this display are (from left to right), filename, size
  4462. (in kilobytes) of file transferred so far, estimate of how fast the
  4463. file is being transferred (in kilobytes per second), estimated time
  4464. that the transfer will be complete, and percentage of the file so
  4465. far transferred. The `-q' option to PSCP suppresses the printing of
  4466. these statistics.
  4467. 5.2.2.4 `-r' copies directories recursively
  4468. By default, PSCP will only copy files. Any directories you specify
  4469. to copy will be skipped, as will their contents. The `-r' option
  4470. tells PSCP to descend into any directories you specify, and to copy
  4471. them and their contents. This allows you to use PSCP to transfer
  4472. whole directory structures between machines.
  4473. 5.2.2.5 `-batch' avoid interactive prompts
  4474. If you use the `-batch' option, PSCP will never give an interactive
  4475. prompt while establishing the connection. If the server's host key
  4476. is invalid, for example (see section 2.2), then the connection will
  4477. simply be abandoned instead of asking you what to do next.
  4478. This may help PSCP's behaviour when it is used in automated scripts:
  4479. using `-batch', if something goes wrong at connection time, the
  4480. batch job will fail rather than hang.
  4481. 5.2.2.6 `-sftp', `-scp' force use of particular file transfer protocol
  4482. As mentioned in section 5.2.1, there are two different file transfer
  4483. protocols in use with SSH. Despite its name, PSCP (like many other
  4484. ostensible scp clients) can use either of these protocols.
  4485. The older SCP protocol does not have a written specification and
  4486. leaves a lot of detail to the server platform. Wildcards are
  4487. expanded on the server. The simple design means that any wildcard
  4488. specification supported by the server platform (such as brace
  4489. expansion) can be used, but also leads to interoperability issues
  4490. such as with filename quoting (for instance, where filenames contain
  4491. spaces), and also the security issue described in section 5.2.1.
  4492. The newer SFTP protocol, which is usually associated with SSH-
  4493. 2 servers, is specified in a more platform independent way, and
  4494. leaves issues such as wildcard syntax up to the client. (PuTTY's
  4495. SFTP wildcard syntax is described in section 6.2.2.) This makes it
  4496. more consistent across platforms, more suitable for scripting and
  4497. automation, and avoids security issues with wildcard matching.
  4498. Normally PSCP will attempt to use the SFTP protocol, and only fall
  4499. back to the SCP protocol if SFTP is not available on the server.
  4500. The `-scp' option forces PSCP to use the SCP protocol or quit.
  4501. The `-sftp' option forces PSCP to use the SFTP protocol or quit.
  4502. When this option is specified, PSCP looks harder for an SFTP server,
  4503. which may allow use of SFTP with SSH-1 depending on server setup.
  4504. 5.2.2.7 `-no-sanitise-stderr': control error message sanitisation
  4505. The `-no-sanitise-stderr' option will cause PSCP to pass through the
  4506. server's standard-error stream literally, without stripping control
  4507. characters from it first. This might be useful if the server were
  4508. sending coloured error messages, but it also gives the server the
  4509. ability to have unexpected effects on your terminal display. For
  4510. more discussion, see section 7.2.3.5.
  4511. 5.2.3 Return value
  4512. PSCP returns an ERRORLEVEL of zero (success) only if the files were
  4513. correctly transferred. You can test for this in a batch file, using
  4514. code such as this:
  4515. pscp file*.* user@hostname:
  4516. if errorlevel 1 echo There was an error
  4517. 5.2.4 Using public key authentication with PSCP
  4518. Like PuTTY, PSCP can authenticate using a public key instead of a
  4519. password. There are three ways you can do this.
  4520. Firstly, PSCP can use PuTTY saved sessions in place of hostnames
  4521. (see section 5.2.1.2). So you would do this:
  4522. - Run PuTTY, and create a PuTTY saved session (see section 4.1.2)
  4523. which specifies your private key file (see section 4.22.1). You
  4524. will probably also want to specify a username to log in as (see
  4525. section 4.15.1).
  4526. - In PSCP, you can now use the name of the session instead of
  4527. a hostname: type `pscp sessionname:file localfile', where
  4528. `sessionname' is replaced by the name of your saved session.
  4529. Secondly, you can supply the name of a private key file on the
  4530. command line, with the `-i' option. See section 3.11.3.18 for more
  4531. information.
  4532. Thirdly, PSCP will attempt to authenticate using Pageant if Pageant
  4533. is running (see chapter 9). So you would do this:
  4534. - Ensure Pageant is running, and has your private key stored in
  4535. it.
  4536. - Specify a user and host name to PSCP as normal. PSCP will
  4537. automatically detect Pageant and try to use the keys within it.
  4538. For more general information on public-key authentication, see
  4539. chapter 8.
  4540. Chapter 6: Using PSFTP to transfer files securely
  4541. -------------------------------------------------
  4542. PSFTP, the PuTTY SFTP client, is a tool for transferring files
  4543. securely between computers using an SSH connection.
  4544. PSFTP differs from PSCP in the following ways:
  4545. - PSCP should work on virtually every SSH server. PSFTP uses the
  4546. new SFTP protocol, which is a feature of SSH-2 only. (PSCP
  4547. will also use this protocol if it can, but there is an SSH-1
  4548. equivalent it can fall back to if it cannot.)
  4549. - PSFTP allows you to run an interactive file transfer session,
  4550. much like the Windows `ftp' program. You can list the contents
  4551. of directories, browse around the file system, issue multiple
  4552. `get' and `put' commands, and eventually log out. By contrast,
  4553. PSCP is designed to do a single file transfer operation and
  4554. immediately terminate.
  4555. 6.1 Starting PSFTP
  4556. The usual way to start PSFTP is from a command prompt, much like
  4557. PSCP. To do this, it will need either to be on your `PATH' or in
  4558. your current directory. To add the directory containing PSFTP to
  4559. your `PATH' environment variable, type into the console window:
  4560. set PATH=C:\path\to\putty\directory;%PATH%
  4561. Unlike PSCP, however, PSFTP has no complex command-line syntax; you
  4562. just specify a host name and perhaps a user name:
  4563. psftp server.example.com
  4564. or perhaps
  4565. psftp [email protected]
  4566. Alternatively, if you just type `psftp' on its own (or double-click
  4567. the PSFTP icon in the Windows GUI), you will see the PSFTP prompt,
  4568. and a message telling you PSFTP has not connected to any server:
  4569. C:\>psftp
  4570. psftp: no hostname specified; use "open host.name" to connect
  4571. psftp>
  4572. At this point you can type `open server.example.com' or
  4573. `open [email protected]' to start a session.
  4574. PSFTP accepts all the general command line options supported by the
  4575. PuTTY tools, except the ones which make no sense in a file transfer
  4576. utility. See section 3.11.3 for a description of these options. (The
  4577. ones not supported by PSFTP are clearly marked.)
  4578. PSFTP also supports some of its own options. The following sections
  4579. describe PSFTP's specific command-line options.
  4580. 6.1.1 `-b': specify a file containing batch commands
  4581. In normal operation, PSFTP is an interactive program which displays
  4582. a command line and accepts commands from the keyboard.
  4583. If you need to do automated tasks with PSFTP, you would probably
  4584. prefer to specify a set of commands in advance and have them
  4585. executed automatically. The `-b' option allows you to do this. You
  4586. use it with a file name containing batch commands. For example, you
  4587. might create a file called `myscript.scr' containing lines like
  4588. this:
  4589. cd /home/ftp/users/jeff
  4590. del jam-old.tar.gz
  4591. ren jam.tar.gz jam-old.tar.gz
  4592. put jam.tar.gz
  4593. chmod a+r jam.tar.gz
  4594. and then you could run the script by typing
  4595. psftp user@hostname -b myscript.scr
  4596. When you run a batch script in this way, PSFTP will abort the script
  4597. if any command fails to complete successfully. To change this
  4598. behaviour, you can add the `-be' option (section 6.1.3).
  4599. PSFTP will terminate after it finishes executing the batch script.
  4600. 6.1.2 `-bc': display batch commands as they are run
  4601. The `-bc' option alters what PSFTP displays while processing a
  4602. batch script specified with `-b'. With the `-bc' option, PSFTP will
  4603. display prompts and commands just as if the commands had been typed
  4604. at the keyboard. So instead of seeing this:
  4605. C:\>psftp fred@hostname -b batchfile
  4606. Sent username "fred"
  4607. Remote working directory is /home/fred
  4608. Listing directory /home/fred/lib
  4609. drwxrwsr-x 4 fred fred 1024 Sep 6 10:42 .
  4610. drwxr-sr-x 25 fred fred 2048 Dec 14 09:36 ..
  4611. drwxrwsr-x 3 fred fred 1024 Apr 17 2000 jed
  4612. lrwxrwxrwx 1 fred fred 24 Apr 17 2000 timber
  4613. drwxrwsr-x 2 fred fred 1024 Mar 13 2000 trn
  4614. you might see this:
  4615. C:\>psftp fred@hostname -bc -b batchfile
  4616. Sent username "fred"
  4617. Remote working directory is /home/fred
  4618. psftp> dir lib
  4619. Listing directory /home/fred/lib
  4620. drwxrwsr-x 4 fred fred 1024 Sep 6 10:42 .
  4621. drwxr-sr-x 25 fred fred 2048 Dec 14 09:36 ..
  4622. drwxrwsr-x 3 fred fred 1024 Apr 17 2000 jed
  4623. lrwxrwxrwx 1 fred fred 24 Apr 17 2000 timber
  4624. drwxrwsr-x 2 fred fred 1024 Mar 13 2000 trn
  4625. psftp> quit
  4626. 6.1.3 `-be': continue batch processing on errors
  4627. When running a batch file, this additional option causes PSFTP
  4628. to continue processing even if a command fails to complete
  4629. successfully.
  4630. You might want this to happen if you wanted to delete a file and
  4631. didn't care if it was already not present, for example.
  4632. 6.1.4 `-batch': avoid interactive prompts
  4633. If you use the `-batch' option, PSFTP will never give an interactive
  4634. prompt while establishing the connection. If the server's host key
  4635. is invalid, for example (see section 2.2), then the connection will
  4636. simply be abandoned instead of asking you what to do next.
  4637. This may help PSFTP's behaviour when it is used in automated
  4638. scripts: using `-batch', if something goes wrong at connection time,
  4639. the batch job will fail rather than hang.
  4640. 6.1.4.1 `-no-sanitise-stderr': control error message sanitisation
  4641. The `-no-sanitise-stderr' option will cause PSFTP to pass through
  4642. the server's standard-error stream literally, without stripping
  4643. control characters from it first. This might be useful if the server
  4644. were sending coloured error messages, but it also gives the server
  4645. the ability to have unexpected effects on your terminal display. For
  4646. more discussion, see section 7.2.3.5.
  4647. 6.2 Running PSFTP
  4648. Once you have started your PSFTP session, you will see a `psftp>'
  4649. prompt. You can now type commands to perform file-transfer
  4650. functions. This section lists all the available commands.
  4651. Any line starting with a # will be treated as a comment and ignored.
  4652. 6.2.1 General quoting rules for PSFTP commands
  4653. Most PSFTP commands are considered by the PSFTP command interpreter
  4654. as a sequence of words, separated by spaces. For example, the
  4655. command `ren oldfilename newfilename' splits up into three words:
  4656. `ren' (the command name), `oldfilename' (the name of the file to be
  4657. renamed), and `newfilename' (the new name to give the file).
  4658. Sometimes you will need to specify file names that _contain_ spaces.
  4659. In order to do this, you can surround the file name with double
  4660. quotes. This works equally well for local file names and remote file
  4661. names:
  4662. psftp> get "spacey file name.txt" "save it under this name.txt"
  4663. The double quotes themselves will not appear as part of the file
  4664. names; they are removed by PSFTP and their only effect is to stop
  4665. the spaces inside them from acting as word separators.
  4666. If you need to _use_ a double quote (on some types of remote system,
  4667. such as Unix, you are allowed to use double quotes in file names),
  4668. you can do this by doubling it. This works both inside and outside
  4669. double quotes. For example, this command
  4670. psftp> ren ""this"" "a file with ""quotes"" in it"
  4671. will take a file whose current name is `"this"' (with a double quote
  4672. character at the beginning and the end) and rename it to a file
  4673. whose name is `a file with "quotes" in it'.
  4674. (The one exception to the PSFTP quoting rules is the `!' command,
  4675. which passes its command line straight to Windows without splitting
  4676. it up into words at all. See section 6.2.19.)
  4677. 6.2.2 Wildcards in PSFTP
  4678. Several commands in PSFTP support `wildcards' to select multiple
  4679. files.
  4680. For _local_ file specifications (such as the first argument to
  4681. `put'), wildcard rules for the local operating system are used. For
  4682. instance, PSFTP running on Windows might require the use of `*.*'
  4683. where PSFTP on Unix would need `*'.
  4684. For _remote_ file specifications (such as the first argument to
  4685. `get'), PSFTP uses a standard wildcard syntax (similar to POSIX
  4686. wildcards):
  4687. - `*' matches any sequence of characters (including a zero-length
  4688. sequence).
  4689. - `?' matches exactly one character.
  4690. - `[abc]' matches exactly one character which can be a, b, or c.
  4691. `[a-z]' matches any character in the range a to z.
  4692. `[^abc]' matches a single character that is _not_ a, b, or c.
  4693. Special cases: `[-a]' matches a literal hyphen (-) or a; `[^-a]'
  4694. matches all other characters. `[a^]' matches a literal caret (^)
  4695. or a.
  4696. - `\' (backslash) before any of the above characters (or itself)
  4697. removes that character's special meaning.
  4698. A leading period (.) on a filename is not treated specially, unlike
  4699. in some Unix contexts; `get *' will fetch all files, whether or not
  4700. they start with a leading period.
  4701. 6.2.3 The `open' command: start a session
  4702. If you started PSFTP by double-clicking in the GUI, or just by
  4703. typing `psftp' at the command line, you will need to open a
  4704. connection to an SFTP server before you can issue any other commands
  4705. (except `help' and `quit').
  4706. To create a connection, type `open host.name', or if you need to
  4707. specify a user name as well you can type `open [email protected]'. You
  4708. can optionally specify a port as well: `open [email protected] 22'.
  4709. Once you have issued this command, you will not be able to issue it
  4710. again, _even_ if the command fails (for example, if you mistype the
  4711. host name or the connection times out). So if the connection is not
  4712. opened successfully, PSFTP will terminate immediately.
  4713. 6.2.4 The `quit' command: end your session
  4714. When you have finished your session, type the command `quit' to
  4715. close the connection, terminate PSFTP and return to the command line
  4716. (or just close the PSFTP console window if you started it from the
  4717. GUI).
  4718. You can also use the `bye' and `exit' commands, which have exactly
  4719. the same effect.
  4720. 6.2.5 The `close' command: close your connection
  4721. If you just want to close the network connection but keep PSFTP
  4722. running, you can use the `close' command. You can then use the
  4723. `open' command to open a new connection.
  4724. 6.2.6 The `help' command: get quick online help
  4725. If you type `help', PSFTP will give a short list of the available
  4726. commands.
  4727. If you type `help' with a command name - for example, `help get'
  4728. - then PSFTP will give a short piece of help on that particular
  4729. command.
  4730. 6.2.7 The `cd' and `pwd' commands: changing the remote working directory
  4731. PSFTP maintains a notion of your `working directory' on the server.
  4732. This is the default directory that other commands will operate on.
  4733. For example, if you type `get filename.dat' then PSFTP will look for
  4734. `filename.dat' in your remote working directory on the server.
  4735. To change your remote working directory, use the `cd' command. If
  4736. you don't provide an argument, `cd' will return you to your home
  4737. directory on the server (more precisely, the remote directory you
  4738. were in at the start of the connection).
  4739. To display your current remote working directory, type `pwd'.
  4740. 6.2.8 The `lcd' and `lpwd' commands: changing the local working directory
  4741. As well as having a working directory on the remote server, PSFTP
  4742. also has a working directory on your local machine (just like
  4743. any other Windows process). This is the default local directory
  4744. that other commands will operate on. For example, if you type
  4745. `get filename.dat' then PSFTP will save the resulting file as
  4746. `filename.dat' in your local working directory.
  4747. To change your local working directory, use the `lcd' command. To
  4748. display your current local working directory, type `lpwd'.
  4749. 6.2.9 The `get' command: fetch a file from the server
  4750. To download a file from the server and store it on your local PC,
  4751. you use the `get' command.
  4752. In its simplest form, you just use this with a file name:
  4753. get myfile.dat
  4754. If you want to store the file locally under a different name,
  4755. specify the local file name after the remote one:
  4756. get myfile.dat newname.dat
  4757. This will fetch the file on the server called `myfile.dat', but will
  4758. save it to your local machine under the name `newname.dat'.
  4759. To fetch an entire directory recursively, you can use the `-r'
  4760. option:
  4761. get -r mydir
  4762. get -r mydir newname
  4763. (If you want to fetch a file whose name starts with a hyphen, you
  4764. may have to use the `--' special argument, which stops `get' from
  4765. interpreting anything as a switch after it. For example, `get -- -
  4766. silly-name-'.)
  4767. 6.2.10 The `put' command: send a file to the server
  4768. To upload a file to the server from your local PC, you use the `put'
  4769. command.
  4770. In its simplest form, you just use this with a file name:
  4771. put myfile.dat
  4772. If you want to store the file remotely under a different name,
  4773. specify the remote file name after the local one:
  4774. put myfile.dat newname.dat
  4775. This will send the local file called `myfile.dat', but will store it
  4776. on the server under the name `newname.dat'.
  4777. To send an entire directory recursively, you can use the `-r'
  4778. option:
  4779. put -r mydir
  4780. put -r mydir newname
  4781. (If you want to send a file whose name starts with a hyphen, you
  4782. may have to use the `--' special argument, which stops `put' from
  4783. interpreting anything as a switch after it. For example, `put -- -
  4784. silly-name-'.)
  4785. 6.2.11 The `mget' and `mput' commands: fetch or send multiple files
  4786. `mget' works almost exactly like `get', except that it allows you to
  4787. specify more than one file to fetch at once. You can do this in two
  4788. ways:
  4789. - by giving two or more explicit file names
  4790. (`mget file1.txt file2.txt')
  4791. - by using a wildcard (`mget *.txt').
  4792. Every argument to `mget' is treated as the name of a file to fetch
  4793. (unlike `get', which will interpret at most one argument like
  4794. that, and a second argument will be treated as an alternative name
  4795. under which to store the retrieved file), or a wildcard expression
  4796. matching more than one file.
  4797. The `-r' and `--' options from `get' are also available with `mget'.
  4798. `mput' is similar to `put', with the same differences.
  4799. 6.2.12 The `reget' and `reput' commands: resuming file transfers
  4800. If a file transfer fails half way through, and you end up with half
  4801. the file stored on your disk, you can resume the file transfer using
  4802. the `reget' and `reput' commands. These work exactly like the `get'
  4803. and `put' commands, but they check for the presence of the half-
  4804. written destination file and start transferring from where the last
  4805. attempt left off.
  4806. The syntax of `reget' and `reput' is exactly the same as the syntax
  4807. of `get' and `put':
  4808. reget myfile.dat
  4809. reget myfile.dat newname.dat
  4810. reget -r mydir
  4811. These commands are intended mainly for resuming interrupted
  4812. transfers. They assume that the remote file or directory structure
  4813. has not changed in any way; if there have been changes, you may end
  4814. up with corrupted files. In particular, the `-r' option will not
  4815. pick up changes to files or directories already transferred in full.
  4816. 6.2.13 The `dir' command: list remote files
  4817. To list the files in your remote working directory, just type `dir'.
  4818. You can also list the contents of a different directory by typing
  4819. `dir' followed by the directory name:
  4820. dir /home/fred
  4821. dir sources
  4822. And you can list a subset of the contents of a directory by
  4823. providing a wildcard:
  4824. dir /home/fred/*.txt
  4825. dir sources/*.c
  4826. The `ls' command works exactly the same way as `dir'.
  4827. 6.2.14 The `chmod' command: change permissions on remote files
  4828. PSFTP allows you to modify the file permissions on files and
  4829. directories on the server. You do this using the `chmod' command,
  4830. which works very much like the Unix `chmod' command.
  4831. The basic syntax is `chmod modes file', where `modes' represents a
  4832. modification to the file permissions, and `file' is the filename to
  4833. modify. You can specify multiple files or wildcards. For example:
  4834. chmod go-rwx,u+w privatefile
  4835. chmod a+r public*
  4836. chmod 640 groupfile1 groupfile2
  4837. The `modes' parameter can be a set of octal digits in the Unix
  4838. style. (If you don't know what this means, you probably don't want
  4839. to be using it!) Alternatively, it can be a list of permission
  4840. modifications, separated by commas. Each modification consists of:
  4841. - The people affected by the modification. This can be `u'
  4842. (the owning user), `g' (members of the owning group), or `o'
  4843. (everybody else - `others'), or some combination of those. It
  4844. can also be `a' (`all') to affect everybody at once.
  4845. - A `+' or `-' sign, indicating whether permissions are to be
  4846. added or removed.
  4847. - The actual permissions being added or removed. These can be
  4848. `r' (permission to read the file), `w' (permission to write
  4849. to the file), and `x' (permission to execute the file, or in
  4850. the case of a directory, permission to access files within the
  4851. directory).
  4852. So the above examples would do:
  4853. - The first example: `go-rwx' removes read, write and execute
  4854. permissions for members of the owning group and everybody else
  4855. (so the only permissions left are the ones for the file owner).
  4856. `u+w' adds write permission for the file owner.
  4857. - The second example: `a+r' adds read permission for everybody to
  4858. all files and directories starting with `public'.
  4859. In addition to all this, there are a few extra special cases for
  4860. Unix systems. On non-Unix systems these are unlikely to be useful:
  4861. - You can specify `u+s' and `u-s' to add or remove the Unix set-
  4862. user-ID bit. This is typically only useful for special purposes;
  4863. refer to your Unix documentation if you're not sure about it.
  4864. - You can specify `g+s' and `g-s' to add or remove the Unix set-
  4865. group-ID bit. On a file, this works similarly to the set-user-
  4866. ID bit (see your Unix documentation again); on a directory it
  4867. ensures that files created in the directory are accessible by
  4868. members of the group that owns the directory.
  4869. - You can specify `+t' and `-t' to add or remove the Unix `sticky
  4870. bit'. When applied to a directory, this means that the owner of
  4871. a file in that directory can delete the file (whereas normally
  4872. only the owner of the _directory_ would be allowed to).
  4873. 6.2.15 The `del' command: delete remote files
  4874. To delete a file on the server, type `del' and then the filename or
  4875. filenames:
  4876. del oldfile.dat
  4877. del file1.txt file2.txt
  4878. del *.o
  4879. Files will be deleted without further prompting, even if multiple
  4880. files are specified.
  4881. `del' will only delete files. You cannot use it to delete
  4882. directories; use `rmdir' for that.
  4883. The `rm' command works exactly the same way as `del'.
  4884. 6.2.16 The `mkdir' command: create remote directories
  4885. To create a directory on the server, type `mkdir' and then the
  4886. directory name:
  4887. mkdir newstuff
  4888. You can specify multiple directories to create at once:
  4889. mkdir dir1 dir2 dir3
  4890. 6.2.17 The `rmdir' command: remove remote directories
  4891. To remove a directory on the server, type `rmdir' and then the
  4892. directory name or names:
  4893. rmdir oldstuff
  4894. rmdir *.old ancient
  4895. Directories will be deleted without further prompting, even if
  4896. multiple directories are specified.
  4897. Most SFTP servers will probably refuse to remove a directory if
  4898. the directory has anything in it, so you will need to delete the
  4899. contents first.
  4900. 6.2.18 The `mv' command: move and rename remote files
  4901. To rename a single file on the server, type `mv', then the current
  4902. file name, and then the new file name:
  4903. mv oldfile newname
  4904. You can also move the file into a different directory and change the
  4905. name:
  4906. mv oldfile dir/newname
  4907. To move one or more files into an existing subdirectory, specify
  4908. the files (using wildcards if desired), and then the destination
  4909. directory:
  4910. mv file dir
  4911. mv file1 dir1/file2 dir2
  4912. mv *.c *.h ..
  4913. The `rename' and `ren' commands work exactly the same way as `mv'.
  4914. 6.2.19 The `!' command: run a local Windows command
  4915. You can run local Windows commands using the `!' command. This is
  4916. the only PSFTP command that is not subject to the command quoting
  4917. rules given in section 6.2.1. If any command line begins with the
  4918. `!' character, then the rest of the line will be passed straight to
  4919. Windows without further translation.
  4920. For example, if you want to move an existing copy of a file out of
  4921. the way before downloading an updated version, you might type:
  4922. psftp> !ren myfile.dat myfile.bak
  4923. psftp> get myfile.dat
  4924. using the Windows `ren' command to rename files on your local PC.
  4925. 6.3 Using public key authentication with PSFTP
  4926. Like PuTTY, PSFTP can authenticate using a public key instead of a
  4927. password. There are three ways you can do this.
  4928. Firstly, PSFTP can use PuTTY saved sessions in place of hostnames.
  4929. So you might do this:
  4930. - Run PuTTY, and create a PuTTY saved session (see section 4.1.2)
  4931. which specifies your private key file (see section 4.22.1). You
  4932. will probably also want to specify a username to log in as (see
  4933. section 4.15.1).
  4934. - In PSFTP, you can now use the name of the session instead of
  4935. a hostname: type `psftp sessionname', where `sessionname' is
  4936. replaced by the name of your saved session.
  4937. Secondly, you can supply the name of a private key file on the
  4938. command line, with the `-i' option. See section 3.11.3.18 for more
  4939. information.
  4940. Thirdly, PSFTP will attempt to authenticate using Pageant if Pageant
  4941. is running (see chapter 9). So you would do this:
  4942. - Ensure Pageant is running, and has your private key stored in
  4943. it.
  4944. - Specify a user and host name to PSFTP as normal. PSFTP will
  4945. automatically detect Pageant and try to use the keys within it.
  4946. For more general information on public-key authentication, see
  4947. chapter 8.
  4948. Chapter 7: Using the command-line connection tool Plink
  4949. -------------------------------------------------------
  4950. Plink is a command-line connection tool similar to UNIX `ssh'. It is
  4951. mostly used for automated operations, such as making CVS access a
  4952. repository on a remote server.
  4953. Plink is probably not what you want if you want to run an
  4954. interactive session in a console window.
  4955. 7.1 Starting Plink
  4956. Plink is a command line application. This means that you cannot just
  4957. double-click on its icon to run it and instead you have to bring
  4958. up a console window. In Windows 95, 98, and ME, this is called an
  4959. `MS-DOS Prompt', and in Windows NT, 2000, and XP, it is called a
  4960. `Command Prompt'. It should be available from the Programs section
  4961. of your Start Menu.
  4962. In order to use Plink, the file `plink.exe' will need either to be
  4963. on your `PATH' or in your current directory. To add the directory
  4964. containing Plink to your `PATH' environment variable, type into the
  4965. console window:
  4966. set PATH=C:\path\to\putty\directory;%PATH%
  4967. This will only work for the lifetime of that particular console
  4968. window. To set your `PATH' more permanently on Windows NT, 2000, and
  4969. XP, use the Environment tab of the System Control Panel. On Windows
  4970. 95, 98, and ME, you will need to edit your `AUTOEXEC.BAT' to include
  4971. a `set' command like the one above.
  4972. 7.2 Using Plink
  4973. This section describes the basics of how to use Plink for
  4974. interactive logins and for automated processes.
  4975. Once you've got a console window to type into, you can type `plink -
  4976. -help' to bring up a usage message. This tells you the version of
  4977. Plink you're using, and gives you a brief summary of how to use
  4978. Plink:
  4979. C:\>plink --help
  4980. Plink: command-line connection utility
  4981. Release 0.83
  4982. Usage: plink [options] [user@]host [command]
  4983. ("host" can also be a PuTTY saved session name)
  4984. Options:
  4985. -V print version information and exit
  4986. -pgpfp print PGP key fingerprints and exit
  4987. -v show verbose messages
  4988. -load sessname Load settings from saved session
  4989. -ssh -telnet -rlogin -raw -serial
  4990. force use of a particular protocol
  4991. -ssh-connection
  4992. force use of the bare ssh-connection protocol
  4993. -P port connect to specified port
  4994. -l user connect with specified username
  4995. -batch disable all interactive prompts
  4996. -proxycmd command
  4997. use 'command' as local proxy
  4998. -sercfg configuration-string (e.g. 19200,8,n,1,X)
  4999. Specify the serial configuration (serial only)
  5000. The following options only apply to SSH connections:
  5001. -pwfile file login with password read from specified file
  5002. -D [listen-IP:]listen-port
  5003. Dynamic SOCKS-based port forwarding
  5004. -L [listen-IP:]listen-port:host:port
  5005. Forward local port to remote address
  5006. -R [listen-IP:]listen-port:host:port
  5007. Forward remote port to local address
  5008. -X -x enable / disable X11 forwarding
  5009. -A -a enable / disable agent forwarding
  5010. -t -T enable / disable pty allocation
  5011. -1 -2 force use of particular SSH protocol version
  5012. -4 -6 force use of IPv4 or IPv6
  5013. -C enable compression
  5014. -i key private key file for user authentication
  5015. -noagent disable use of Pageant
  5016. -agent enable use of Pageant
  5017. -no-trivial-auth
  5018. disconnect if SSH authentication succeeds trivially
  5019. -noshare disable use of connection sharing
  5020. -share enable use of connection sharing
  5021. -hostkey keyid
  5022. manually specify a host key (may be repeated)
  5023. -sanitise-stderr, -sanitise-stdout, -no-sanitise-stderr, -no-sanitise-stdout
  5024. do/don't strip control chars from standard output/error
  5025. -no-antispoof omit anti-spoofing prompt after authentication
  5026. -m file read remote command(s) from file
  5027. -s remote command is an SSH subsystem (SSH-2 only)
  5028. -N don't start a shell/command (SSH-2 only)
  5029. -nc host:port
  5030. open tunnel in place of session (SSH-2 only)
  5031. -sshlog file
  5032. -sshrawlog file
  5033. log protocol details to a file
  5034. -logoverwrite
  5035. -logappend
  5036. control what happens when a log file already exists
  5037. -shareexists
  5038. test whether a connection-sharing upstream exists
  5039. Once this works, you are ready to use Plink.
  5040. 7.2.1 Using Plink for interactive logins
  5041. To make a simple interactive connection to a remote server, just
  5042. type `plink' and then the host name:
  5043. C:\>plink login.example.com
  5044. Debian GNU/Linux 2.2 flunky.example.com
  5045. flunky login:
  5046. You should then be able to log in as normal and run a session. The
  5047. output sent by the server will be written straight to your command
  5048. prompt window, which will most likely not interpret terminal control
  5049. codes in the way the server expects it to. So if you run any full-
  5050. screen applications, for example, you can expect to see strange
  5051. characters appearing in your window. Interactive connections like
  5052. this are not the main point of Plink.
  5053. In order to connect with a different protocol, you can give the
  5054. command line options `-ssh', `-ssh-connection', `-telnet', `-
  5055. rlogin', or `-raw'. To make an SSH connection, for example:
  5056. C:\>plink -ssh login.example.com
  5057. login as:
  5058. If you have already set up a PuTTY saved session, then instead of
  5059. supplying a host name, you can give the saved session name. This
  5060. allows you to use public-key authentication, specify a user name,
  5061. and use most of the other features of PuTTY:
  5062. C:\>plink my-ssh-session
  5063. Sent username "fred"
  5064. Authenticating with public key "fred@winbox"
  5065. Last login: Thu Dec 6 19:25:33 2001 from :0.0
  5066. fred@flunky:~$
  5067. (You can also use the `-load' command-line option to load a saved
  5068. session; see section 3.11.3.1. If you use `-load', the saved session
  5069. exists, and it specifies a hostname, you cannot also specify a
  5070. `host' or `user@host' argument - it will be treated as part of the
  5071. remote command.)
  5072. 7.2.2 Using Plink for automated connections
  5073. More typically Plink is used with the SSH protocol, to enable you
  5074. to talk directly to a program running on the server. To do this you
  5075. have to ensure Plink is _using_ the SSH protocol. You can do this in
  5076. several ways:
  5077. - Use the `-ssh' option as described in section 7.2.1.
  5078. - Set up a PuTTY saved session that describes the server you are
  5079. connecting to, and that also specifies the protocol as SSH.
  5080. - Set the Windows environment variable `PLINK_PROTOCOL' to the
  5081. word `ssh'.
  5082. Usually Plink is not invoked directly by a user, but run
  5083. automatically by another process. Therefore you typically do not
  5084. want Plink to prompt you for a user name or a password.
  5085. Next, you are likely to need to avoid the various interactive
  5086. prompts Plink can produce. You might be prompted to verify the host
  5087. key of the server you're connecting to, to enter a user name, or to
  5088. enter a password.
  5089. To avoid being prompted for the server host key when using Plink for
  5090. an automated connection, you can first make a _manual_ connection
  5091. (using either of PuTTY or Plink) to the same server, verify the host
  5092. key (see section 2.2 for more information), and select `Accept'
  5093. to add the host key to the Registry. After that, Plink commands
  5094. connecting to that server should not give a host key prompt unless
  5095. the host key changes. Alternatively, you can specify the appropriate
  5096. host key(s) on Plink's command line every time you use it; see
  5097. section 3.11.3.22.
  5098. To avoid being prompted for a user name, you can:
  5099. - Use the `-l' option to specify a user name on the command line.
  5100. For example, `plink login.example.com -l fred'.
  5101. - Set up a PuTTY saved session that describes the server you are
  5102. connecting to, and that also specifies the username to log in as
  5103. (see section 4.15.1).
  5104. To avoid being prompted for a password, you should almost certainly
  5105. set up public-key authentication. (See chapter 8 for a general
  5106. introduction to public-key authentication.) Again, you can do this
  5107. in two ways:
  5108. - Set up a PuTTY saved session that describes the server you
  5109. are connecting to, and that also specifies a private key file
  5110. (see section 4.22.1). For this to work without prompting, your
  5111. private key will need to have no passphrase.
  5112. - Store the private key in Pageant. See chapter 9 for further
  5113. information.
  5114. Once you have done all this, you should be able to run a remote
  5115. command on the SSH server machine and have it execute automatically
  5116. with no prompting:
  5117. C:\>plink login.example.com -l fred echo hello, world
  5118. hello, world
  5119. C:\>
  5120. Or, if you have set up a saved session with all the connection
  5121. details:
  5122. C:\>plink mysession echo hello, world
  5123. hello, world
  5124. C:\>
  5125. Then you can set up other programs to run this Plink command and
  5126. talk to it as if it were a process on the server machine.
  5127. 7.2.3 Plink command line options
  5128. Plink accepts all the general command line options supported by the
  5129. PuTTY tools. See section 3.11.3 for a description of these options.
  5130. Plink also supports some of its own options. The following sections
  5131. describe Plink's specific command-line options.
  5132. 7.2.3.1 `-batch': disable all interactive prompts
  5133. If you use the `-batch' option, Plink will never give an interactive
  5134. prompt while establishing the connection. If the server's host key
  5135. is invalid, for example (see section 2.2), then the connection will
  5136. simply be abandoned instead of asking you what to do next.
  5137. This may help Plink's behaviour when it is used in automated
  5138. scripts: using `-batch', if something goes wrong at connection time,
  5139. the batch job will fail rather than hang.
  5140. If another program is invoking Plink on your behalf, then you might
  5141. need to arrange that that program passes `-batch' to Plink. See
  5142. section 7.4 for an example involving Git.
  5143. 7.2.3.2 `-s': remote command is SSH subsystem
  5144. If you specify the `-s' option, Plink passes the specified command
  5145. as the name of an SSH `subsystem' rather than an ordinary command
  5146. line.
  5147. (This option is only meaningful with the SSH-2 protocol.)
  5148. 7.2.3.3 `-share': Test and try to share an existing connection.
  5149. This option tries to detect if an existing connection can be shared
  5150. (See section 4.17.5 for more information about SSH connection
  5151. sharing.) and reuses that connection.
  5152. A Plink invocation of the form:
  5153. plink -share <session>
  5154. will test whether there is currently a viable `upstream' for the
  5155. session in question, which can be specified using any syntax you'd
  5156. normally use with Plink to make an actual connection (a host/port
  5157. number, a bare saved session name, `-load', etc). If no `upstream'
  5158. viable session is found and `-share' is specified, this connection
  5159. will be become the `upstream' connection for subsequent connection
  5160. sharing tries.
  5161. (This option is only meaningful with the SSH-2 protocol.)
  5162. 7.2.3.4 `-shareexists': test for connection-sharing upstream
  5163. This option does not make a new connection; instead it allows
  5164. testing for the presence of an existing connection that can
  5165. be shared. (See section 4.17.5 for more information about SSH
  5166. connection sharing.)
  5167. A Plink invocation of the form:
  5168. plink -shareexists <session>
  5169. will test whether there is currently a viable `upstream' for the
  5170. session in question, which can be specified using any syntax you'd
  5171. normally use with Plink to make an actual connection (a host/port
  5172. number, a bare saved session name, `-load', etc). It returns a zero
  5173. exit status if a usable `upstream' exists, nonzero otherwise.
  5174. (This option is only meaningful with the SSH-2 protocol.)
  5175. 7.2.3.5 `-sanitise-'_stream_: control output sanitisation
  5176. In some situations, Plink applies a sanitisation pass to the output
  5177. received from the server, to strip out control characters such as
  5178. backspace and the escape character.
  5179. The idea of this is to prevent remote processes from sending
  5180. confusing escape sequences through the standard error channel when
  5181. Plink is being used as a transport for something like git or CVS. If
  5182. the server actually wants to send an error message, it will probably
  5183. be plain text; if the server abuses that channel to try to write
  5184. over unexpected parts of your terminal display, Plink will try to
  5185. stop it.
  5186. By default, this only happens for output channels which are sent
  5187. to a Windows console device, or a Unix terminal device. (Any
  5188. output stream going somewhere else is likely to be needed by an 8-
  5189. bit protocol and must not be tampered with at all.) It also stops
  5190. happening if you tell Plink to allocate a remote pseudo-terminal
  5191. (see section 3.11.3.12 and section 4.24.1), on the basis that in
  5192. that situation you often _want_ escape sequences from the server to
  5193. go to your terminal.
  5194. But in case Plink guesses wrong about whether you want this
  5195. sanitisation, you can override it in either direction, using one of
  5196. these options:
  5197. `-sanitise-stderr'
  5198. Sanitise server data written to Plink's standard error channel,
  5199. regardless of terminals and consoles and remote ptys.
  5200. `-no-sanitise-stderr'
  5201. Do not sanitise server data written to Plink's standard error
  5202. channel.
  5203. `-sanitise-stdout'
  5204. Sanitise server data written to Plink's standard output channel.
  5205. `-no-sanitise-stdout'
  5206. Do not sanitise server data written to Plink's standard output
  5207. channel.
  5208. 7.2.3.6 -no-antispoof: turn off authentication spoofing protection prompt
  5209. In SSH, some possible server authentication methods require user
  5210. input (for example, password authentication, or entering a private
  5211. key passphrase), and others do not (e.g. a private key held in
  5212. Pageant).
  5213. If you use Plink to run an interactive login session, and if Plink
  5214. authenticates without needing any user interaction, and if the
  5215. server is malicious or compromised, it could try to trick you into
  5216. giving it authentication data that should not go to the server (such
  5217. as your private key passphrase), by sending what _looks_ like one of
  5218. Plink's local prompts, as if Plink had not already authenticated.
  5219. To protect against this, Plink's default policy is to finish the
  5220. authentication phase with a final trivial prompt looking like this:
  5221. Access granted. Press Return to begin session.
  5222. so that if you saw anything that looked like an authentication
  5223. prompt _after_ that line, you would know it was not from Plink.
  5224. That extra interactive step is inconvenient. So Plink will turn it
  5225. off in as many situations as it can:
  5226. - If Plink's standard input is not pointing at a console or
  5227. terminal device - for example, if you're using Plink as a
  5228. transport for some automated application like version control
  5229. - then you _can't_ type passphrases into the server anyway. In
  5230. that situation, Plink won't try to protect you from the server
  5231. trying to fool you into doing so.
  5232. - If Plink is in batch mode (see section 7.2.2), then it _never_
  5233. does any interactive authentication. So anything looking like an
  5234. interactive authentication prompt is automatically suspect, and
  5235. so Plink omits the anti-spoofing prompt.
  5236. But if you still find the protective prompt inconvenient, and you
  5237. trust the server not to try a trick like this, you can turn it off
  5238. using the `-no-antispoof' option.
  5239. 7.3 Using Plink in batch files and scripts
  5240. Once you have set up Plink to be able to log in to a remote server
  5241. without any interactive prompting (see section 7.2.2), you can use
  5242. it for lots of scripting and batch purposes. For example, to start a
  5243. backup on a remote machine, you might use a command like:
  5244. plink root@myserver /etc/backups/do-backup.sh
  5245. Or perhaps you want to fetch all system log lines relating to a
  5246. particular web area:
  5247. plink mysession grep /~fred/ /var/log/httpd/access.log > fredlog
  5248. Any non-interactive command you could usefully run on the server
  5249. command line, you can run in a batch file using Plink in this way.
  5250. 7.4 Using Plink with Git
  5251. To use Plink for Git operations performed over SSH, you can set the
  5252. environment variable `GIT_SSH_COMMAND' to point to Plink.
  5253. For example, if you've run PuTTY's full Windows installer and it has
  5254. installed Plink in the default location, you might do this:
  5255. set GIT_SSH_COMMAND="C:\Program Files\PuTTY\plink.exe"
  5256. or if you've put Plink somewhere else then you can do a similar
  5257. thing with a different path.
  5258. This environment variable accepts a whole command line, not just an
  5259. executable file name. So you can add Plink options to the end of
  5260. it if you like. For example, if you're using Git in a batch-mode
  5261. context, where your Git jobs are running unattended and nobody is
  5262. available to answer interactive prompts, you might also append the
  5263. `-batch' option (section 7.2.3.1):
  5264. set GIT_SSH_COMMAND="C:\Program Files\PuTTY\plink.exe" -batch
  5265. and then if Plink unexpectedly prints a prompt of some kind (for
  5266. example, because the SSH server's host key has changed), your batch
  5267. job will terminate with an error message, instead of stopping and
  5268. waiting for user input that will never arrive.
  5269. (However, you don't _always_ want to do this with Git. If you're
  5270. using Git interactively, you might _want_ Plink to stop for
  5271. interactive prompts - for example, to let you enter a password for
  5272. the SSH server.)
  5273. 7.5 Using Plink with CVS
  5274. To use Plink with CVS, you need to set the environment variable
  5275. `CVS_RSH' to point to Plink:
  5276. set CVS_RSH=\path\to\plink.exe
  5277. You also need to arrange to be able to connect to a remote host
  5278. without any interactive prompts, as described in section 7.2.2.
  5279. You should then be able to run CVS as follows:
  5280. cvs -d :ext:user@sessionname:/path/to/repository co module
  5281. If you specified a username in your saved session, you don't even
  5282. need to specify the `user' part of this, and you can just say:
  5283. cvs -d :ext:sessionname:/path/to/repository co module
  5284. 7.6 Using Plink with WinCVS
  5285. Plink can also be used with WinCVS. Firstly, arrange for Plink to be
  5286. able to connect to a remote host non-interactively, as described in
  5287. section 7.2.2.
  5288. Then, in WinCVS, bring up the `Preferences' dialogue box from the
  5289. _Admin_ menu, and switch to the `Ports' tab. Tick the box there
  5290. labelled `Check for an alternate rsh name' and in the text entry
  5291. field to the right enter the full path to `plink.exe'. Select `OK'
  5292. on the `Preferences' dialogue box.
  5293. Next, select `Command Line' from the WinCVS `Admin' menu, and type a
  5294. CVS command as in section 7.5, for example:
  5295. cvs -d :ext:user@hostname:/path/to/repository co module
  5296. or (if you're using a saved session):
  5297. cvs -d :ext:user@sessionname:/path/to/repository co module
  5298. Select the folder you want to check out to with the `Change Folder'
  5299. button, and click `OK' to check out your module. Once you've got
  5300. modules checked out, WinCVS will happily invoke plink from the GUI
  5301. for CVS operations.
  5302. Chapter 8: Using public keys for SSH authentication
  5303. ---------------------------------------------------
  5304. 8.1 Public key authentication - an introduction
  5305. Public key authentication is an alternative means of identifying
  5306. yourself to a login server, instead of typing a password. It is more
  5307. secure and more flexible, but more difficult to set up.
  5308. In conventional password authentication, you prove you are who you
  5309. claim to be by proving that you know the correct password. The
  5310. only way to prove you know the password is to tell the server what
  5311. you think the password is. This means that if the server has been
  5312. hacked, or _spoofed_ (see section 2.2), an attacker can learn your
  5313. password.
  5314. Public key authentication solves this problem. You generate a _key
  5315. pair_, consisting of a public key (which everybody is allowed to
  5316. know) and a private key (which you keep secret and do not give
  5317. to anybody). The private key is able to generate _signatures_. A
  5318. signature created using your private key cannot be forged by anybody
  5319. who does not have that key; but anybody who has your public key can
  5320. verify that a particular signature is genuine.
  5321. So you generate a key pair on your own computer, and you copy the
  5322. public key to the server. Then, when the server asks you to prove
  5323. who you are, PuTTY can generate a signature using your private key.
  5324. The server can verify that signature (since it has your public key)
  5325. and allow you to log in. Now if the server is hacked or spoofed, the
  5326. attacker does not gain your private key or password; they only gain
  5327. one signature. And signatures cannot be re-used, so they have gained
  5328. nothing.
  5329. There is a problem with this: if your private key is stored
  5330. unprotected on your own computer, then anybody who gains access to
  5331. _that_ will be able to generate signatures as if they were you. So
  5332. they will be able to log in to your server under your account. For
  5333. this reason, your private key is usually _encrypted_ when it is
  5334. stored on your local machine, using a passphrase of your choice. In
  5335. order to generate a signature, PuTTY must decrypt the key, so you
  5336. have to type your passphrase.
  5337. This can make public-key authentication less convenient than
  5338. password authentication: every time you log in to the server,
  5339. instead of typing a short password, you have to type a longer
  5340. passphrase. One solution to this is to use an _authentication
  5341. agent_, a separate program which holds decrypted private keys and
  5342. generates signatures on request. PuTTY's authentication agent is
  5343. called Pageant. When you begin a Windows session, you start Pageant
  5344. and load your private key into it (typing your passphrase once).
  5345. For the rest of your session, you can start PuTTY any number of
  5346. times and Pageant will automatically generate signatures without you
  5347. having to do anything. When you close your Windows session, Pageant
  5348. shuts down, without ever having stored your decrypted private key on
  5349. disk. Many people feel this is a good compromise between security
  5350. and convenience. See chapter 9 for further details.
  5351. There is more than one public-key algorithm available. The most
  5352. common are RSA and ECDSA, but others exist, notably DSA (otherwise
  5353. known as DSS), the USA's federal Digital Signature Standard. The key
  5354. types supported by PuTTY are described in section 8.2.2.
  5355. 8.2 Using PuTTYgen, the PuTTY key generator
  5356. PuTTYgen is a key generator. It generates pairs of public and
  5357. private keys to be used with PuTTY, PSCP, PSFTP, and Plink, as well
  5358. as the PuTTY authentication agent, Pageant (see chapter 9). PuTTYgen
  5359. generates RSA, DSA, ECDSA, and EdDSA keys.
  5360. When you run PuTTYgen you will see a window where you have two main
  5361. choices: `Generate', to generate a new public/private key pair, or
  5362. `Load' to load in an existing private key.
  5363. 8.2.1 Generating a new key
  5364. This is a general outline of the procedure for generating a new key
  5365. pair. The following sections describe the process in more detail.
  5366. - First, you need to select which type of key you want to
  5367. generate, and also select the strength of the key. This is
  5368. described in more detail in section 8.2.2 and section 8.2.3.
  5369. - Then press the `Generate' button, to actually generate the key.
  5370. Section 8.2.5 describes this step.
  5371. - Once you have generated the key, select a comment field (section
  5372. 8.2.7) and a passphrase (section 8.2.8).
  5373. - Now you're ready to save the private key to disk; press the
  5374. `Save private key' button. (See section 8.2.10).
  5375. Your key pair is now ready for use. You may also want to copy the
  5376. public key to your server, either by copying it out of the `Public
  5377. key for pasting into OpenSSH authorized_keys file' box (see section
  5378. 8.2.12), or by using the `Save public key' button (section 8.2.11).
  5379. However, you don't need to do this immediately; if you want, you can
  5380. load the private key back into PuTTYgen later (see section 8.2.14)
  5381. and the public key will be available for copying and pasting again.
  5382. Section 8.3 describes the typical process of configuring PuTTY to
  5383. attempt public-key authentication, and configuring your SSH server
  5384. to accept it.
  5385. 8.2.2 Selecting the type of key
  5386. Before generating a key pair using PuTTYgen, you need to select
  5387. which type of key you need.
  5388. The current version of the SSH protocol, SSH-2, supports several
  5389. different key types, although specific servers may not support all
  5390. of them. PuTTYgen can generate:
  5391. - An RSA key for use with the SSH-2 protocol.
  5392. - A DSA key for use with the SSH-2 protocol.
  5393. - An ECDSA (elliptic curve DSA) key for use with the SSH-2
  5394. protocol.
  5395. - An EdDSA key (Edwards-curve DSA, another elliptic curve
  5396. algorithm) for use with the SSH-2 protocol.
  5397. PuTTYgen can also generate an RSA key suitable for use with the
  5398. old SSH-1 protocol (which only supports RSA); for this, you need
  5399. to select the `SSH-1 (RSA)' option. Since the SSH-1 protocol is no
  5400. longer considered secure, it's rare to need this option.
  5401. 8.2.3 Selecting the size (strength) of the key
  5402. The `Number of bits' input box allows you to choose the strength of
  5403. the key PuTTYgen will generate.
  5404. - For RSA and DSA, 2048 bits should currently be sufficient for
  5405. most purposes. (Smaller keys of these types are no longer
  5406. considered secure, and PuTTYgen will warn if you try to generate
  5407. them.)
  5408. - For ECDSA, only 256, 384, and 521 bits are supported,
  5409. corresponding to NIST-standardised elliptic curves. (Elliptic-
  5410. curve keys do not need as many bits as RSA keys for equivalent
  5411. security, so these numbers are smaller than the RSA
  5412. recommendations.)
  5413. - For EdDSA, the only valid sizes are 255 bits (these keys are
  5414. also known as `Ed25519' and are commonly used) and 448 bits
  5415. (`Ed448', which is much less common at the time of writing).
  5416. (256 is also accepted for backward compatibility, but the effect
  5417. is the same as 255.)
  5418. 8.2.4 Selecting the prime generation method
  5419. (This is entirely optional. Unless you know better, it's entirely
  5420. sensible to skip this and use the default settings.)
  5421. On the `Key' menu, you can also optionally change the method for
  5422. generating the prime numbers used in the generated key. This is
  5423. used for RSA and DSA keys only. (The other key types don't require
  5424. generating prime numbers at all.)
  5425. The prime-generation method does not affect compatibility: a key
  5426. generated with any of these methods will still work with all the
  5427. same SSH servers.
  5428. The available methods are:
  5429. - Use probable primes (fast)
  5430. - Use proven primes (slower)
  5431. - Use proven primes with even distribution (slowest)
  5432. The `probable primes' method sounds unsafe, but it's the most
  5433. commonly used prime-generation strategy. There is in theory a
  5434. possibility that it might accidentally generate a number that
  5435. isn't prime, but the software does enough checking to make that
  5436. probability vanishingly small (less than 1 in 2^80, or 1 in 10^24).
  5437. So, in practice, nobody worries about it very much.
  5438. The other methods cause PuTTYgen to use numbers that it is _sure_
  5439. are prime, because it generates the output number together with a
  5440. proof of its primality. This takes more effort, but it eliminates
  5441. that theoretical risk in the probabilistic method.
  5442. There in one way in which PuTTYgen's `proven primes' method is
  5443. not strictly better than its `probable primes' method. If you use
  5444. PuTTYgen to generate an RSA key on a computer that is potentially
  5445. susceptible to timing- or cache-based side-channel attacks, such
  5446. as a shared computer, the `probable primes' method is designed to
  5447. resist such attacks, whereas the `proven primes' methods are not.
  5448. (This is only a concern for RSA keys; for other key types, primes
  5449. are either not secret or not involved.)
  5450. You might choose to switch from probable to proven primes if you
  5451. have a local security standard that demands it, or if you don't
  5452. trust the probabilistic argument for the safety of the usual method.
  5453. For RSA keys, there's also an option on the `Key' menu to use
  5454. `strong' primes as the prime factors of the public key. A `strong'
  5455. prime is a prime number chosen to have a particular structure that
  5456. makes certain factoring algorithms more difficult to apply, so some
  5457. security standards recommend their use. However, the most modern
  5458. factoring algorithms are unaffected, so this option is probably not
  5459. worth turning on _unless_ you have a local standard that recommends
  5460. it.
  5461. 8.2.5 The `Generate' button
  5462. Once you have chosen the type of key you want, and the strength of
  5463. the key, press the `Generate' button and PuTTYgen will begin the
  5464. process of actually generating the key.
  5465. First, a progress bar will appear and PuTTYgen will ask you to move
  5466. the mouse around to generate randomness. Wave the mouse in circles
  5467. over the blank area in the PuTTYgen window, and the progress bar
  5468. will gradually fill up as PuTTYgen collects enough randomness. You
  5469. don't need to wave the mouse in particularly imaginative patterns
  5470. (although it can't hurt); PuTTYgen will collect enough randomness
  5471. just from the fine detail of _exactly_ how far the mouse has moved
  5472. each time Windows samples its position.
  5473. When the progress bar reaches the end, PuTTYgen will begin creating
  5474. the key. The progress bar will reset to the start, and gradually
  5475. move up again to track the progress of the key generation. It will
  5476. not move evenly, and may occasionally slow down to a stop; this
  5477. is unfortunately unavoidable, because key generation is a random
  5478. process and it is impossible to reliably predict how long it will
  5479. take.
  5480. When the key generation is complete, a new set of controls will
  5481. appear in the window to indicate this.
  5482. 8.2.6 The `Key fingerprint' box
  5483. The `Key fingerprint' box shows you a fingerprint value for the
  5484. generated key. This is derived cryptographically from the _public_
  5485. key value, so it doesn't need to be kept secret; it is supposed to
  5486. be more manageable for human beings than the public key itself.
  5487. The fingerprint value is intended to be cryptographically secure,
  5488. in the sense that it is computationally infeasible for someone to
  5489. invent a second key with the same fingerprint, or to find a key with
  5490. a particular fingerprint. So some utilities, such as the Pageant key
  5491. list box (see section 9.2.1) and the Unix `ssh-add' utility, will
  5492. list key fingerprints rather than the whole public key.
  5493. By default, PuTTYgen will display SSH-2 key fingerprints in the
  5494. `SHA256' format. If you need to see the fingerprint in the older
  5495. `MD5' format (which looks like `aa:bb:cc:...'), you can choose `Show
  5496. fingerprint as MD5' from the `Key' menu, but bear in mind that this
  5497. is less cryptographically secure; it may be feasible for an attacker
  5498. to create a key with the same fingerprint as yours.
  5499. 8.2.7 Setting a comment for your key
  5500. If you have more than one key and use them for different purposes,
  5501. you don't need to memorise the key fingerprints in order to tell
  5502. them apart. PuTTYgen allows you to enter a _comment_ for your key,
  5503. which will be displayed whenever PuTTY or Pageant asks you for the
  5504. passphrase.
  5505. The default comment format, if you don't specify one, contains the
  5506. key type and the date of generation, such as `rsa-key-20011212'.
  5507. Another commonly used approach is to use your name and the name of
  5508. the computer the key will be used on, such as `simon@simons-pc'.
  5509. To alter the key comment, just type your comment text into the `Key
  5510. comment' box before saving the private key. If you want to change
  5511. the comment later, you can load the private key back into PuTTYgen,
  5512. change the comment, and save it again.
  5513. 8.2.8 Setting a passphrase for your key
  5514. The `Key passphrase' and `Confirm passphrase' boxes allow you to
  5515. choose a passphrase for your key. The passphrase will be used to
  5516. encrypt the key on disk, so you will not be able to use the key
  5517. without first entering the passphrase.
  5518. When you save the key, PuTTYgen will check that the `Key passphrase'
  5519. and `Confirm passphrase' boxes both contain exactly the same
  5520. passphrase, and will refuse to save the key otherwise.
  5521. If you leave the passphrase fields blank, the key will be saved
  5522. unencrypted. You should _not_ do this without good reason; if you
  5523. do, your private key file on disk will be all an attacker needs to
  5524. gain access to any machine configured to accept that key. If you
  5525. want to be able to log in without having to type a passphrase every
  5526. time, you should consider using Pageant (chapter 9) so that your
  5527. decrypted key is only held in memory rather than on disk.
  5528. Under special circumstances you may genuinely _need_ to use a key
  5529. with no passphrase; for example, if you need to run an automated
  5530. batch script that needs to make an SSH connection, you can't be
  5531. there to type the passphrase. In this case we recommend you generate
  5532. a special key for each specific batch script (or whatever) that
  5533. needs one, and on the server side you should arrange that each
  5534. key is _restricted_ so that it can only be used for that specific
  5535. purpose. The documentation for your SSH server should explain how to
  5536. do this (it will probably vary between servers).
  5537. Choosing a good passphrase is difficult. Just as you shouldn't use
  5538. a dictionary word as a password because it's easy for an attacker
  5539. to run through a whole dictionary, you should not use a song
  5540. lyric, quotation or other well-known sentence as a passphrase.
  5541. DiceWare (www.diceware.com) recommends using at least five words
  5542. each generated randomly by rolling five dice, which gives over
  5543. 2^64 possible passphrases and is probably not a bad scheme. If you
  5544. want your passphrase to make grammatical sense, this cuts down the
  5545. possibilities a lot and you should use a longer one as a result.
  5546. _Do not forget your passphrase_. There is no way to recover it.
  5547. 8.2.9 Adding a certificate to your key
  5548. In some environments, user authentication keys can be signed in turn
  5549. by a `certifying authority' (`CA' for short), and user accounts
  5550. on an SSH server can be configured to automatically trust any key
  5551. that's certified by the right signature.
  5552. This can be a convenient setup if you have a very large number of
  5553. servers. When you change your key pair, you might otherwise have to
  5554. edit the authorized_keys file on every server individually, to make
  5555. them all accept the new key. But if instead you configure all those
  5556. servers _once_ to accept keys signed as yours by a CA, then when you
  5557. change your public key, all you have to do is to get the new key
  5558. certified by the same CA as before, and then all your servers will
  5559. automatically accept it without needing individual reconfiguration.
  5560. To get your key signed by a CA, you'll probably send the CA the new
  5561. _public_ key (not the private half), and get back a modified version
  5562. of the public key with the certificate included.
  5563. If you want to incorporate the certificate into your PPK file for
  5564. convenience, you can use the `Add certificate to key' menu option in
  5565. PuTTYgen's `Key' menu. This will give you a single file containing
  5566. your private key and the certificate, which is everything you need
  5567. to authenticate to a server prepared to accept that certificate.
  5568. To remove the certificate again and restore the uncertified PPK
  5569. file, there's also a `Remove certificate from key' option.
  5570. (However, you don't _have_ to incorporate the certificate into
  5571. your PPK file. You can equally well use it separately, via the
  5572. `Certificate to use with the private key' option in PuTTY itself.
  5573. See section 4.22.2. It's up to you which you find more convenient.)
  5574. When the currently loaded key in PuTTYgen contains a certificate,
  5575. the large `Public key for pasting' edit box (see section 8.2.12)
  5576. is replaced by a button that brings up an information box telling
  5577. you about the certificate, such as who it certifies your key as
  5578. belonging to, when it expires (if ever), and the fingerprint of the
  5579. CA key that signed it in turn.
  5580. 8.2.10 Saving your private key to a disk file
  5581. Once you have generated a key, set a comment field and set a
  5582. passphrase, you are ready to save your private key to disk.
  5583. Press the `Save private key' button. PuTTYgen will put up a dialog
  5584. box asking you where to save the file. Select a directory, type in a
  5585. file name, and press `Save'.
  5586. This file is in PuTTY's native format (`*.PPK'); it is the one you
  5587. will need to tell PuTTY to use for authentication (see section
  5588. 4.22.1) or tell Pageant to load (see section 9.2.2).
  5589. (You can optionally change some details of the PPK format for your
  5590. saved key files; see section 8.2.13. But the defaults should be fine
  5591. for most purposes.)
  5592. 8.2.11 Saving your public key to a disk file
  5593. RFC 4716 specifies a standard format for storing SSH-2 public keys
  5594. on disk. Some SSH servers (such as ssh.com's) require a public
  5595. key in this format in order to accept authentication with the
  5596. corresponding private key. (Others, such as OpenSSH, use a different
  5597. format; see section 8.2.12.)
  5598. To save your public key in the SSH-2 standard format, press the
  5599. `Save public key' button in PuTTYgen. PuTTYgen will put up a dialog
  5600. box asking you where to save the file. Select a directory, type in a
  5601. file name, and press `Save'.
  5602. You will then probably want to copy the public key file to your
  5603. SSH server machine. See section 8.3 for general instructions on
  5604. configuring public-key authentication once you have generated a key.
  5605. If you use this option with an SSH-1 key, the file PuTTYgen saves
  5606. will contain exactly the same text that appears in the `Public key
  5607. for pasting' box. This is the only existing standard for SSH-1
  5608. public keys.
  5609. 8.2.12 `Public key for pasting into OpenSSH authorized_keys file'
  5610. The OpenSSH server, among others, requires your public key
  5611. to be given to it in a one-line format before it will accept
  5612. authentication with your private key. (SSH-1 servers also used this
  5613. method.)
  5614. The `Public key for pasting into OpenSSH authorized_keys file' gives
  5615. the public-key data in the correct one-line format. Typically you
  5616. will want to select the entire contents of the box using the mouse,
  5617. press Ctrl+C to copy it to the clipboard, and then paste the data
  5618. into a PuTTY session which is already connected to the server.
  5619. See section 8.3 for general instructions on configuring public-key
  5620. authentication once you have generated a key.
  5621. 8.2.13 Parameters for saving key files
  5622. Selecting `Parameters for saving key files...' from the `Key'
  5623. menu lets you adjust some aspects of PPK-format private key files
  5624. stored on disk. None of these options affect compatibility with SSH
  5625. servers.
  5626. In most cases, it's entirely sensible to leave all of these at their
  5627. default settings.
  5628. 8.2.13.1 PPK file version
  5629. This defaults to version 3, which is fine for most uses.
  5630. You might need to select PPK version 2 if you need your private key
  5631. file to be loadable in older versions of PuTTY (0.74 and older), or
  5632. in other tools which do not yet support the version 3 format (which
  5633. was introduced in 2021).
  5634. The version 2 format is less resistant to brute-force decryption,
  5635. and doesn't support any of the following options to control that.
  5636. 8.2.13.2 Options affecting passphrase hashing
  5637. All of the following options only affect keys saved with
  5638. passphrases. They control how much work is required to decrypt the
  5639. key (which happens every time you type its passphrase). This allows
  5640. you to trade off the cost of legitimate use of the key against the
  5641. resistance of the encrypted key to password-guessing attacks.
  5642. These options only affect PPK version 3.
  5643. Key derivation function
  5644. The variant of the Argon2 key derivation function to use. You
  5645. might change this if you consider your exposure to side-channel
  5646. attacks to be different to the norm.
  5647. Memory to use for passphrase hash
  5648. The amount of memory needed to decrypt the key, in Kbyte.
  5649. Time to use for passphrase hash
  5650. Controls how much time is required to attempt decrypting the
  5651. key. You can either specify an approximate time in milliseconds
  5652. (on this machine), or explicitly specify a number of hash passes
  5653. (which is what the time is turned into during encryption).
  5654. Parallelism for passphrase hash
  5655. Number of parallelisable threads that can be used to decrypt the
  5656. key. The default, 1, forces the process to run single-threaded,
  5657. even on machines with multiple cores.
  5658. 8.2.14 Reloading a private key
  5659. PuTTYgen allows you to load an existing private key file into
  5660. memory. If you do this, you can then change the passphrase and
  5661. comment before saving it again; you can also make extra copies of
  5662. the public key.
  5663. To load an existing key, press the `Load' button. PuTTYgen will put
  5664. up a dialog box where you can browse around the file system and find
  5665. your key file. Once you select the file, PuTTYgen will ask you for a
  5666. passphrase (if necessary) and will then display the key details in
  5667. the same way as if it had just generated the key.
  5668. If you use the Load command to load a foreign key format, it will
  5669. work, but you will see a message box warning you that the key you
  5670. have loaded is not a PuTTY native key. See section 8.2.15 for
  5671. information about importing foreign key formats.
  5672. 8.2.15 Dealing with private keys in other formats
  5673. SSH-2 private keys have no standard format. OpenSSH and ssh.com
  5674. have different formats, and PuTTY's is different again. So a key
  5675. generated with one client cannot immediately be used with another.
  5676. Using the `Import' command from the `Conversions' menu, PuTTYgen can
  5677. load SSH-2 private keys in OpenSSH's format and ssh.com's format.
  5678. Once you have loaded one of these key types, you can then save it
  5679. back out as a PuTTY-format key (`*.PPK') so that you can use it with
  5680. the PuTTY suite. The passphrase will be unchanged by this process
  5681. (unless you deliberately change it). You may want to change the key
  5682. comment before you save the key, since some OpenSSH key formats
  5683. contained no space for a comment, and ssh.com's default comment
  5684. format is long and verbose.
  5685. PuTTYgen can also export private keys in OpenSSH format and in
  5686. ssh.com format. To do so, select one of the `Export' options from
  5687. the `Conversions' menu. Exporting a key works exactly like saving
  5688. it (see section 8.2.10) - you need to have typed your passphrase in
  5689. beforehand, and you will be warned if you are about to save a key
  5690. without a passphrase.
  5691. For OpenSSH there are two options. Modern OpenSSH actually has two
  5692. formats it uses for storing private keys: an older (`PEM-style')
  5693. format, and a newer `native' format with better resistance to
  5694. passphrase guessing and support for comments. `Export OpenSSH key'
  5695. will automatically choose the oldest format supported for the key
  5696. type, for maximum backward compatibility with older versions of
  5697. OpenSSH; for newer key types like Ed25519, it will use the newer
  5698. format as that is the only legal option. If you have some specific
  5699. reason for wanting to use OpenSSH's newer format even for RSA,
  5700. DSA, or ECDSA keys - for instance, you know your file will only
  5701. be used by OpenSSH 6.5 or newer (released in 2014), and want the
  5702. extra security - you can choose `Export OpenSSH key (force new file
  5703. format)'.
  5704. Most clients for the older SSH-1 protocol use a standard format for
  5705. storing private keys on disk. PuTTY uses this format as well; so if
  5706. you have generated an SSH-1 private key using OpenSSH or ssh.com's
  5707. client, you can use it with PuTTY, and vice versa. Hence, the export
  5708. options are not available if you have generated an SSH-1 key.
  5709. 8.2.16 PuTTYgen command-line configuration
  5710. PuTTYgen supports a set of command-line options to configure many
  5711. of the same settings you can select in the GUI. This allows you to
  5712. start it up with your own preferences ready-selected, which might be
  5713. useful if you generate a lot of keys. (For example, you could make a
  5714. Windows shortcut that runs PuTTYgen with some command line options,
  5715. or a batch file or Powershell script that you could distribute to a
  5716. whole organisation containing your local standards.)
  5717. The options supported on the command line are:
  5718. -t _keytype_
  5719. Type of key to generate. You can select `rsa', `dsa', `ecdsa',
  5720. `eddsa', `ed25519', `ed448', or `rsa1'. See section 8.2.2.
  5721. -b _bits_
  5722. Size of the key to generate, in bits. See section 8.2.3.
  5723. --primes _method_
  5724. Method for generating prime numbers. You can select `probable',
  5725. `proven', and `proven-even'. See section 8.2.4.
  5726. --strong-rsa
  5727. When generating an RSA key, make sure the prime factors of the
  5728. key modulus are `strong primes'. See section 8.2.4.
  5729. --ppk-param _key_=_value_,...
  5730. Allows setting all the same details of the PPK save file format
  5731. described in section 8.2.13.
  5732. Aspects to change are specified as a series of _key_=_value_
  5733. pairs separated by commas. The _key_s are:
  5734. version
  5735. The PPK format version: either 3 or 2.
  5736. kdf
  5737. The variant of Argon2 to use: argon2id, argon2i, and
  5738. argon2d.
  5739. memory
  5740. The amount of memory needed to decrypt the key, in Kbyte.
  5741. time
  5742. Specifies how much time is required to attempt decrypting
  5743. the key, in milliseconds.
  5744. passes
  5745. Alternative to time: specifies the number of hash passes
  5746. required to attempt decrypting the key.
  5747. parallelism
  5748. Number of parallelisable threads that can be used to decrypt
  5749. the key.
  5750. -E _fptype_
  5751. Algorithm to use when displaying key fingerprints. You can
  5752. select `sha256' or `md5'. See section 8.2.6.
  5753. 8.3 Getting ready for public key authentication
  5754. Connect to your SSH server using PuTTY with the SSH protocol. When
  5755. the connection succeeds you will be prompted for your user name and
  5756. password to login. Once logged in, you must configure the server to
  5757. accept your public key for authentication:
  5758. - If your server is OpenSSH, you should change into the `.ssh'
  5759. directory under your home directory, and open the file
  5760. `authorized_keys' with your favourite editor. (You may have
  5761. to create this file, if this is the first key you have put in
  5762. it.) Then switch to the PuTTYgen window, select all of the text
  5763. in the `Public key for pasting into OpenSSH authorized_keys
  5764. file' box (see section 8.2.12), and copy it to the clipboard
  5765. (`Ctrl+C'). Then, switch back to the PuTTY window and insert the
  5766. data into the open file, making sure it ends up all on one line.
  5767. Save the file.
  5768. (In very old versions of OpenSSH, SSH-2 keys had to be put
  5769. in a separate file called `authorized_keys2'. In all current
  5770. versions, the same `authorized_keys' file is used for both SSH-1
  5771. and SSH-2 keys.)
  5772. - If your server is ssh.com's product and is using SSH-2, you need
  5773. to save a _public_ key file from PuTTYgen (see section 8.2.11),
  5774. and copy that into the `.ssh2' directory on the server. Then you
  5775. should go into that `.ssh2' directory, and edit (or create) a
  5776. file called `authorization'. In this file you should put a line
  5777. like `Key mykey.pub', with `mykey.pub' replaced by the name of
  5778. your key file.
  5779. - For other SSH server software, you should refer to the manual
  5780. for that server.
  5781. You may also need to ensure that your home directory, your `.ssh'
  5782. directory, and any other files involved (such as `authorized_keys',
  5783. `authorized_keys2' or `authorization') are not group-writable or
  5784. world-writable; servers will typically ignore the keys unless this
  5785. is done. You can typically do this by using a command such as
  5786. chmod go-w $HOME $HOME/.ssh $HOME/.ssh/authorized_keys
  5787. Your server should now be configured to accept authentication using
  5788. your private key. Now you need to configure PuTTY to _attempt_
  5789. authentication using your private key. You can do this in any of
  5790. three ways:
  5791. - Select the private key in PuTTY's configuration. See section
  5792. 4.22.1 for details.
  5793. - Specify the key file on the command line with the `-i' option.
  5794. See section 3.11.3.18 for details.
  5795. - Load the private key into Pageant (see chapter 9). In this case
  5796. PuTTY will automatically try to use it for authentication if it
  5797. can.
  5798. Chapter 9: Using Pageant for authentication
  5799. -------------------------------------------
  5800. Pageant is an SSH authentication agent. It holds your private keys
  5801. in memory, already decoded, so that you can use them often without
  5802. needing to type a passphrase.
  5803. 9.1 Getting started with Pageant
  5804. Before you run Pageant, you need to have a private key in `*.PPK'
  5805. format. See chapter 8 to find out how to generate and use one.
  5806. When you run Pageant, it will put an icon of a computer wearing a
  5807. hat into the System tray. It will then sit and do nothing, until
  5808. you load a private key into it. (You may need to use Windows' `Show
  5809. hidden icons' arrow to see the Pageant icon.)
  5810. If you click the Pageant icon with the right mouse button, you will
  5811. see a menu. Select `View Keys' from this menu. The Pageant main
  5812. window will appear. (You can also bring this window up by double-
  5813. clicking on the Pageant icon.)
  5814. The Pageant window contains a list box. This shows the private keys
  5815. Pageant is holding. When you start Pageant, it has no keys, so the
  5816. list box will be empty. After you add one or more keys, they will
  5817. show up in the list box.
  5818. To add a key to Pageant, press the `Add Key' button. Pageant will
  5819. bring up a file dialog, labelled `Select Private Key File'. Find
  5820. your private key file in this dialog, and press `Open'.
  5821. Pageant will now load the private key. If the key is protected by
  5822. a passphrase, Pageant will ask you to type the passphrase. When
  5823. the key has been loaded, it will appear in the list in the Pageant
  5824. window.
  5825. Now start PuTTY and open an SSH session to a site that accepts your
  5826. key. PuTTY will notice that Pageant is running, retrieve the key
  5827. automatically from Pageant, and use it to authenticate. You can now
  5828. open as many PuTTY sessions as you like without having to type your
  5829. passphrase again.
  5830. (PuTTY can be configured not to try to use Pageant, but it will
  5831. try by default. See section 4.21.4 and section 3.11.3.9 for more
  5832. information.)
  5833. When you want to shut down Pageant, click the right button on the
  5834. Pageant icon in the System tray, and select `Exit' from the menu.
  5835. Closing the Pageant main window does _not_ shut down Pageant.
  5836. If you want Pageant to stay running but forget all the keys it has
  5837. acquired, select `Remove All Keys' from the System tray menu.
  5838. 9.2 The Pageant main window
  5839. The Pageant main window appears when you left-click on the Pageant
  5840. system tray icon, or alternatively right-click and select `View
  5841. Keys' from the menu. You can use it to keep track of what keys are
  5842. currently loaded into Pageant, and to add new ones or remove the
  5843. existing keys.
  5844. 9.2.1 The key list box
  5845. The large list box in the Pageant main window lists the private
  5846. keys that are currently loaded into Pageant. The list might look
  5847. something like this:
  5848. Ed25519 SHA256:TddlQk20DVs4LRcAsIfDN9pInKpY06D+h4kSHwWAj4w
  5849. RSA 2048 SHA256:8DFtyHm3kQihgy52nzX96qMcEVOq7/yJmmwQQhBWYFg
  5850. For each key, the list box will tell you:
  5851. - The type of the key. Currently, this can be `RSA' (an RSA key
  5852. for use with the SSH-2 protocol), `DSA' (a DSA key for use with
  5853. the SSH-2 protocol), `NIST' (an ECDSA key for use with the
  5854. SSH-2 protocol), `Ed25519' (an Ed25519 key for use with the
  5855. SSH-2 protocol), `Ed448' (an Ed448 key for use with the SSH-
  5856. 2 protocol), or `SSH-1' (an RSA key for use with the old SSH-
  5857. 1 protocol). (If the key has an associated certificate, this is
  5858. shown here with a `cert' suffix.)
  5859. - The size (in bits) of the key, for key types that come in
  5860. different sizes. (For ECDSA `NIST' keys, this is indicated as
  5861. `p256' or `p384' or `p521'.)
  5862. - The fingerprint for the public key. This should be the same
  5863. fingerprint given by PuTTYgen, and (hopefully) also the same
  5864. fingerprint shown by remote utilities such as `ssh-keygen' when
  5865. applied to your `authorized_keys' file.
  5866. For SSH-2 keys, by default this is shown in the `SHA256' format.
  5867. You can change to the older `MD5' format (which looks like
  5868. `aa:bb:cc:...') with the `Fingerprint type' drop-down, but bear
  5869. in mind that this format is less secure and should be avoided
  5870. for comparison purposes where possible.
  5871. If some of the keys loaded into Pageant have certificates
  5872. attached, then Pageant will default to showing the fingerprint
  5873. of the underlying key. This way, a certified and uncertified
  5874. version of the same key will have the same fingerprint, so you
  5875. can see that they match. You can instead use the `Fingerprint
  5876. type' drop-down to ask for a different fingerprint to be shown
  5877. for certified keys, which includes the certificate as part of
  5878. the fingerprinted data. That way you can tell two certificates
  5879. apart.
  5880. - The comment attached to the key.
  5881. - The state of deferred decryption, if enabled for this key. See
  5882. section 9.5.
  5883. 9.2.2 The `Add Key' button
  5884. To add a key to Pageant by reading it out of a local disk file,
  5885. press the `Add Key' button in the Pageant main window, or
  5886. alternatively right-click on the Pageant icon in the system tray and
  5887. select `Add Key' from there.
  5888. Pageant will bring up a file dialog, labelled `Select Private Key
  5889. File'. Find your private key file in this dialog, and press `Open'.
  5890. If you want to add more than one key at once, you can select
  5891. multiple files using Shift-click (to select several adjacent files)
  5892. or Ctrl-click (to select non-adjacent files).
  5893. Pageant will now load the private key(s). If a key is protected by a
  5894. passphrase, Pageant will ask you to type the passphrase.
  5895. (This is not the only way to add a private key to Pageant. You can
  5896. also add one from a remote system by using agent forwarding; see
  5897. section 9.4 for details.)
  5898. 9.2.3 The `Remove Key' button
  5899. If you need to remove a key from Pageant, select that key in the
  5900. list box, and press the `Remove Key' button. Pageant will remove the
  5901. key from its memory.
  5902. You can apply this to keys you added using the `Add Key' button, or
  5903. to keys you added remotely using agent forwarding (see section 9.4);
  5904. it makes no difference.
  5905. 9.3 The Pageant command line
  5906. Pageant can be made to do things automatically when it starts up,
  5907. by specifying instructions on its command line. If you're starting
  5908. Pageant from the Windows GUI, you can arrange this by editing the
  5909. properties of the Windows shortcut that it was started from.
  5910. If Pageant is already running, invoking it again with the options
  5911. below causes actions to be performed with the existing instance, not
  5912. a new one.
  5913. 9.3.1 Making Pageant automatically load keys on startup
  5914. Pageant can automatically load one or more private keys when it
  5915. starts up, if you provide them on the Pageant command line. Your
  5916. command line might then look like:
  5917. C:\PuTTY\pageant.exe d:\main.ppk d:\secondary.ppk
  5918. If the keys are stored encrypted, Pageant will request the
  5919. passphrases on startup.
  5920. If Pageant is already running, this syntax loads keys into the
  5921. existing Pageant.
  5922. You can specify the `--encrypted' option to defer decryption of
  5923. these keys; see section 9.5.
  5924. 9.3.2 Making Pageant run another program
  5925. You can arrange for Pageant to start another program once it has
  5926. initialised itself and loaded any keys specified on its command
  5927. line. This program (perhaps a PuTTY, or a WinCVS making use of
  5928. Plink, or whatever) will then be able to use the keys Pageant has
  5929. loaded.
  5930. You do this by specifying the `-c' option followed by the command,
  5931. like this:
  5932. C:\PuTTY\pageant.exe d:\main.ppk -c C:\PuTTY\putty.exe
  5933. 9.3.3 Integrating with Windows OpenSSH
  5934. Windows's own port of OpenSSH uses the same mechanism as Pageant to
  5935. talk to its SSH agent (Windows named pipes). This means that Windows
  5936. OpenSSH can talk directly to Pageant, if it knows where to find
  5937. Pageant's named pipe.
  5938. When Pageant starts up, it can optionally write out a file
  5939. containing an OpenSSH configuration directive that tells the Windows
  5940. `ssh.exe' where to find Pageant. If you include this file from your
  5941. Windows SSH configuration, then `ssh.exe' should automatically use
  5942. Pageant as its agent, so that you can keep your keys in one place
  5943. and have both SSH clients able to use them.
  5944. The option is `--openssh-config', and you follow it with a filename.
  5945. To refer to this file from your main OpenSSH configuration, you can
  5946. use the `Include' directive. For example, you might run Pageant like
  5947. this (with your own username substituted, of course):
  5948. pageant --openssh-config C:\Users\Simon\.ssh\pageant.conf
  5949. and then add a directive like this to your main `.ssh\config'
  5950. file (assuming that lives in the same directory that you just put
  5951. pageant.conf):
  5952. Include pageant.conf
  5953. *Note*: this technique only works with _Windows's_ port of OpenSSH,
  5954. which lives at C:\Windows\System32\OpenSSH\ssh.exe if you have
  5955. it installed. (If not, it can be installed as a Windows optional
  5956. feature, e.g., via Settings > Apps & features > Optional features >
  5957. Add a feature > OpenSSH Client.)
  5958. There are other versions of OpenSSH for Windows, notably the one
  5959. that comes with Windows git. Those will likely not work with the
  5960. same configuration, because they tend to depend on Unix emulation
  5961. layers like MinGW or MSys, so they won't speak Windows native
  5962. pathname syntax or understand named pipes. The above instructions
  5963. will only work with Windows's own version of OpenSSH.
  5964. So, if you want to use Windows git with an SSH key held in
  5965. Pageant, you'll have to set the environment variable GIT_SSH,
  5966. to point at a different program. You could point it at
  5967. c:\Windows\System32\OpenSSH\ssh.exe once you've done this setup -
  5968. but it's just as easy to point it at Plink!
  5969. 9.3.4 Unix-domain sockets: integrating with WSL 1
  5970. Pageant can listen on the WinSock implementation of `Unix-domain
  5971. sockets'. These interoperate with the Unix-domain sockets found in
  5972. the original Windows Subsystem for Linux (now known as WSL 1). So if
  5973. you ask Pageant to listen on one of these, then your WSL 1 processes
  5974. can talk directly to Pageant.
  5975. To configure this, run Pageant with the option `--unix', followed
  5976. with a pathname. Then, in WSL 1, set the environment variable
  5977. SSH_AUTH_SOCK to point at the WSL translation of that pathname.
  5978. For example, you might run
  5979. pageant --unix C:\Users\Simon\.ssh\agent.sock
  5980. and in WSL 1, set the environment variable
  5981. SSH_AUTH_SOCK=/mnt/c/Users/Simon/.ssh/agent.sock
  5982. Alternatively, you can add a line to your .ssh/config file inside
  5983. WSL that says
  5984. IdentityAgent /mnt/c/Users/Simon/.ssh/agent.sock
  5985. although doing it like that may mean that ssh-add commands won't
  5986. find the agent, even though ssh itself will.
  5987. *Security note*: Unix-domain sockets are protected against access by
  5988. other users by the file protections on their containing directory.
  5989. So if your Windows machine is multiuser, make sure you create the
  5990. socket inside a directory that other users can't access at all. (In
  5991. fact, that's a good idea on general principles.)
  5992. *Compatibility note*: WSL 2 processes cannot talk to Pageant by this
  5993. mechanism, because WSL 2's Unix-domain sockets are managed by a
  5994. separate Linux kernel, and not by the same kernel that WinSock talks
  5995. to.
  5996. 9.3.5 Starting with the key list visible
  5997. Start Pageant with the `--keylist' option to show the main window as
  5998. soon as it starts up.
  5999. 9.3.6 Restricting the Windows process ACL
  6000. Pageant supports the same `-restrict-acl' option as the other PuTTY
  6001. utilities to lock down the Pageant process's access control; see
  6002. section 3.11.3.28 for why you might want to do this.
  6003. By default, if Pageant is started with `-restrict-acl', it won't
  6004. pass this to any PuTTY sessions started from its System Tray
  6005. submenu. Use `-restrict-putty-acl' to change this. (Again, see
  6006. section 3.11.3.28 for details.)
  6007. 9.4 Using agent forwarding
  6008. Agent forwarding is a mechanism that allows applications on your SSH
  6009. server machine to talk to the agent on your client machine.
  6010. Note that at present, whether agent forwarding in SSH-2 is available
  6011. depends on your server. Pageant's protocol is compatible with the
  6012. OpenSSH server, but the ssh.com server uses a different agent
  6013. protocol, which PuTTY does not yet support.
  6014. To enable agent forwarding, first start Pageant. Then set up a
  6015. PuTTY SSH session in which `Allow agent forwarding' is enabled (see
  6016. section 4.21.7). Open the session as normal. (Alternatively, you
  6017. can use the `-A' command line option; see section 3.11.3.10 for
  6018. details.)
  6019. If this has worked, your applications on the server should now have
  6020. access to a Unix domain socket which the SSH server will forward
  6021. back to PuTTY, and PuTTY will forward on to the agent. To check that
  6022. this has actually happened, you can try this command on Unix server
  6023. machines:
  6024. unixbox:~$ echo $SSH_AUTH_SOCK
  6025. /tmp/ssh-XXNP18Jz/agent.28794
  6026. unixbox:~$
  6027. If the result line comes up blank, agent forwarding has not been
  6028. enabled at all.
  6029. Now if you run `ssh' on the server and use it to connect through to
  6030. another server that accepts one of the keys in Pageant, you should
  6031. be able to log in without a password:
  6032. unixbox:~$ ssh -v otherunixbox
  6033. [...]
  6034. debug: next auth method to try is publickey
  6035. debug: userauth_pubkey_agent: trying agent key my-putty-key
  6036. debug: ssh-userauth2 successful: method publickey
  6037. [...]
  6038. If you enable agent forwarding on _that_ SSH connection as well (see
  6039. the manual for your server-side SSH client to find out how to do
  6040. this), your authentication keys will still be available on the next
  6041. machine you connect to - two SSH connections away from where they're
  6042. actually stored.
  6043. In addition, if you have a private key on one of the SSH servers,
  6044. you can send it all the way back to Pageant using the local `ssh-
  6045. add' command:
  6046. unixbox:~$ ssh-add ~/.ssh/id_rsa
  6047. Need passphrase for /home/fred/.ssh/id_rsa
  6048. Enter passphrase for /home/fred/.ssh/id_rsa:
  6049. Identity added: /home/fred/.ssh/id_rsa (/home/simon/.ssh/id_rsa)
  6050. unixbox:~$
  6051. and then it's available to every machine that has agent forwarding
  6052. available (not just the ones downstream of the place you added it).
  6053. 9.5 Loading keys without decrypting them
  6054. You can add keys to Pageant _without_ decrypting them. The key file
  6055. will be held in Pageant's memory still encrypted, and when a client
  6056. program first tries to use the key, Pageant will display a dialog
  6057. box prompting for the passphrase so that the key can be decrypted.
  6058. This works the same way whether the key is used by an instance of
  6059. PuTTY running locally, or a remote client connecting to Pageant
  6060. through agent forwarding.
  6061. To add a key to Pageant in this encrypted form, press the `Add Key
  6062. (encrypted)' button in the Pageant main window, or alternatively
  6063. right-click on the Pageant icon in the system tray and select `Add
  6064. Key (encrypted)' from there. Pageant will bring up a file dialog, in
  6065. just the same way as it would for the plain `Add Key' button. But it
  6066. won't ask for a passphrase. Instead, the key will be listed in the
  6067. main window with `(encrypted)' after it.
  6068. To start Pageant up in the first place with encrypted keys loaded
  6069. into it, you can use the `--encrypted' option on the command line.
  6070. For example:
  6071. C:\PuTTY\pageant.exe --encrypted d:\main.ppk
  6072. After a key has been decrypted for the first use, it remains
  6073. decrypted, so that it can be used again. The main window will list
  6074. the key with `(re-encryptable)' after it. You can revert it to the
  6075. previous state, where a passphrase is required, using the `Re-
  6076. encrypt' button in the Pageant main window.
  6077. You can also `re-encrypt' all keys that were added encrypted by
  6078. choosing `Re-encrypt All Keys' from the System tray menu. (Note that
  6079. this does _not_ discard cleartext keys that were not previously
  6080. added encrypted!)
  6081. *CAUTION*: When Pageant displays a prompt to decrypt an already-
  6082. loaded key, it cannot give keyboard focus to the prompt dialog box.
  6083. As far as I know this is a deliberate defensive measure by Windows,
  6084. against malicious software. So make sure you click in the prompt
  6085. window before typing your passphrase, or else the passphrase might
  6086. be sent to somewhere you didn't want to trust with it!
  6087. 9.6 Security considerations
  6088. Using Pageant for public-key authentication gives you the
  6089. convenience of being able to open multiple SSH sessions without
  6090. having to type a passphrase every time, but also gives you the
  6091. security benefit of never storing a decrypted private key on disk.
  6092. Many people feel this is a good compromise between security and
  6093. convenience.
  6094. It _is_ a compromise, however. Holding your decrypted private keys
  6095. in Pageant is better than storing them in easy-to-find disk files,
  6096. but still less secure than not storing them anywhere at all. This is
  6097. for two reasons:
  6098. - Windows unfortunately provides no way to protect pieces of
  6099. memory from being written to the system swap file. So if Pageant
  6100. is holding your private keys for a long period of time, it's
  6101. possible that decrypted private key data may be written to the
  6102. system swap file, and an attacker who gained access to your hard
  6103. disk later on might be able to recover that data. (However,
  6104. if you stored an unencrypted key in a disk file they would
  6105. _certainly_ be able to recover it.)
  6106. - Although, like most modern operating systems, Windows prevents
  6107. programs from accidentally accessing one another's memory space,
  6108. it does allow programs to access one another's memory space
  6109. deliberately, for special purposes such as debugging. This means
  6110. that if you allow a virus, trojan, or other malicious program
  6111. on to your Windows system while Pageant is running, it could
  6112. access the memory of the Pageant process, extract your decrypted
  6113. authentication keys, and send them back to its master.
  6114. Similarly, use of agent _forwarding_ is a security improvement on
  6115. other methods of one-touch authentication, but not perfect. Holding
  6116. your keys in Pageant on your Windows box has a security advantage
  6117. over holding them on the remote server machine itself (either in an
  6118. agent or just unencrypted on disk), because if the server machine
  6119. ever sees your unencrypted private key then the sysadmin or anyone
  6120. who cracks the machine can steal the keys and pretend to be you for
  6121. as long as they want.
  6122. However, the sysadmin of the server machine can always pretend to
  6123. be you _on that machine_. So if you forward your agent to a server
  6124. machine, then the sysadmin of that machine can access the forwarded
  6125. agent connection and request signatures from any of your private
  6126. keys, and can therefore log in to other machines as you. They
  6127. can only do this to a limited extent - when the agent forwarding
  6128. disappears they lose the ability - but using Pageant doesn't
  6129. actually _prevent_ the sysadmin (or hackers) on the server from
  6130. doing this.
  6131. Therefore, if you don't trust the sysadmin of a server machine, you
  6132. should _never_ use agent forwarding to that machine. (Of course you
  6133. also shouldn't store private keys on that machine, type passphrases
  6134. into it, or log into other machines from it in any way at all;
  6135. Pageant is hardly unique in this respect.)
  6136. Chapter 10: Common error messages
  6137. ---------------------------------
  6138. This chapter lists a number of common error messages which PuTTY and
  6139. its associated tools can produce, and explains what they mean in
  6140. more detail.
  6141. We do not attempt to list _all_ error messages here: there are many
  6142. which should never occur, and some which should be self-explanatory.
  6143. If you get an error message which is not listed in this chapter and
  6144. which you don't understand, report it to us as a bug (see appendix
  6145. B) and we will add documentation for it.
  6146. 10.1 `The host key is not cached for this server'
  6147. This error message occurs when PuTTY connects to a new SSH server.
  6148. Every server identifies itself by means of a host key; once PuTTY
  6149. knows the host key for a server, it will be able to detect if a
  6150. malicious attacker redirects your connection to another machine.
  6151. If you see this message, it means that PuTTY has not seen this host
  6152. key before, and has no way of knowing whether it is correct or not.
  6153. You should attempt to verify the host key by other means, such as
  6154. asking the machine's administrator.
  6155. If you see this message and you know that your installation of PuTTY
  6156. _has_ connected to the same server before, it may have been recently
  6157. upgraded to SSH protocol version 2. SSH protocols 1 and 2 use
  6158. separate host keys, so when you first use SSH-2 with a server you
  6159. have only used SSH-1 with before, you will see this message again.
  6160. You should verify the correctness of the key as before.
  6161. See section 2.2 for more information on host keys.
  6162. 10.2 `WARNING - POTENTIAL SECURITY BREACH!'
  6163. This message, followed by `The server's host key does not match
  6164. the one PuTTY has cached for this server', means that PuTTY has
  6165. connected to the SSH server before, knows what its host key _should_
  6166. be, but has found a different one.
  6167. (If the message instead talks about a `certified host key', see
  6168. instead section 10.3.)
  6169. This may mean that a malicious attacker has replaced your server
  6170. with a different one, or has redirected your network connection
  6171. to their own machine. On the other hand, it may simply mean that
  6172. the administrator of your server has accidentally changed the key
  6173. while upgrading the SSH software; this _shouldn't_ happen but it is
  6174. unfortunately possible.
  6175. You should contact your server's administrator and see whether they
  6176. expect the host key to have changed. If so, verify the new host key
  6177. in the same way as you would if it was new.
  6178. See section 2.2 for more information on host keys.
  6179. 10.3 `This server presented a certified host key which was signed by a
  6180. different certification authority ...'
  6181. If you've configured PuTTY to trust at least one certification
  6182. authority for signing host keys (see section 4.19.4), then it will
  6183. ask the SSH server to send it any available certified host keys.
  6184. If the server sends back a certified key signed by a _different_
  6185. certification authority, PuTTY will present this variant of the host
  6186. key prompt, preceded by `WARNING - POTENTIAL SECURITY BREACH!'
  6187. One reason why this can happen is a deliberate attack. Just like an
  6188. ordinary man-in-the-middle attack which substitutes a wrong host
  6189. key, a particularly ambitious attacker might substitute an entire
  6190. wrong certification authority, and hope that you connect anyway.
  6191. But it's also possible in some situations that this error might
  6192. arise legitimately. For example, if your organisation's IT
  6193. department has just rolled out a new CA key which you haven't yet
  6194. entered in PuTTY's configuration, or if your CA configuration
  6195. involves two overlapping domains, or something similar.
  6196. So, unfortunately, you'll have to work out what to do about it
  6197. yourself: make an exception for this specific case, or abandon this
  6198. connection and install a new CA key before trying again (if you're
  6199. really sure you trust the CA), or edit your configuration in some
  6200. other way, or just stop trying to use this server.
  6201. If you're convinced that this particular server is legitimate even
  6202. though the CA is not one you trust, PuTTY will let you cache the
  6203. certified host key, treating it in the same way as an uncertified
  6204. one. Then that particular certificate will be accepted for future
  6205. connections to this specific server, even though other certificates
  6206. signed by the same CA will still be rejected.
  6207. 10.4 `SSH protocol version 2 required by our configuration but remote
  6208. only provides (old, insecure) SSH-1'
  6209. By default, PuTTY only supports connecting to SSH servers that
  6210. implement SSH protocol version 2. If you see this message, the
  6211. server you're trying to connect to only supports the older SSH-1
  6212. protocol.
  6213. If the server genuinely only supports SSH-1, then you need to either
  6214. change the `SSH protocol version' setting (see section 4.17.4), or
  6215. use the `-1' command-line option; in any case, you should not treat
  6216. the resulting connection as secure.
  6217. You might start seeing this message with new versions of PuTTY
  6218. (from 0.68 onwards) where you didn't before, because it used to be
  6219. possible to configure PuTTY to automatically fall back from SSH-2 to
  6220. SSH-1. This is no longer supported, to prevent the possibility of a
  6221. downgrade attack.
  6222. 10.5 `The first cipher supported by the server is ... below the
  6223. configured warning threshold'
  6224. This occurs when the SSH server does not offer any ciphers which you
  6225. have configured PuTTY to consider strong enough. By default, PuTTY
  6226. puts up this warning only for Blowfish, single-DES, and Arcfour
  6227. encryption.
  6228. See section 4.20 for more information on this message.
  6229. (There are similar messages for other cryptographic primitives, such
  6230. as host key algorithms.)
  6231. 10.6 `Remote side sent disconnect message type 2 (protocol error): "Too
  6232. many authentication failures for root"'
  6233. This message is produced by an OpenSSH (or Sun SSH) server if it
  6234. receives more failed authentication attempts than it is willing to
  6235. tolerate.
  6236. This can easily happen if you are using Pageant and have a large
  6237. number of keys loaded into it, since these servers count each offer
  6238. of a public key as an authentication attempt. This can be worked
  6239. around by specifying the key that's required for the authentication
  6240. in the PuTTY configuration (see section 4.22.1); PuTTY will ignore
  6241. any other keys Pageant may have, but will ask Pageant to do the
  6242. authentication, so that you don't have to type your passphrase.
  6243. On the server, this can be worked around by disabling public-key
  6244. authentication or (for Sun SSH only) by increasing `MaxAuthTries' in
  6245. `sshd_config'.
  6246. 10.7 `Out of memory'
  6247. This occurs when PuTTY tries to allocate more memory than the system
  6248. can give it. This _may_ happen for genuine reasons: if the computer
  6249. really has run out of memory, or if you have configured an extremely
  6250. large number of lines of scrollback in your terminal. PuTTY is
  6251. not able to recover from running out of memory; it will terminate
  6252. immediately after giving this error.
  6253. However, this error can also occur when memory is not running out at
  6254. all, because PuTTY receives data in the wrong format. In SSH-2 and
  6255. also in SFTP, the server sends the length of each message before the
  6256. message itself; so PuTTY will receive the length, try to allocate
  6257. space for the message, and then receive the rest of the message.
  6258. If the length PuTTY receives is garbage, it will try to allocate
  6259. a ridiculous amount of memory, and will terminate with an `Out of
  6260. memory' error.
  6261. This can happen in SSH-2, if PuTTY and the server have not enabled
  6262. encryption in the same way (see question A.7.3 in the FAQ).
  6263. This can also happen in PSCP or PSFTP, if your login scripts on the
  6264. server generate output: the client program will be expecting an
  6265. SFTP message starting with a length, and if it receives some text
  6266. from your login scripts instead it will try to interpret them as a
  6267. message length. See question A.7.4 for details of this.
  6268. 10.8 `Internal error', `Internal fault', `Assertion failed'
  6269. Any error beginning with the word `Internal' should _never_ occur.
  6270. If it does, there is a bug in PuTTY by definition; please see
  6271. appendix B and report it to us.
  6272. Similarly, any error message starting with `Assertion failed' is a
  6273. bug in PuTTY. Please report it to us, and include the exact text
  6274. from the error message box.
  6275. 10.9 `Unable to use key file', `Couldn't load private key', `Couldn't
  6276. load this key'
  6277. Various forms of this error are printed in the PuTTY window, or
  6278. written to the PuTTY Event Log (see section 3.1.3.1) when trying
  6279. public-key authentication, or given by Pageant when trying to load a
  6280. private key.
  6281. If you see one of these messages, it often indicates that you've
  6282. tried to load a key of an inappropriate type into PuTTY, Plink,
  6283. PSCP, PSFTP, or Pageant.
  6284. You may have tried to load an SSH-2 key in a `foreign' format
  6285. (OpenSSH or ssh.com) directly into one of the PuTTY tools, in which
  6286. case you need to import it into PuTTY's native format (`*.PPK')
  6287. using PuTTYgen - see section 8.2.15.
  6288. Alternatively, you may have specified a key that's inappropriate for
  6289. the connection you're making. The SSH-2 and the old SSH-1 protocols
  6290. require different private key formats, and a SSH-1 key can't be used
  6291. for a SSH-2 connection (or vice versa).
  6292. 10.10 `Server refused our key', `Server refused our public key', `Key
  6293. refused'
  6294. Various forms of this error are printed in the PuTTY window, or
  6295. written to the PuTTY Event Log (see section 3.1.3.1) when trying
  6296. public-key authentication.
  6297. If you see one of these messages, it means that PuTTY has sent a
  6298. public key to the server and offered to authenticate with it, and
  6299. the server has refused to accept authentication. This usually means
  6300. that the server is not configured to accept this key to authenticate
  6301. this user.
  6302. This is almost certainly not a problem with PuTTY. If you see
  6303. this type of message, the first thing you should do is check your
  6304. _server_ configuration carefully. Common errors include having the
  6305. wrong permissions or ownership set on the public key or the user's
  6306. home directory on the server. Also, read the PuTTY Event Log; the
  6307. server may have sent diagnostic messages explaining exactly what
  6308. problem it had with your setup.
  6309. Section 8.3 has some hints on server-side public key setup.
  6310. 10.11 `Access denied', `Authentication refused'
  6311. Various forms of this error are printed in the PuTTY window,
  6312. or written to the PuTTY Event Log (see section 3.1.3.1) during
  6313. authentication.
  6314. If you see one of these messages, it means that the server has
  6315. refused all the forms of authentication PuTTY has tried and it has
  6316. no further ideas.
  6317. It may be worth checking the Event Log for diagnostic messages from
  6318. the server giving more detail.
  6319. This error can be caused by buggy SSH-1 servers that fail to cope
  6320. with the various strategies we use for camouflaging passwords in
  6321. transit. Upgrade your server, or use the workarounds described in
  6322. section 4.27.14 and possibly section 4.27.15.
  6323. 10.12 `No supported authentication methods available'
  6324. This error indicates that PuTTY has run out of ways to authenticate
  6325. you to an SSH server. This may be because PuTTY has TIS or keyboard-
  6326. interactive authentication disabled, in which case see section
  6327. 4.21.5 and section 4.21.6.
  6328. 10.13 `Incorrect MAC received on packet' or `Incorrect CRC received on
  6329. packet'
  6330. This error occurs when PuTTY decrypts an SSH packet and its checksum
  6331. is not correct. This probably means something has gone wrong in the
  6332. encryption or decryption process. It's difficult to tell from this
  6333. error message whether the problem is in the client, in the server,
  6334. or in between.
  6335. In particular, if the network is corrupting data at the TCP level,
  6336. it may only be obvious with cryptographic protocols such as SSH,
  6337. which explicitly check the integrity of the transferred data and
  6338. complain loudly if the checks fail. Corruption of protocols without
  6339. integrity protection (such as HTTP) will manifest in more subtle
  6340. failures (such as misdisplayed text or images in a web browser)
  6341. which may not be noticed.
  6342. Occasionally this has been caused by server bugs. An example is the
  6343. bug described at section 4.27.11, although you're very unlikely to
  6344. encounter that one these days.
  6345. In this context MAC stands for Message Authentication Code. It's a
  6346. cryptographic term, and it has nothing at all to do with Ethernet
  6347. MAC (Media Access Control) addresses, or with the Apple computer.
  6348. 10.14 `Incoming packet was garbled on decryption'
  6349. This error occurs when PuTTY decrypts an SSH packet and the
  6350. decrypted data makes no sense. This probably means something has
  6351. gone wrong in the encryption or decryption process. It's difficult
  6352. to tell from this error message whether the problem is in the
  6353. client, in the server, or in between.
  6354. If you get this error, one thing you could try would be to fiddle
  6355. with the setting of `Miscomputes SSH-2 encryption keys' (see section
  6356. 4.27.13) or `Ignores SSH-2 maximum packet size' (see section 4.27.5)
  6357. on the Bugs panel.
  6358. 10.15 `PuTTY X11 proxy: _various errors_'
  6359. This family of errors are reported when PuTTY is doing X forwarding.
  6360. They are sent back to the X application running on the SSH server,
  6361. which will usually report the error to the user.
  6362. When PuTTY enables X forwarding (see section 3.4) it creates a
  6363. virtual X display running on the SSH server. This display requires
  6364. authentication to connect to it (this is how PuTTY prevents other
  6365. users on your server machine from connecting through the PuTTY proxy
  6366. to your real X display). PuTTY also sends the server the details it
  6367. needs to enable clients to connect, and the server should put this
  6368. mechanism in place automatically, so your X applications should just
  6369. work.
  6370. A common reason why people see one of these messages is because they
  6371. used SSH to log in as one user (let's say `fred'), and then used
  6372. the Unix `su' command to become another user (typically `root').
  6373. The original user, `fred', has access to the X authentication data
  6374. provided by the SSH server, and can run X applications which are
  6375. forwarded over the SSH connection. However, the second user (`root')
  6376. does not automatically have the authentication data passed on to it,
  6377. so attempting to run an X application as that user often fails with
  6378. this error.
  6379. If this happens, _it is not a problem with PuTTY_. You need to
  6380. arrange for your X authentication data to be passed from the user
  6381. you logged in as to the user you used `su' to become. How you do
  6382. this depends on your particular system; in fact many modern versions
  6383. of `su' do it automatically.
  6384. 10.16 `Network error: Software caused connection abort'
  6385. This is a generic error produced by the Windows network code when
  6386. it kills an established connection for some reason. For example, it
  6387. might happen if you pull the network cable out of the back of an
  6388. Ethernet-connected computer, or if Windows has any other similar
  6389. reason to believe the entire network has become unreachable.
  6390. Windows also generates this error if it has given up on the machine
  6391. at the other end of the connection ever responding to it. If the
  6392. network between your client and server goes down and your client
  6393. then tries to send some data, Windows will make several attempts
  6394. to send the data and will then give up and kill the connection. In
  6395. particular, this can occur even if you didn't type anything, if you
  6396. are using SSH-2 and PuTTY attempts a key re-exchange. (See section
  6397. 4.18.2 for more about key re-exchange.)
  6398. (It can also occur if you are using keepalives in your connection.
  6399. Other people have reported that keepalives _fix_ this error for
  6400. them. See section 4.14.1 for a discussion of the pros and cons of
  6401. keepalives.)
  6402. We are not aware of any reason why this error might occur that would
  6403. represent a bug in PuTTY. The problem is between you, your Windows
  6404. system, your network and the remote system.
  6405. 10.17 `Network error: Connection reset by peer'
  6406. This error occurs when the machines at each end of a network
  6407. connection lose track of the state of the connection between them.
  6408. For example, you might see it if your SSH server crashes, and
  6409. manages to reboot fully before you next attempt to send data to it.
  6410. However, the most common reason to see this message is if you are
  6411. connecting through a firewall or a NAT router which has timed the
  6412. connection out. See question A.7.8 in the FAQ for more details.
  6413. You may be able to improve the situation by using keepalives; see
  6414. section 4.14.1 for details on this.
  6415. Note that Windows can produce this error in some circumstances
  6416. without seeing a connection reset from the server, for instance if
  6417. the connection to the network is lost.
  6418. 10.18 `Network error: Connection refused'
  6419. This error means that the network connection PuTTY tried to make to
  6420. your server was rejected by the server. Usually this happens because
  6421. the server does not provide the service which PuTTY is trying to
  6422. access.
  6423. Check that you are connecting with the correct protocol (SSH,
  6424. Telnet, etc), and check that the port number is correct. If that
  6425. fails, consult the administrator of your server.
  6426. This error can also be caused by a firewall in between you and the
  6427. server, which rejects the connection and sends back the same type of
  6428. error packet as the real server would have sent.
  6429. 10.19 `Network error: Connection timed out'
  6430. This error means that the network connection PuTTY tried to make to
  6431. your server received no response at all from the server. Usually
  6432. this happens because the server machine is completely isolated from
  6433. the network, or because it is turned off.
  6434. Check that you have correctly entered the host name or IP address
  6435. of your server machine. If that fails, consult the administrator of
  6436. your server.
  6437. Unix also generates this error when it tries to send data down a
  6438. connection and contact with the server has been completely lost
  6439. during a connection. (There is a delay of minutes before Unix gives
  6440. up on receiving a reply from the server.) This can occur if you type
  6441. things into PuTTY while the network is down, but it can also occur
  6442. if PuTTY decides of its own accord to send data: due to a repeat key
  6443. exchange in SSH-2 (see section 4.18.2) or due to keepalives (section
  6444. 4.14.1).
  6445. 10.20 `Network error: Cannot assign requested address'
  6446. This means that the operating system rejected the parameters of the
  6447. network connection PuTTY tried to make, usually without actually
  6448. trying to connect to anything, because they were simply invalid.
  6449. A common way to provoke this error is to accidentally try to connect
  6450. to port 0, which is not a valid port number.
  6451. Appendix A: PuTTY FAQ
  6452. ---------------------
  6453. This FAQ is published on the PuTTY web site, and also provided as an
  6454. appendix in the manual.
  6455. A.1 Introduction
  6456. A.1.1 What is PuTTY?
  6457. PuTTY is a client program for the SSH, Telnet, Rlogin, and SUPDUP
  6458. network protocols.
  6459. These protocols are all used to run a remote session on a computer,
  6460. over a network. PuTTY implements the client end of that session: the
  6461. end at which the session is displayed, rather than the end at which
  6462. it runs.
  6463. In really simple terms: you run PuTTY on a Windows machine, and
  6464. tell it to connect to (for example) a Unix machine. PuTTY opens a
  6465. window. Then, anything you type into that window is sent straight
  6466. to the Unix machine, and everything the Unix machine sends back is
  6467. displayed in the window. So you can work on the Unix machine as if
  6468. you were sitting at its console, while actually sitting somewhere
  6469. else.
  6470. A.2 Features supported in PuTTY
  6471. In general, if you want to know if PuTTY supports a particular
  6472. feature, you should look for it on the PuTTY web site. In
  6473. particular:
  6474. - try the changes page, and see if you can find the feature on
  6475. there. If a feature is listed there, it's been implemented. If
  6476. it's listed as a change made _since_ the latest version, it
  6477. should be available in the development snapshots, in which case
  6478. testing will be very welcome.
  6479. - try the Wishlist page, and see if you can find the feature
  6480. there. If it's on there, and not in the `Recently fixed'
  6481. section, it probably _hasn't_ been implemented.
  6482. A.2.1 Does PuTTY support SSH-2?
  6483. Yes. SSH-2 support has been available in PuTTY since version 0.50 in
  6484. 2000.
  6485. Public key authentication (both RSA and DSA) in SSH-2 was new in
  6486. version 0.52 in 2002.
  6487. A.2.2 Does PuTTY support reading OpenSSH or ssh.com SSH-2 private key
  6488. files?
  6489. PuTTY doesn't support this natively (see the wishlist entry for
  6490. reasons why not), but as of 0.53 PuTTYgen can convert both OpenSSH
  6491. and ssh.com private key files into PuTTY's format.
  6492. A.2.3 Does PuTTY support SSH-1?
  6493. Yes. SSH-1 support has always been available in PuTTY.
  6494. However, the SSH-1 protocol has many weaknesses and is no longer
  6495. considered secure; you should use SSH-2 instead if at all possible.
  6496. As of 0.68, PuTTY will no longer fall back to SSH-1 if the server
  6497. doesn't appear to support SSH-2; you must explicitly ask for SSH-1.
  6498. A.2.4 Does PuTTY support local echo?
  6499. Yes. Version 0.52 has proper support for local echo.
  6500. In version 0.51 and before, local echo could not be separated from
  6501. local line editing (where you type a line of text locally, and it
  6502. is not sent to the server until you press Return, so you have the
  6503. chance to edit it and correct mistakes _before_ the server sees it).
  6504. New in version 0.52, local echo and local line editing are separate
  6505. options, and by default PuTTY will try to determine automatically
  6506. whether to enable them or not, based on which protocol you have
  6507. selected and also based on hints from the server. If you have a
  6508. problem with PuTTY's default choice, you can force each option to be
  6509. enabled or disabled as you choose. The controls are in the Terminal
  6510. panel, in the section marked `Line discipline options'.
  6511. A.2.5 Does PuTTY support storing settings, so I don't have to change them
  6512. every time?
  6513. Yes, all of PuTTY's settings can be saved in named session profiles.
  6514. You can also change the default settings that are used for new
  6515. sessions. See section 4.1.2 in the documentation for how to do this.
  6516. A.2.6 Does PuTTY support storing its settings in a disk file?
  6517. Not at present, although section 4.33 in the documentation gives a
  6518. method of achieving the same effect.
  6519. A.2.7 Does PuTTY support full-screen mode, like a DOS box?
  6520. Yes; this was added in version 0.52, in 2002.
  6521. A.2.8 Does PuTTY have the ability to remember my password so I don't have
  6522. to type it every time?
  6523. No, it doesn't.
  6524. Remembering your password is a bad plan for obvious security
  6525. reasons: anyone who gains access to your machine while you're away
  6526. from your desk can find out the remembered password, and use it,
  6527. abuse it or change it.
  6528. In addition, it's not even _possible_ for PuTTY to automatically
  6529. send your password in a Telnet session, because Telnet doesn't
  6530. give the client software any indication of which part of the login
  6531. process is the password prompt. PuTTY would have to guess, by
  6532. looking for words like `password' in the session data; and if your
  6533. login program is written in something other than English, this won't
  6534. work.
  6535. In SSH, remembering your password would be possible in theory,
  6536. but there doesn't seem to be much point since SSH supports public
  6537. key authentication, which is more flexible and more secure. See
  6538. chapter 8 in the documentation for a full discussion of public key
  6539. authentication.
  6540. A.2.9 Is there an option to turn off the annoying host key prompts?
  6541. No, there isn't. And there won't be. Even if you write it yourself
  6542. and send us the patch, we won't accept it.
  6543. Those annoying host key prompts are the _whole point_ of SSH.
  6544. Without them, all the cryptographic technology SSH uses to secure
  6545. your session is doing nothing more than making an attacker's job
  6546. slightly harder; instead of sitting between you and the server with
  6547. a packet sniffer, the attacker must actually subvert a router and
  6548. start modifying the packets going back and forth. But that's not all
  6549. that much harder than just sniffing; and without host key checking,
  6550. it will go completely undetected by client or server.
  6551. Host key checking is your guarantee that the encryption you put
  6552. on your data at the client end is the _same_ encryption taken off
  6553. the data at the server end; it's your guarantee that it hasn't
  6554. been removed and replaced somewhere on the way. Host key checking
  6555. makes the attacker's job _astronomically_ hard, compared to packet
  6556. sniffing, and even compared to subverting a router. Instead of
  6557. applying a little intelligence and keeping an eye on oss-security,
  6558. the attacker must now perform a brute-force attack against at least
  6559. one military-strength cipher. That insignificant host key prompt
  6560. really does make _that_ much difference.
  6561. If you're having a specific problem with host key checking - perhaps
  6562. you want an automated batch job to make use of PSCP or Plink, and
  6563. the interactive host key prompt is hanging the batch process -
  6564. then the right way to fix it is to add the correct host key to the
  6565. Registry in advance, or if the Registry is not available, to use the
  6566. -hostkey command-line option. That way, you retain the _important_
  6567. feature of host key checking: the right key will be accepted and the
  6568. wrong ones will not. Adding an option to turn host key checking off
  6569. completely is the wrong solution and we will not do it.
  6570. If you have host keys available in the common `known_hosts' format,
  6571. we have a script called `kh2reg.py' to convert them to a Windows
  6572. .REG file, which can be installed ahead of time by double-clicking
  6573. or using `REGEDIT'.
  6574. A.2.10 Will you write an SSH server for the PuTTY suite, to go with the
  6575. client?
  6576. Not one that you'd want to use.
  6577. While much of the protocol and networking code can be made common
  6578. between a client and server, to make a _useful_ general-purpose
  6579. server requires all sorts of fiddly new code like interacting with
  6580. OS authentication databases and the like.
  6581. A special-purpose SSH server (called Uppity) can now be built from
  6582. the PuTTY source code, and indeed it is not usable as a general-
  6583. purpose server; it exists mainly as a test harness.
  6584. If someone else wants to use this as a basis for writing a general-
  6585. purpose SSH server, they'd be perfectly welcome to of course; but we
  6586. don't have time, and we don't have motivation. The code is available
  6587. if anyone else wants to try it.
  6588. A.2.11 Can PSCP or PSFTP transfer files in ASCII mode?
  6589. Unfortunately not.
  6590. This was a limitation of the file transfer protocols as originally
  6591. specified: the SCP and SFTP protocols had no notion of transferring
  6592. a file in anything other than binary mode. (This is still true of
  6593. SCP.)
  6594. The current draft protocol spec of SFTP proposes a means of
  6595. implementing ASCII transfer. At some point PSCP/PSFTP may implement
  6596. this proposal.
  6597. A.3 Ports to other operating systems
  6598. The eventual goal is for PuTTY to be a multi-platform program, able
  6599. to run on at least Windows, Mac OS and Unix.
  6600. PuTTY has been gaining a generalised porting layer, drawing a clear
  6601. line between platform-dependent and platform-independent code. The
  6602. general intention was for this porting layer to evolve naturally as
  6603. part of the process of doing the first port; a Unix port has now
  6604. been released and the plan seems to be working so far.
  6605. A.3.1 What ports of PuTTY exist?
  6606. Currently, release versions of PuTTY tools only run on Windows
  6607. systems and Unix.
  6608. As of 0.68, the supplied PuTTY executables run on versions of
  6609. Windows from XP onwards, up to and including Windows 11; and
  6610. we know of no reason why PuTTY should not continue to work on
  6611. future versions of Windows. We provide 32-bit and 64-bit Windows
  6612. executables for the common x86 processor family; see question A.6.10
  6613. for discussion of the compatibility issues around that. The 32-bit
  6614. executables require a Pentium 4 or newer processor. We also provide
  6615. executables for Windows on Arm processors.
  6616. (We used to also provide executables for Windows for the Alpha
  6617. processor, but stopped after 0.58 due to lack of interest.)
  6618. In the development code, a partial port to Mac OS exists (see
  6619. question A.3.6).
  6620. Currently PuTTY does _not_ run on Windows CE (see question A.3.4).
  6621. We do not have release-quality ports for any other systems at the
  6622. present time. If anyone told you we had an Android port, or an iOS
  6623. port, or any other port of PuTTY, they were mistaken. We don't.
  6624. There are some third-party ports to various platforms, mentioned on
  6625. the Links page of our website.
  6626. A.3.2 Is there a port to Unix?
  6627. There are Unix ports of most of the traditional PuTTY tools, and
  6628. also one entirely new application.
  6629. If you look at the source release, you should find a `unix'
  6630. subdirectory. You need `cmake' to build it; see the file `README' in
  6631. the source distribution. This should build you:
  6632. - Unix ports of PuTTY, Plink, PSCP, and PSFTP, which work pretty
  6633. much the same as their Windows counterparts;
  6634. - Command-line versions of PuTTYgen and Pageant, whose user
  6635. interface is quite different to the Windows GUI versions;
  6636. - `pterm' - an xterm-type program which supports the same terminal
  6637. emulation as PuTTY.
  6638. If you don't have Gtk, you should still be able to build the
  6639. command-line tools.
  6640. A.3.3 What's the point of the Unix port? Unix has OpenSSH.
  6641. All sorts of little things. `pterm' is directly useful to anyone who
  6642. prefers PuTTY's terminal emulation to `xterm''s, which at least some
  6643. people do. Unix Plink has apparently found a niche among people who
  6644. find the complexity of OpenSSL makes OpenSSH hard to install (and
  6645. who don't mind Plink not having as many features). Some users want
  6646. to generate a large number of SSH keys on Unix and then copy them
  6647. all into PuTTY, and the Unix PuTTYgen should allow them to automate
  6648. that conversion process.
  6649. There were development advantages as well; porting PuTTY to Unix
  6650. was a valuable path-finding effort for other future ports, and also
  6651. allowed us to use the excellent Linux tool Valgrind to help with
  6652. debugging, which has already improved PuTTY's stability on _all_
  6653. platforms.
  6654. However, if you're a Unix user and you can see no reason to switch
  6655. from OpenSSH to PuTTY/Plink, then you're probably right. We don't
  6656. expect our Unix port to be the right thing for everybody.
  6657. A.3.4 Will there be a port to Windows CE or PocketPC?
  6658. We once did some work on such a port, but it only reached an early
  6659. stage, and certainly not a useful one. It's no longer being actively
  6660. worked on.
  6661. A.3.5 Is there a port to Windows 3.1?
  6662. PuTTY is a 32-bit application from the ground up, so it won't run on
  6663. Windows 3.1 as a native 16-bit program; and it would be _very_ hard
  6664. to port it to do so, because of Windows 3.1's vile memory allocation
  6665. mechanisms.
  6666. However, it is possible in theory to compile the existing PuTTY
  6667. source in such a way that it will run under Win32s (an extension to
  6668. Windows 3.1 to let you run 32-bit programs). In order to do this
  6669. you'll need the right kind of C compiler - modern versions of Visual
  6670. C at least have stopped being backwards compatible to Win32s. Also,
  6671. the last time we tried this it didn't work very well.
  6672. A.3.6 Will there be a port to the Mac?
  6673. We hope so!
  6674. We attempted one around 2005, written as a native Cocoa application,
  6675. but it turned out to be very slow to redraw its window for some
  6676. reason we never got to the bottom of.
  6677. In 2015, after porting the GTK front end to work with GTK 3, we
  6678. began another attempt based on making small changes to the GTK
  6679. code and building it against the OS X Quartz version of GTK 3.
  6680. This doesn't seem to have the window redrawing problem any more,
  6681. so it's already got further than the last effort, but it is still
  6682. substantially unfinished.
  6683. If any OS X and/or GTK programming experts are keen to have a
  6684. finished version of this, we urge them to help out with some of
  6685. the remaining problems! See the TODO list in `unix/main-gtk-
  6686. application.c' in the source code.
  6687. A.3.7 Will there be a port to EPOC?
  6688. I hope so, but given that ports aren't really progressing very fast
  6689. even on systems the developers _do_ already know how to program for,
  6690. it might be a long time before any of us get round to learning a new
  6691. system and doing the port for that.
  6692. However, some of the work has been done by other people; see the
  6693. Links page of our website for various third-party ports.
  6694. A.3.8 Will there be a port to the iPhone?
  6695. We have no plans to write such a port ourselves; none of us has an
  6696. iPhone, and developing and publishing applications for it looks
  6697. awkward and expensive.
  6698. However, there is a third-party SSH client for the iPhone and
  6699. iPod Touch called pTerm, which is apparently based on PuTTY. (This
  6700. is nothing to do with our similarly-named `pterm', which is a
  6701. standalone terminal emulator for Unix systems; see question A.3.2.)
  6702. A.4 Embedding PuTTY in other programs
  6703. A.4.1 Is the SSH or Telnet code available as a DLL?
  6704. No, it isn't. It would take a reasonable amount of rewriting for
  6705. this to be possible, and since the PuTTY project itself doesn't
  6706. believe in DLLs (they make installation more error-prone) none of us
  6707. has taken the time to do it.
  6708. Most of the code cleanup work would be a good thing to happen in
  6709. general, so if anyone feels like helping, we wouldn't say no.
  6710. See also the wishlist entry.
  6711. A.4.2 Is the SSH or Telnet code available as a Visual Basic component?
  6712. No, it isn't. None of the PuTTY team uses Visual Basic, and none of
  6713. us has any particular need to make SSH connections from a Visual
  6714. Basic application. In addition, all the preliminary work to turn it
  6715. into a DLL would be necessary first; and furthermore, we don't even
  6716. know how to write VB components.
  6717. If someone offers to do some of this work for us, we might consider
  6718. it, but unless that happens I can't see VB integration being
  6719. anywhere other than the very bottom of our priority list.
  6720. A.4.3 How can I use PuTTY to make an SSH connection from within another
  6721. program?
  6722. Probably your best bet is to use Plink, the command-line connection
  6723. tool. If you can start Plink as a second Windows process, and
  6724. arrange for your primary process to be able to send data to the
  6725. Plink process, and receive data from it, through pipes, then you
  6726. should be able to make SSH connections from your program.
  6727. This is what CVS for Windows does, for example.
  6728. A.5 Details of PuTTY's operation
  6729. A.5.1 What terminal type does PuTTY use?
  6730. For most purposes, PuTTY can be considered to be an xterm terminal.
  6731. PuTTY also supports some terminal control sequences not supported by
  6732. the real xterm: notably the Linux console sequences that reconfigure
  6733. the colour palette, and the title bar control sequences used by
  6734. DECterm (which are different from the xterm ones; PuTTY supports
  6735. both).
  6736. By default, PuTTY announces its terminal type to the server as
  6737. `xterm'. If you have a problem with this, you can reconfigure it to
  6738. say something else; `vt220' might help if you have trouble.
  6739. A.5.2 Where does PuTTY store its data?
  6740. On Windows, PuTTY stores most of its data (saved sessions, SSH host
  6741. keys) in the Registry. The precise location is
  6742. HKEY_CURRENT_USER\Software\SimonTatham\PuTTY
  6743. and within that area, saved sessions are stored under `Sessions'
  6744. while host keys are stored under `SshHostKeys'.
  6745. PuTTY also requires a random number seed file, to improve the
  6746. unpredictability of randomly chosen data needed as part of the
  6747. SSH cryptography. This is stored by default in a file called
  6748. `PUTTY.RND'; this is stored by default in the `Application Data'
  6749. directory, or failing that, one of a number of fallback locations.
  6750. If you want to change the location of the random number seed file,
  6751. you can put your chosen pathname in the Registry, at
  6752. HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\RandSeedFile
  6753. You can ask PuTTY to delete all this data; see question A.8.2.
  6754. On Unix, PuTTY stores all of this data in a directory ~/.putty by
  6755. default.
  6756. A.5.3 Why do small PuTTY icons appear next to the login prompts?
  6757. As of PuTTY 0.71, some lines of text in the terminal window are
  6758. marked with a small copy of the PuTTY icon (as far as pixels allow).
  6759. This is to show trustworthiness. When the PuTTY icon appears next to
  6760. a line of text, it indicates that that line of text was generated by
  6761. PuTTY itself, and not generated by the server and sent to PuTTY.
  6762. Text that comes from the server does not have this icon, and we've
  6763. arranged that the server should not be able to fake it. (There's
  6764. no control sequence the server can send which will make PuTTY draw
  6765. its own icon, and if the server tries to move the cursor back up to
  6766. a line that _already_ has an icon and overwrite the text, the icon
  6767. will disappear.)
  6768. This lets you tell the difference between (for example) a legitimate
  6769. prompt in which PuTTY itself asks you for your private key
  6770. passphrase, and a fake prompt in which the server tries to send
  6771. the identical text to trick you into telling _it_ your private key
  6772. passphrase.
  6773. A.5.4 Why has Plink started saying `Press Return to begin session'?
  6774. As of PuTTY 0.71, if you use Plink for an interactive SSH session,
  6775. then after the login phase has finished, it will present a final
  6776. interactive prompt saying `Access granted. Press Return to begin
  6777. session'.
  6778. This is another defence against servers trying to mimic the real
  6779. authentication prompts after the session has started. When you pass
  6780. through that prompt, you know that everything after it is generated
  6781. by the server and not by Plink itself, so any request for your
  6782. private key passphrase should be treated with suspicion.
  6783. In Plink, we can't use the defence described in section A.5.3: Plink
  6784. is running _in_ the terminal, so anything it can write into the
  6785. terminal, the server could write in the same way after the session
  6786. starts. And we can't just print a separator line without a pause,
  6787. because then the server could simply move the cursor back up to
  6788. it and overwrite it (probably with a brief flicker, but you might
  6789. easily miss that). The only robust defence anyone has come up with
  6790. involves this pause.
  6791. If you trust your server not to be abusive, you can turn this
  6792. off. It will also not appear in various other circumstances where
  6793. Plink can be confident it isn't necessary. See section 7.2.3.6 for
  6794. details.
  6795. A.6 HOWTO questions
  6796. A.6.1 What login name / password should I use?
  6797. This is not a question you should be asking _us_.
  6798. PuTTY is a communications tool, for making connections to other
  6799. computers. We maintain the tool; we _don't_ administer any computers
  6800. that you're likely to be able to use, in the same way that the
  6801. people who make web browsers aren't responsible for most of the
  6802. content you can view in them. We cannot help with questions of this
  6803. sort.
  6804. If you know the name of the computer you want to connect to, but
  6805. don't know what login name or password to use, you should talk to
  6806. whoever administers that computer. If you don't know who that is,
  6807. see the next question for some possible ways to find out.
  6808. A.6.2 What commands can I type into my PuTTY terminal window?
  6809. Again, this is not a question you should be asking _us_. You need
  6810. to read the manuals, or ask the administrator, of _the computer you
  6811. have connected to_.
  6812. PuTTY does not process the commands you type into it. It's only a
  6813. communications tool. It makes a connection to another computer; it
  6814. passes the commands you type to that other computer; and it passes
  6815. the other computer's responses back to you. Therefore, the precise
  6816. range of commands you can use will not depend on PuTTY, but on what
  6817. kind of computer you have connected to and what software is running
  6818. on it. The PuTTY team cannot help you with that.
  6819. (Think of PuTTY as being a bit like a telephone. If you phone
  6820. somebody up and you don't know what language to speak to make them
  6821. understand you, it isn't _the telephone company_'s job to find that
  6822. out for you. We just provide the means for you to get in touch;
  6823. making yourself understood is somebody else's problem.)
  6824. If you are unsure of where to start looking for the administrator
  6825. of your server, a good place to start might be to remember how you
  6826. found out the host name in the PuTTY configuration. If you were
  6827. given that host name by e-mail, for example, you could try asking
  6828. the person who sent you that e-mail. If your company's IT department
  6829. provided you with ready-made PuTTY saved sessions, then that IT
  6830. department can probably also tell you something about what commands
  6831. you can type during those sessions. But the PuTTY maintainer team
  6832. does not administer any server you are likely to be connecting to,
  6833. and cannot help you with questions of this type.
  6834. A.6.3 How can I make PuTTY start up maximised?
  6835. Create a Windows shortcut to start PuTTY from, and set it as `Run
  6836. Maximized'.
  6837. A.6.4 How can I create a Windows shortcut to start a particular saved
  6838. session directly?
  6839. To run a PuTTY session saved under the name `mysession', create a
  6840. Windows shortcut that invokes PuTTY with a command line like
  6841. \path\name\to\putty.exe -load "mysession"
  6842. (Note: prior to 0.53, the syntax was `@session'. This is now
  6843. deprecated and may be removed at some point.)
  6844. A.6.5 How can I start an SSH session straight from the command line?
  6845. Use the command line `putty -ssh host.name'. Alternatively, create a
  6846. saved session that specifies the SSH protocol, and start the saved
  6847. session as shown in question A.6.4.
  6848. A.6.6 How do I copy and paste between PuTTY and other Windows
  6849. applications?
  6850. Copy and paste works similarly to the X Window System. You use the
  6851. left mouse button to select text in the PuTTY window. The act of
  6852. selection _automatically_ copies the text to the clipboard: there
  6853. is no need to press Ctrl-Ins or Ctrl-C or anything else. In fact,
  6854. pressing Ctrl-C will send a Ctrl-C character to the other end of
  6855. your connection (just like it does the rest of the time), which may
  6856. have unpleasant effects. The _only_ thing you need to do, to copy
  6857. text to the clipboard, is to select it.
  6858. To paste the clipboard contents into a PuTTY window, by default you
  6859. click the right mouse button. If you have a three-button mouse and
  6860. are used to X applications, you can configure pasting to be done by
  6861. the middle button instead, but this is not the default because most
  6862. Windows users don't have a middle button at all.
  6863. You can also paste by pressing Shift-Ins.
  6864. A.6.7 How do I use all PuTTY's features (public keys, proxying, cipher
  6865. selection, etc.) in PSCP, PSFTP and Plink?
  6866. Most major features (e.g., public keys, port forwarding) are
  6867. available through command line options. See section 3.11.3.
  6868. Not all features are accessible from the command line yet, although
  6869. we'd like to fix this. In the meantime, you can use most of PuTTY's
  6870. features if you create a PuTTY saved session, and then use the name
  6871. of the saved session on the command line in place of a hostname.
  6872. This works for PSCP, PSFTP and Plink (but don't expect port
  6873. forwarding in the file transfer applications!).
  6874. A.6.8 How do I use PSCP.EXE? When I double-click it gives me a command
  6875. prompt window which then closes instantly.
  6876. PSCP is a command-line application, not a GUI application. If you
  6877. run it without arguments, it will simply print a help message and
  6878. terminate.
  6879. To use PSCP properly, run it from a Command Prompt window. See
  6880. chapter 5 in the documentation for more details.
  6881. A.6.9 How do I use PSCP to copy a file whose name has spaces in?
  6882. If PSCP is using the newer SFTP protocol (which is usual with most
  6883. modern servers), this is straightforward; all filenames with spaces
  6884. in are specified using a single pair of quotes in the obvious way:
  6885. pscp "local file" user@host:
  6886. pscp user@host:"remote file" .
  6887. However, if PSCP is using the older SCP protocol for some reason,
  6888. things are more confusing. If you're specifying a file at the local
  6889. end, you just use one set of quotes as you would normally do:
  6890. pscp "local filename with spaces" user@host:
  6891. pscp user@host:myfile "local filename with spaces"
  6892. But if the filename you're specifying is on the _remote_ side, you
  6893. have to use backslashes and two sets of quotes:
  6894. pscp user@host:"\"remote filename with spaces\"" local_filename
  6895. pscp local_filename user@host:"\"remote filename with spaces\""
  6896. Worse still, in a remote-to-local copy you have to specify the local
  6897. file name explicitly, otherwise PSCP will complain that they don't
  6898. match (unless you specified the `-unsafe' option). The following
  6899. command will give an error message:
  6900. c:\>pscp user@host:"\"oo er\"" .
  6901. warning: remote host tried to write to a file called 'oo er'
  6902. when we requested a file called '"oo er"'.
  6903. Instead, you need to specify the local file name in full:
  6904. c:\>pscp user@host:"\"oo er\"" "oo er"
  6905. A.6.10 Should I run the 32-bit or the 64-bit version?
  6906. If you're not sure, the 32-bit version is generally the safe option.
  6907. It will run perfectly well on all processors and on all versions of
  6908. Windows that PuTTY supports. PuTTY doesn't require to run as a 64-
  6909. bit application to work well, and having a 32-bit PuTTY on a 64-bit
  6910. system isn't likely to cause you any trouble.
  6911. The 64-bit version (first released in 0.68) will only run if you
  6912. have a 64-bit processor _and_ a 64-bit edition of Windows (both of
  6913. these things are likely to be true of any recent Windows PC). It
  6914. will run somewhat faster (in particular, the cryptography will be
  6915. faster, especially during link setup), but it will consume slightly
  6916. more memory.
  6917. If you need to use an external DLL for GSSAPI authentication, that
  6918. DLL may only be available in a 32-bit or 64-bit form, and that will
  6919. dictate the version of PuTTY you need to use. (You will probably
  6920. know if you're doing this; see section 4.23.2 in the documentation.)
  6921. A.7 Troubleshooting
  6922. A.7.1 Why do I see `Fatal: Protocol error: Expected control record' in
  6923. PSCP?
  6924. This happens because PSCP was expecting to see data from the server
  6925. that was part of the PSCP protocol exchange, and instead it saw data
  6926. that it couldn't make any sense of at all.
  6927. This almost always happens because the startup scripts in your
  6928. account on the server machine are generating output. This is
  6929. impossible for PSCP, or any other SCP client, to work around. You
  6930. should never use startup files (`.bashrc', `.cshrc' and so on) which
  6931. generate output in non-interactive sessions.
  6932. This is not actually a PuTTY problem. If PSCP fails in this way,
  6933. then all other SCP clients are likely to fail in exactly the same
  6934. way. The problem is at the server end.
  6935. A.7.2 I clicked on a colour in the Colours panel, and the colour didn't
  6936. change in my terminal.
  6937. That isn't how you're supposed to use the Colours panel.
  6938. During the course of a session, PuTTY potentially uses _all_ the
  6939. colours listed in the Colours panel. It's not a question of using
  6940. only one of them and you choosing which one; PuTTY will use them
  6941. _all_. The purpose of the Colours panel is to let you adjust the
  6942. appearance of all the colours. So to change the colour of the
  6943. cursor, for example, you would select `Cursor Colour', press the
  6944. `Modify' button, and select a new colour from the dialog box that
  6945. appeared. Similarly, if you want your session to appear in green,
  6946. you should select `Default Foreground' and press `Modify'. Clicking
  6947. on `ANSI Green' won't turn your session green; it will only allow
  6948. you to adjust the _shade_ of green used when PuTTY is instructed by
  6949. the server to display green text.
  6950. A.7.3 After trying to establish an SSH-2 connection, PuTTY says `Out of
  6951. memory' and dies.
  6952. If this happens just while the connection is starting up, this often
  6953. indicates that for some reason the client and server have failed to
  6954. establish a session encryption key. Somehow, they have performed
  6955. calculations that should have given each of them the same key, but
  6956. have ended up with different keys; so data encrypted by one and
  6957. decrypted by the other looks like random garbage.
  6958. This causes an `out of memory' error because the first encrypted
  6959. data PuTTY expects to see is the length of an SSH message. Normally
  6960. this will be something well under 100 bytes. If the decryption has
  6961. failed, PuTTY will see a completely random length in the region of
  6962. two _gigabytes_, and will try to allocate enough memory to store
  6963. this non-existent message. This will immediately lead to it thinking
  6964. it doesn't have enough memory, and panicking.
  6965. If this happens to you, it is quite likely to still be a PuTTY bug
  6966. and you should report it (although it might be a bug in your SSH
  6967. server instead); but it doesn't necessarily mean you've actually run
  6968. out of memory.
  6969. A.7.4 When attempting a file transfer, either PSCP or PSFTP says `Out of
  6970. memory' and dies.
  6971. This is almost always caused by your login scripts on the server
  6972. generating output. PSCP or PSFTP will receive that output when they
  6973. were expecting to see the start of a file transfer protocol, and
  6974. they will attempt to interpret the output as file-transfer protocol.
  6975. This will usually lead to an `out of memory' error for much the same
  6976. reasons as given in question A.7.3.
  6977. This is a setup problem in your account on your server, _not_ a
  6978. PSCP/PSFTP bug. Your login scripts should _never_ generate output
  6979. during non-interactive sessions; secure file transfer is not the
  6980. only form of remote access that will break if they do.
  6981. On Unix, a simple fix is to ensure that all the parts of your login
  6982. script that might generate output are in `.profile' (if you use a
  6983. Bourne shell derivative) or `.login' (if you use a C shell). Putting
  6984. them in more general files such as `.bashrc' or `.cshrc' is liable
  6985. to lead to problems.
  6986. A.7.5 PSFTP transfers files much slower than PSCP.
  6987. The throughput of PSFTP 0.54 should be much better than 0.53b and
  6988. prior; we've added code to the SFTP backend to queue several blocks
  6989. of data rather than waiting for an acknowledgement for each. (The
  6990. SCP backend did not suffer from this performance issue because SCP
  6991. is a much simpler protocol.)
  6992. A.7.6 When I run full-colour applications, I see areas of black space
  6993. where colour ought to be, or vice versa.
  6994. You almost certainly need to change the `Use background colour to
  6995. erase screen' setting in the Terminal panel. If there is too much
  6996. black space (the commoner situation), you should enable it, while
  6997. if there is too much colour, you should disable it. (See section
  6998. 4.3.5.)
  6999. In old versions of PuTTY, this was disabled by default, and would
  7000. not take effect until you reset the terminal (see question A.7.7).
  7001. Since 0.54, it is enabled by default, and changes take effect
  7002. immediately.
  7003. A.7.7 When I change some terminal settings, nothing happens.
  7004. Some of the terminal options (notably Auto Wrap and background-
  7005. colour screen erase) actually represent the _default_ setting,
  7006. rather than the currently active setting. The server can send
  7007. sequences that modify these options in mid-session, but when the
  7008. terminal is reset (by server action, or by you choosing `Reset
  7009. Terminal' from the System menu) the defaults are restored.
  7010. In versions 0.53b and prior, if you change one of these options in
  7011. the middle of a session, you will find that the change does not
  7012. immediately take effect. It will only take effect once you reset the
  7013. terminal.
  7014. In version 0.54, the behaviour has changed - changes to these
  7015. settings take effect immediately.
  7016. A.7.8 My PuTTY sessions unexpectedly close after they are idle for a
  7017. while.
  7018. Some types of firewall, and almost any router doing Network Address
  7019. Translation (NAT, also known as IP masquerading), will forget about
  7020. a connection through them if the connection does nothing for too
  7021. long. This will cause the connection to be rudely cut off when
  7022. contact is resumed.
  7023. You can try to combat this by telling PuTTY to send _keepalives_:
  7024. packets of data which have no effect on the actual session, but
  7025. which reassure the router or firewall that the network connection is
  7026. still active and worth remembering about.
  7027. Keepalives don't solve everything, unfortunately; although they
  7028. cause greater robustness against this sort of router, they can also
  7029. cause a _loss_ of robustness against network dropouts. See section
  7030. 4.14.1 in the documentation for more discussion of this.
  7031. A.7.9 PuTTY's network connections time out too quickly when network
  7032. connectivity is temporarily lost.
  7033. This is a Windows problem, not a PuTTY problem. The timeout value
  7034. can't be set on per application or per session basis. To increase
  7035. the TCP timeout globally, you need to tinker with the Registry.
  7036. On Windows 95, 98 or ME, the registry key you need to create or
  7037. change is
  7038. HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\VxD\
  7039. MSTCP\MaxDataRetries
  7040. (it must be of type DWORD in Win95, or String in Win98/ME). (See MS
  7041. Knowledge Base article 158474 for more information.)
  7042. On Windows NT, 2000, or XP, the registry key to create or change is
  7043. HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\
  7044. Parameters\TcpMaxDataRetransmissions
  7045. and it must be of type DWORD. (See MS Knowledge Base articles 120642
  7046. and 314053 for more information.)
  7047. Set the key's value to something like 10. This will cause Windows to
  7048. try harder to keep connections alive instead of abandoning them.
  7049. A.7.10 When I cat a binary file, I get `PuTTYPuTTYPuTTY' on my command
  7050. line.
  7051. Don't do that, then.
  7052. This is designed behaviour; when PuTTY receives the character
  7053. Control-E from the remote server, it interprets it as a request
  7054. to identify itself, and so it sends back the string `PuTTY' as if
  7055. that string had been entered at the keyboard. Control-E should only
  7056. be sent by programs that are prepared to deal with the response.
  7057. Writing a binary file to your terminal is likely to output many
  7058. Control-E characters, and cause this behaviour. Don't do it. It's a
  7059. bad plan.
  7060. To mitigate the effects, you could configure the answerback string
  7061. to be empty (see section 4.3.7); but writing binary files to your
  7062. terminal is likely to cause various other unpleasant behaviour, so
  7063. this is only a small remedy.
  7064. A.7.11 When I cat a binary file, my window title changes to a nonsense
  7065. string.
  7066. Don't do that, then.
  7067. It is designed behaviour that PuTTY should have the ability
  7068. to adjust the window title on instructions from the server.
  7069. Normally the control sequence that does this should only be sent
  7070. deliberately, by programs that know what they are doing and intend
  7071. to put meaningful text in the window title. Writing a binary file to
  7072. your terminal runs the risk of sending the same control sequence by
  7073. accident, and cause unexpected changes in the window title. Don't do
  7074. it.
  7075. A.7.12 My keyboard stops working once PuTTY displays the password prompt.
  7076. No, it doesn't. PuTTY just doesn't display the password you type, so
  7077. that someone looking at your screen can't see what it is.
  7078. Unlike the Windows login prompts, PuTTY doesn't display the password
  7079. as a row of asterisks either. This is so that someone looking at
  7080. your screen can't even tell how _long_ your password is, which might
  7081. be valuable information.
  7082. A.7.13 One or more function keys don't do what I expected in a server-side
  7083. application.
  7084. If you've already tried all the relevant options in the PuTTY
  7085. Keyboard panel, you may need to mail the PuTTY maintainers and ask.
  7086. It is _not_ usually helpful just to tell us which application,
  7087. which server operating system, and which key isn't working; in
  7088. order to replicate the problem we would need to have a copy of
  7089. every operating system, and every application, that anyone has ever
  7090. complained about.
  7091. PuTTY responds to function key presses by sending a sequence of
  7092. control characters to the server. If a function key isn't doing what
  7093. you expect, it's likely that the character sequence your application
  7094. is expecting to receive is not the same as the one PuTTY is sending.
  7095. Therefore what we really need to know is _what_ sequence the
  7096. application is expecting.
  7097. The simplest way to investigate this is to find some other terminal
  7098. environment, in which that function key _does_ work; and then
  7099. investigate what sequence the function key is sending in that
  7100. situation. One reasonably easy way to do this on a Unix system is
  7101. to type the command `cat', and then press the function key. This is
  7102. likely to produce output of the form `^[[11~'. You can also do this
  7103. in PuTTY, to find out what sequence the function key is producing in
  7104. that. Then you can mail the PuTTY maintainers and tell us `I wanted
  7105. the F1 key to send `^[[11~', but instead it's sending `^[OP', can
  7106. this be done?', or something similar.
  7107. You should still read the Feedback page on the PuTTY website (also
  7108. provided as appendix B in the manual), and follow the guidelines
  7109. contained in that.
  7110. A.7.14 Why do I see `Couldn't load private key from ...'? Why can PuTTYgen
  7111. load my key but not PuTTY?
  7112. It's likely that you've generated an SSH protocol 2 key with
  7113. PuTTYgen, but you're trying to use it in an SSH-1 connection. SSH-
  7114. 1 and SSH-2 keys have different formats, and (at least in 0.52)
  7115. PuTTY's reporting of a key in the wrong format isn't optimal.
  7116. To connect using SSH-2 to a server that supports both versions, you
  7117. need to change the configuration from the default (see question
  7118. A.2.1).
  7119. A.7.15 When I'm connected to a Red Hat Linux 8.0 system, some characters
  7120. don't display properly.
  7121. A common complaint is that hyphens in man pages show up as a-acute.
  7122. With release 8.0, Red Hat appear to have made UTF-8 the default
  7123. character set. There appears to be no way for terminal emulators
  7124. such as PuTTY to know this (as far as we know, the appropriate
  7125. escape sequence to switch into UTF-8 mode isn't sent).
  7126. A fix is to configure sessions to RH8 systems to use UTF-8
  7127. translation - see section 4.10.1 in the documentation. (Note that if
  7128. you use `Change Settings', changes may not take place immediately -
  7129. see question A.7.7.)
  7130. If you really want to change the character set used by the server,
  7131. the right place is `/etc/sysconfig/i18n', but this shouldn't be
  7132. necessary.
  7133. A.7.16 Since I upgraded to PuTTY 0.54, the scrollback has stopped working
  7134. when I run `screen'.
  7135. PuTTY's terminal emulator has always had the policy that when the
  7136. `alternate screen' is in use, nothing is added to the scrollback.
  7137. This is because the usual sorts of programs which use the alternate
  7138. screen are things like text editors, which tend to scroll back and
  7139. forth in the same document a lot; so (a) they would fill up the
  7140. scrollback with a large amount of unhelpfully disordered text, and
  7141. (b) they contain their _own_ method for the user to scroll back to
  7142. the bit they were interested in. We have generally found this policy
  7143. to do the Right Thing in almost all situations.
  7144. Unfortunately, `screen' is one exception: it uses the alternate
  7145. screen, but it's still usually helpful to have PuTTY's scrollback
  7146. continue working. The simplest solution is to go to the Features
  7147. control panel and tick `Disable switching to alternate terminal
  7148. screen'. (See section 4.6.4 for more details.) Alternatively, you
  7149. can tell `screen' itself not to use the alternate screen: the
  7150. `screen' FAQ suggests adding the line `termcapinfo xterm ti@:te@' to
  7151. your .screenrc file.
  7152. The reason why this only started to be a problem in 0.54 is because
  7153. `screen' typically uses an unusual control sequence to switch to the
  7154. alternate screen, and previous versions of PuTTY did not support
  7155. this sequence.
  7156. A.7.17 Since I upgraded Windows XP to Service Pack 2, I can't use addresses
  7157. like 127.0.0.2.
  7158. Some people who ask PuTTY to listen on localhost addresses other
  7159. than 127.0.0.1 to forward services such as SMB and Windows Terminal
  7160. Services have found that doing so no longer works since they
  7161. upgraded to WinXP SP2.
  7162. This is apparently an issue with SP2 that is acknowledged by
  7163. Microsoft in MS Knowledge Base article 884020. The article links to
  7164. a fix you can download.
  7165. (_However_, we've been told that SP2 _also_ fixes the bug that means
  7166. you need to use non-127.0.0.1 addresses to forward Terminal Services
  7167. in the first place.)
  7168. A.7.18 PSFTP commands seem to be missing a directory separator (slash).
  7169. Some people have reported the following incorrect behaviour with
  7170. PSFTP:
  7171. psftp> pwd
  7172. Remote directory is /dir1/dir2
  7173. psftp> get filename.ext
  7174. /dir1/dir2filename.ext: no such file or directory
  7175. This is not a bug in PSFTP. There is a known bug in some versions of
  7176. portable OpenSSH (bug 697) that causes these symptoms; it appears
  7177. to have been introduced around 3.7.x. It manifests only on certain
  7178. platforms (AIX is what has been reported to us).
  7179. There is a patch for OpenSSH attached to that bug; it's also fixed
  7180. in recent versions of portable OpenSSH (from around 3.8).
  7181. A.7.19 Do you want to hear about `Software caused connection abort'?
  7182. In the documentation for PuTTY 0.53 and 0.53b, we mentioned that
  7183. we'd like to hear about any occurrences of this error. Since the
  7184. release of PuTTY 0.54, however, we've been convinced that this error
  7185. doesn't indicate that PuTTY's doing anything wrong, and we don't
  7186. need to hear about further occurrences. See section 10.16 for our
  7187. current documentation of this error.
  7188. A.7.20 My SSH-2 session locks up for a few seconds every so often.
  7189. Recent versions of PuTTY automatically initiate repeat key exchange
  7190. once per hour, to improve session security. If your client or server
  7191. machine is slow, you may experience this as a delay of anything up
  7192. to thirty seconds or so.
  7193. These delays are inconvenient, but they are there for your
  7194. protection. If they really cause you a problem, you can choose to
  7195. turn off periodic rekeying using the `Kex' configuration panel (see
  7196. section 4.18), but be aware that you will be sacrificing security
  7197. for this. (Falling back to SSH-1 would also remove the delays, but
  7198. would lose a _lot_ more security still. We do not recommend it.)
  7199. A.7.21 PuTTY fails to start up. Windows claims that `the application
  7200. configuration is incorrect'.
  7201. This is caused by a bug in certain versions of Windows XP which is
  7202. triggered by PuTTY 0.58. This was fixed in 0.59. The `xp-wont-run'
  7203. entry in PuTTY's wishlist has more details.
  7204. A.7.22 When I put 32-bit PuTTY in C:\WINDOWS\SYSTEM32 on my 64-bit Windows
  7205. system, `Duplicate Session' doesn't work.
  7206. The short answer is not to put the PuTTY executables in that
  7207. location.
  7208. On 64-bit systems, C:\WINDOWS\SYSTEM32 is intended to contain
  7209. only 64-bit binaries; Windows' 32-bit binaries live in
  7210. C:\WINDOWS\SYSWOW64. When a 32-bit PuTTY executable runs on a 64-
  7211. bit system, it cannot by default see the `real' C:\WINDOWS\SYSTEM32
  7212. at all, because the File System Redirector arranges that the running
  7213. program sees the appropriate kind of binaries in SYSTEM32. Thus,
  7214. operations in the PuTTY suite that involve it accessing its own
  7215. executables, such as `New Session' and `Duplicate Session', will not
  7216. work.
  7217. A.7.23 After I upgraded PuTTY to 0.68, I can no longer connect to my
  7218. embedded device or appliance.
  7219. If your SSH server has started unexpectedly closing SSH connections
  7220. after you enter your password, and it worked before 0.68, you may
  7221. have a buggy server that objects to certain SSH protocol extensions.
  7222. The SSH protocol recently gained a new `terminal mode', IUTF8, which
  7223. PuTTY sends by default; see section 4.24.2. This is the first new
  7224. terminal mode since the SSH-2 protocol was defined. While servers
  7225. are supposed to ignore modes they don't know about, some buggy
  7226. servers will unceremoniously close the connection if they see
  7227. anything they don't recognise. SSH servers in embedded devices,
  7228. network appliances, and the like seem to disproportionately have
  7229. this bug.
  7230. If you think you have such a server, from 0.69 onwards you can
  7231. disable sending of the IUTF8 mode: on the SSH / TTY panel, select
  7232. IUTF8 on the list, select `Nothing', and press `Set'. (It's not
  7233. possible to disable sending this mode in 0.68.)
  7234. A.7.24 Since 0.78, I can't find where to configure my SSH private key.
  7235. In PuTTY 0.78, the `Private key file for authentication' control,
  7236. where you specify a `.PPK' file for SSH public key authentication,
  7237. moved to a new `Credentials' panel in the configuration dialog. You
  7238. can find this by opening the `SSH' category in the tree view on the
  7239. left, then opening the `Auth' subcategory under that, then clicking
  7240. on `Credentials'. On this page you'll find the `Browse...' button
  7241. you need to select a `.PPK' file for authentication, as described in
  7242. section 4.22.1.
  7243. (This control had previously been on the `Auth' panel since public
  7244. key authentication was first released in 2002, so many online how-
  7245. to guides still describe it there. The configuration controls were
  7246. reorganised to make room for features added in 0.78, such as OpenSSH
  7247. certificates.)
  7248. A.8 Security questions
  7249. A.8.1 Is it safe for me to download PuTTY and use it on a public PC?
  7250. It depends on whether you trust that PC. If you don't trust the
  7251. public PC, don't use PuTTY on it, and don't use any other software
  7252. you plan to type passwords into either. It might be watching your
  7253. keystrokes, or it might tamper with the PuTTY binary you download.
  7254. There is _no_ program safe enough that you can run it on an actively
  7255. malicious PC and get away with typing passwords into it.
  7256. If you do trust the PC, then it's probably OK to use PuTTY on it
  7257. (but if you don't trust the network, then the PuTTY download might
  7258. be tampered with, so it would be better to carry PuTTY with you on a
  7259. USB stick).
  7260. A.8.2 What does PuTTY leave on a system? How can I clean up after it?
  7261. PuTTY will leave some Registry entries, and a random seed file, on
  7262. the PC (see question A.5.2). Windows 7 and up also remember some
  7263. information about recently launched sessions for the `jump list'
  7264. feature.
  7265. If you are using PuTTY on a public PC, or somebody else's PC, you
  7266. might want to clean this information up when you leave. You can do
  7267. that automatically, by running the command `putty -cleanup'. See
  7268. section 3.11.2 in the documentation for more detail. (Note that this
  7269. only removes settings for the currently logged-in user on multi-user
  7270. systems.)
  7271. If PuTTY was installed from the installer package, it will also
  7272. appear in `Add/Remove Programs'. Current versions of the installer
  7273. do not offer to remove the above-mentioned items, so if you want
  7274. them removed you should run `putty -cleanup' before uninstalling.
  7275. A.8.3 How come PuTTY now supports DSA, when the website used to say how
  7276. insecure it was?
  7277. DSA has a major weakness _if badly implemented_: it relies on a
  7278. random number generator to far too great an extent. If the random
  7279. number generator produces a number an attacker can predict, the DSA
  7280. private key is exposed - meaning that the attacker can log in as you
  7281. on all systems that accept that key.
  7282. The PuTTY policy changed because the developers were informed of
  7283. ways to implement DSA which do not suffer nearly as badly from this
  7284. weakness, and indeed which don't need to rely on random numbers at
  7285. all. For this reason we now believe PuTTY's DSA implementation is
  7286. probably OK.
  7287. The recently added elliptic-curve signature methods are also DSA-
  7288. style algorithms, so they have this same weakness in principle. Our
  7289. ECDSA implementation uses the same defence as DSA, while our Ed25519
  7290. implementation uses the similar system (but different in details)
  7291. that the Ed25519 spec mandates.
  7292. A.8.4 Couldn't Pageant use VirtualLock() to stop private keys being
  7293. written to disk?
  7294. Unfortunately not. The VirtualLock() function in the Windows API
  7295. doesn't do a proper job: it may prevent small pieces of a process's
  7296. memory from being paged to disk while the process is running, but
  7297. it doesn't stop the process's memory as a whole from being swapped
  7298. completely out to disk when the process is long-term inactive. And
  7299. Pageant spends most of its time inactive.
  7300. A.8.5 Is the version of PuTTY in the Microsoft Store legit?
  7301. The free-of-charge `PuTTY' application at this link is published
  7302. and maintained by us. The copy there is the latest release, usually
  7303. updated within a few days of us publishing it on our own website.
  7304. There have been other copies of PuTTY on the store, some looking
  7305. quite similar, and some charging money. Those were uploaded by other
  7306. people, and we can't guarantee anything about them.
  7307. The first version we published to the Microsoft Store was 0.76 (some
  7308. time after its initial release on our website).
  7309. A.9 Administrative questions
  7310. A.9.1 Is putty.org your website?
  7311. No, it isn't. putty.org is run by an opportunist who uses it to
  7312. advertise their own commercial SSH implementation to people looking
  7313. for our free one. We don't own that site, we can't control it, and
  7314. we don't advise anyone to use it in preference to our own site.
  7315. The real PuTTY web site, run by the PuTTY team, has always been at
  7316. https://www.chiark.greenend.org.uk/~sgtatham/putty/.
  7317. A.9.2 Why do the download links point to the.earth.li and not chiark? Has
  7318. your website been hacked?
  7319. We haven't been hacked: links to the.earth.li are legit. The files
  7320. for released versions of PuTTY are hosted on a different server from
  7321. the web pages, for bandwidth reasons.
  7322. The download site the.earth.li is hosted by Mythic Beasts, and we're
  7323. very grateful to them!
  7324. A.9.3 Would you like me to register you a nicer domain name?
  7325. No, thank you. Even if you can find one (most of them seem to
  7326. have been registered already, by people who didn't ask whether we
  7327. actually wanted it before they applied), we're happy with the PuTTY
  7328. web site being exactly where it is. It's not hard to find (just type
  7329. `putty' into google.com and we're the first link returned), and we
  7330. don't believe the administrative hassle of moving the site would be
  7331. worth the benefit.
  7332. In addition, if we _did_ want a custom domain name, we would want to
  7333. run it ourselves, so we knew for certain that it would continue to
  7334. point where we wanted it, and wouldn't suddenly change or do strange
  7335. things. Having it registered for us by a third party who we don't
  7336. even know is not the best way to achieve this.
  7337. A.9.4 Would you like free web hosting for the PuTTY web site?
  7338. We already have some, thanks.
  7339. A.9.5 Would you link to my web site from the PuTTY web site?
  7340. Only if the content of your web page is of definite direct interest
  7341. to PuTTY users. If your content is unrelated, or only tangentially
  7342. related, to PuTTY, then the link would simply be advertising for
  7343. you.
  7344. One very nice effect of the Google ranking mechanism is that by and
  7345. large, the most popular web sites get the highest rankings. This
  7346. means that when an ordinary person does a search, the top item in
  7347. the search is very likely to be a high-quality site or the site they
  7348. actually wanted, rather than the site which paid the most money for
  7349. its ranking.
  7350. The PuTTY web site is held in high esteem by Google, for precisely
  7351. this reason: lots of people have linked to it simply because they
  7352. like PuTTY, without us ever having to ask anyone to link to us. We
  7353. feel that it would be an abuse of this esteem to use it to boost the
  7354. ranking of random advertisers' web sites. If you want your web site
  7355. to have a high Google ranking, we'd prefer that you achieve this the
  7356. way we did - by being good enough at what you do that people will
  7357. link to you simply because they like you.
  7358. In particular, we aren't interested in trading links for money
  7359. (see above), and we _certainly_ aren't interested in trading links
  7360. for other links (since we have no advertising on our web site, our
  7361. Google ranking is not even directly worth anything to us). If we
  7362. don't want to link to you for free, then we probably won't want to
  7363. link to you at all.
  7364. If you have software based on PuTTY, or specifically designed to
  7365. interoperate with PuTTY, or in some other way of genuine interest to
  7366. PuTTY users, then we will probably be happy to add a link to you on
  7367. our Links page. And if you're running a particularly valuable mirror
  7368. of the PuTTY web site, we might be interested in linking to you from
  7369. our Mirrors page.
  7370. A.9.6 Why don't you move PuTTY to SourceForge?
  7371. Partly, because we don't want to move the web site location (see
  7372. question A.9.3).
  7373. Also, security reasons. PuTTY is a security product, and as such it
  7374. is particularly important to guard the code and the web site against
  7375. unauthorised modifications which might introduce subtle security
  7376. flaws. Therefore, we prefer that the Git repository, web site and
  7377. FTP site remain where they are, under the direct control of system
  7378. administrators we know and trust personally, rather than being run
  7379. by a large organisation full of people we've never met and which is
  7380. known to have had breakins in the past.
  7381. No offence to SourceForge; I think they do a wonderful job. But
  7382. they're not ideal for everyone, and in particular they're not ideal
  7383. for us.
  7384. A.9.7 Why can't I subscribe to the putty-bugs mailing list?
  7385. Because you're not a member of the PuTTY core development team. The
  7386. putty-bugs mailing list is not a general newsgroup-like discussion
  7387. forum; it's a contact address for the core developers, and an
  7388. _internal_ mailing list for us to discuss things among ourselves.
  7389. If we opened it up for everybody to subscribe to, it would turn
  7390. into something more like a newsgroup and we would be completely
  7391. overwhelmed by the volume of traffic. It's hard enough to keep up
  7392. with the list as it is.
  7393. A.9.8 If putty-bugs isn't a general-subscription mailing list, what is?
  7394. There isn't one, that we know of.
  7395. If someone else wants to set up a mailing list or other forum for
  7396. PuTTY users to help each other with common problems, that would be
  7397. fine with us, though the PuTTY team would almost certainly not have
  7398. the time to read it.
  7399. A.9.9 How can I donate to PuTTY development?
  7400. Please, _please_ don't feel you have to. PuTTY is completely free
  7401. software, and not shareware. We think it's very important that
  7402. _everybody_ who wants to use PuTTY should be able to, whether they
  7403. have any money or not; so the last thing we would want is for a
  7404. PuTTY user to feel guilty because they haven't paid us any money. If
  7405. you want to keep your money, please do keep it. We wouldn't dream of
  7406. asking for any.
  7407. Having said all that, if you still really _want_ to give us money,
  7408. we won't argue :-) The easiest way for us to accept donations is if
  7409. you send money to <[email protected]> using PayPal (www.paypal.com).
  7410. If you don't like PayPal, talk to us; we can probably arrange some
  7411. alternative means.
  7412. Small donations (tens of dollars or tens of euros) will probably be
  7413. spent on beer or curry, which helps motivate our volunteer team to
  7414. continue doing this for the world. Larger donations will be spent on
  7415. something that actually helps development, if we can find anything
  7416. (perhaps new hardware, or a new version of Windows), but if we
  7417. can't find anything then we'll just distribute the money among the
  7418. developers. If you want to be sure your donation is going towards
  7419. something worthwhile, ask us first. If you don't like these terms,
  7420. feel perfectly free not to donate. We don't mind.
  7421. A.9.10 Can I have permission to put PuTTY on a cover disk / distribute it
  7422. with other software / etc?
  7423. Yes. For most things, you need not bother asking us explicitly for
  7424. permission; our licence already grants you permission.
  7425. See section B.9 for more details.
  7426. A.9.11 Can you sign an agreement indemnifying us against security problems
  7427. in PuTTY?
  7428. No!
  7429. A vendor of physical security products (e.g. locks) might plausibly
  7430. be willing to accept financial liability for a product that failed
  7431. to perform as advertised and resulted in damage (e.g. valuables
  7432. being stolen). The reason they can afford to do this is because they
  7433. sell a _lot_ of units, and only a small proportion of them will
  7434. fail; so they can meet their financial liability out of the income
  7435. from all the rest of their sales, and still have enough left over
  7436. to make a profit. Financial liability is intrinsically linked to
  7437. selling your product for money.
  7438. There are two reasons why PuTTY is not analogous to a physical
  7439. lock in this context. One is that software products don't exhibit
  7440. random variation: _if_ PuTTY has a security hole (which does happen,
  7441. although we do our utmost to prevent it and to respond quickly
  7442. when it does), every copy of PuTTY will have the same hole, so
  7443. it's likely to affect all the users at the same time. So even if
  7444. our users were all paying us to use PuTTY, we wouldn't be able to
  7445. _simultaneously_ pay every affected user compensation in excess of
  7446. the amount they had paid us in the first place. It just wouldn't
  7447. work.
  7448. The second, much more important, reason is that PuTTY users _don't_
  7449. pay us. The PuTTY team does not have an income; it's a volunteer
  7450. effort composed of people spending their spare time to try to write
  7451. useful software. We aren't even a company or any kind of legally
  7452. recognised organisation. We're just a bunch of people who happen to
  7453. do some stuff in our spare time.
  7454. Therefore, to ask us to assume financial liability is to ask us to
  7455. assume a risk of having to pay it out of our own _personal_ pockets:
  7456. out of the same budget from which we buy food and clothes and pay
  7457. our rent. That's more than we're willing to give. We're already
  7458. giving a lot of our spare _time_ to developing software for free; if
  7459. we had to pay our own _money_ to do it as well, we'd start to wonder
  7460. why we were bothering.
  7461. Free software fundamentally does not work on the basis of financial
  7462. guarantees. Your guarantee of the software functioning correctly is
  7463. simply that you have the source code and can check it before you
  7464. use it. If you want to be sure there aren't any security holes, do
  7465. a security audit of the PuTTY code, or hire a security engineer if
  7466. you don't have the necessary skills yourself: instead of trying to
  7467. ensure you can get compensation in the event of a disaster, try to
  7468. ensure there isn't a disaster in the first place.
  7469. If you _really_ want financial security, see if you can find a
  7470. security engineer who will take financial responsibility for the
  7471. correctness of their review. (This might be less likely to suffer
  7472. from the everything-failing-at-once problem mentioned above, because
  7473. such an engineer would probably be reviewing a lot of _different_
  7474. products which would tend to fail independently.) Failing that,
  7475. see if you can persuade an insurance company to insure you against
  7476. security incidents, and if the insurer demands it as a condition
  7477. then get our code reviewed by a security engineer they're happy
  7478. with.
  7479. A.9.12 Can you sign this form granting us permission to use/distribute
  7480. PuTTY?
  7481. If your form contains any clause along the lines of `the undersigned
  7482. represents and warrants', we're not going to sign it. This is
  7483. particularly true if it asks us to warrant that PuTTY is secure;
  7484. see question A.9.11 for more discussion of this. But it doesn't
  7485. really matter what we're supposed to be warranting: even if it's
  7486. something we already believe is true, such as that we don't infringe
  7487. any third-party copyright, we will not sign a document accepting
  7488. any legal or financial liability. This is simply because the PuTTY
  7489. development project has no income out of which to satisfy that
  7490. liability, or pay legal costs, should it become necessary. We cannot
  7491. afford to be sued. We are assuring you that _we have done our best_;
  7492. if that isn't good enough for you, tough.
  7493. The existing PuTTY licence document already gives you permission
  7494. to use or distribute PuTTY in pretty much any way which does not
  7495. involve pretending you wrote it or suing us if it goes wrong. We
  7496. think that really ought to be enough for anybody.
  7497. See also question A.9.14 for another reason why we don't want to do
  7498. this sort of thing.
  7499. A.9.13 Can you write us a formal notice of permission to use PuTTY?
  7500. We could, in principle, but it isn't clear what use it would be. If
  7501. you think there's a serious chance of one of the PuTTY copyright
  7502. holders suing you (which we don't!), you would presumably want a
  7503. signed notice from _all_ of them; and we couldn't provide that even
  7504. if we wanted to, because many of the copyright holders are people
  7505. who contributed some code in the past and with whom we subsequently
  7506. lost contact. Therefore the best we would be able to do _even
  7507. in theory_ would be to have the core development team sign the
  7508. document, which wouldn't guarantee you that some other copyright
  7509. holder might not sue.
  7510. See also question A.9.14 for another reason why we don't want to do
  7511. this sort of thing.
  7512. A.9.14 Can you sign _anything_ for us?
  7513. Not unless there's an incredibly good reason.
  7514. We are generally unwilling to set a precedent that involves us
  7515. having to enter into individual agreements with PuTTY users.
  7516. We estimate that we have literally _millions_ of users, and we
  7517. absolutely would not have time to go round signing specific
  7518. agreements with every one of them. So if you want us to sign
  7519. something specific for you, you might usefully stop to consider
  7520. whether there's anything special that distinguishes you from 999,999
  7521. other users, and therefore any reason we should be willing to sign
  7522. something for you without it setting such a precedent.
  7523. If your company policy requires you to have an individual agreement
  7524. with the supplier of any software you use, then your company policy
  7525. is simply not well suited to using popular free software, and we
  7526. urge you to consider this as a flaw in your policy.
  7527. A.9.15 If you won't sign anything, can you give us some sort of assurance
  7528. that you won't make PuTTY closed-source in future?
  7529. Yes and no.
  7530. If what you want is an assurance that some _current version_ of
  7531. PuTTY which you've already downloaded will remain free, then you
  7532. already have that assurance: it's called the PuTTY Licence. It
  7533. grants you permission to use, distribute and copy the software to
  7534. which it applies; once we've granted that permission (which we
  7535. have), we can't just revoke it.
  7536. On the other hand, if you want an assurance that _future_ versions
  7537. of PuTTY won't be closed-source, that's more difficult. We could
  7538. in principle sign a document stating that we would never release a
  7539. closed-source PuTTY, but that wouldn't assure you that we _would_
  7540. keep releasing _open_-source PuTTYs: we would still have the option
  7541. of ceasing to develop PuTTY at all, which would surely be even worse
  7542. for you than making it closed-source! (And we almost certainly
  7543. wouldn't _want_ to sign a document guaranteeing that we would
  7544. actually continue to do development work on PuTTY; we certainly
  7545. wouldn't sign it for free. Documents like that are called contracts
  7546. of employment, and are generally not signed except in return for a
  7547. sizeable salary.)
  7548. If we _were_ to stop developing PuTTY, or to decide to make all
  7549. future releases closed-source, then you would still be free to copy
  7550. the last open release in accordance with the current licence, and in
  7551. particular you could start your own fork of the project from that
  7552. release. If this happened, I confidently predict that _somebody_
  7553. would do that, and that some kind of a free PuTTY would continue
  7554. to be developed. There's already precedent for that sort of thing
  7555. happening in free software. We can't guarantee that somebody _other
  7556. than you_ would do it, of course; you might have to do it yourself.
  7557. But we can assure you that there would be nothing _preventing_
  7558. anyone from continuing free development if we stopped.
  7559. (Finally, we can also confidently predict that if we made PuTTY
  7560. closed-source and someone made an open-source fork, most people
  7561. would switch to the latter. Therefore, it would be pretty stupid of
  7562. us to try it.)
  7563. A.9.16 Can you provide us with export control information / FIPS
  7564. certification for PuTTY?
  7565. Some people have asked us for an Export Control Classification
  7566. Number (ECCN) for PuTTY. We don't know whether we have one, and as a
  7567. team of free software developers based in the UK we don't have the
  7568. time, money, or effort to deal with US bureaucracy to investigate
  7569. any further. We believe that PuTTY falls under 5D002 on the US
  7570. Commerce Control List, but that shouldn't be taken as definitive.
  7571. If you need to know more you should seek professional legal advice.
  7572. The same applies to any other country's legal requirements and
  7573. restrictions.
  7574. Similarly, some people have asked us for FIPS certification of the
  7575. PuTTY tools. Unless someone else is prepared to do the necessary
  7576. work and pay any costs, we can't provide this.
  7577. A.9.17 As one of our existing software vendors, can you just fill in this
  7578. questionnaire for us?
  7579. We periodically receive requests like this, from organisations
  7580. which have apparently sent out a form letter to everyone listed in
  7581. their big spreadsheet of `software vendors' requiring them all to
  7582. answer some long list of questions about supported OS versions, paid
  7583. support arrangements, compliance with assorted local regulations
  7584. we haven't heard of, contact phone numbers, and other such
  7585. administrivia. Many of the questions are obviously meaningless when
  7586. applied to PuTTY (we don't provide any paid support in the first
  7587. place!), most of the rest could have been answered with only a very
  7588. quick look at our website, and some we are actively unwilling to
  7589. answer (we are private individuals, why would we want to give out
  7590. our home phone numbers to large corporations?).
  7591. We don't make a habit of responding in full to these questionnaires,
  7592. because _we are not a software vendor_.
  7593. A software _vendor_ is a company to which you are paying lots of
  7594. money in return for some software. They know who you are, and they
  7595. know you're paying them money; so they have an incentive to fill in
  7596. your forms and questionnaires, to research any local regulations you
  7597. cite if they don't already know about them, and generally to provide
  7598. every scrap of information you might possibly need in the most
  7599. convenient manner for you, because they want to keep being paid.
  7600. But we are a team of free software developers, and that means your
  7601. relationship with us is nothing like that at all. If you once
  7602. downloaded our software from our website, that's great and we hope
  7603. you found it useful, but it doesn't mean we have the least idea who
  7604. you are, or any incentive to do lots of unpaid work to support our
  7605. `relationship' with you.
  7606. It's not that we are unwilling to _provide information_. We put as
  7607. much of it as we can on our website for your convenience, and if you
  7608. actually need to know some fact about PuTTY which you haven't been
  7609. able to find on the website (and which is not obviously inapplicable
  7610. to free software in the first place) then please do ask us, and
  7611. we'll try to answer as best we can. But we put up the website and
  7612. this FAQ precisely so that we _don't_ have to keep answering the
  7613. same questions over and over again, so we aren't prepared to fill in
  7614. completely generic form-letter questionnaires for people who haven't
  7615. done their best to find the answers here first.
  7616. If you work for an organisation which you think might be at risk of
  7617. making this mistake, we urge you to reorganise your list of software
  7618. suppliers so that it clearly distinguishes paid vendors who know
  7619. about you from free software developers who don't have any idea who
  7620. you are. Then, only send out these mass mailings to the former.
  7621. A.9.18 The `sha1sums' / `sha256sums' / etc files on your download page
  7622. don't match the binaries.
  7623. People report this every so often, and usually the reason turns out
  7624. to be that they've matched up the wrong checksums file with the
  7625. wrong binaries.
  7626. The PuTTY download page contains more than one version of the
  7627. software. There's a _latest release_ version; there are the
  7628. _development snapshots_; and when we're in the run-up to making a
  7629. release, there are also _pre-release_ builds of the upcoming new
  7630. version. Each one has its own collection of binaries, and its own
  7631. collection of checksums files to go with them.
  7632. So if you've downloaded the release version of the actual program,
  7633. you need the release version of the checksums too, otherwise you
  7634. will see a mismatch. Similarly, the development snapshot binaries go
  7635. with the development snapshot checksums, and so on. (We've colour-
  7636. coded the download page in an effort to reduce this confusion a
  7637. bit.)
  7638. Another thing to watch out for: as of 0.71, executables like
  7639. `putty.exe' come in two flavours for each platform: the standalone
  7640. versions on the website, each of which contains embedded help, and
  7641. the versions installed by the installer, which use a separate help
  7642. file also in the installer. We provide checksums for both; the
  7643. latter are indicated with `(installer version)' after the filename.
  7644. If you have double-checked all that, and you still think there's
  7645. a real mismatch, then please send us a report carefully quoting
  7646. everything relevant:
  7647. - the exact URL you got your binary from
  7648. - the checksum of the binary after you downloaded
  7649. - the exact URL you got your checksums file from
  7650. - the checksum that file says the binary should have.
  7651. A.10 Miscellaneous questions
  7652. A.10.1 Is PuTTY a port of OpenSSH, or based on OpenSSH or OpenSSL?
  7653. No, it isn't. PuTTY is almost completely composed of code written
  7654. from scratch for PuTTY. The only code we share with OpenSSH is the
  7655. detector for SSH-1 CRC compensation attacks, written by CORE SDI
  7656. S.A; we share no code at all with OpenSSL.
  7657. A.10.2 Where can I buy silly putty?
  7658. You're looking at the wrong web site; the only PuTTY we know about
  7659. here is the name of a computer program.
  7660. If you want the kind of putty you can buy as an executive toy, the
  7661. PuTTY team can personally recommend Thinking Putty, which you can
  7662. buy from Crazy Aaron's Putty World, at www.puttyworld.com.
  7663. A.10.3 What does `PuTTY' mean?
  7664. It's the name of a popular SSH and Telnet client. Any other meaning
  7665. is in the eye of the beholder. It's been rumoured that `PuTTY' is
  7666. the antonym of `getty', or that it's the stuff that makes your
  7667. Windows useful, or that it's a kind of plutonium Teletype. We
  7668. couldn't possibly comment on such allegations.
  7669. A.10.4 How do I pronounce `PuTTY'?
  7670. Exactly like the English word `putty', which we pronounce /'pVti/.
  7671. Appendix B: Feedback and bug reporting
  7672. --------------------------------------
  7673. This is a guide to providing feedback to the PuTTY development team.
  7674. It is provided as both a web page on the PuTTY site, and an appendix
  7675. in the PuTTY manual.
  7676. Section B.1 gives some general guidelines for sending any kind of e-
  7677. mail to the development team. Following sections give more specific
  7678. guidelines for particular types of e-mail, such as bug reports and
  7679. feature requests.
  7680. B.1 General guidelines
  7681. The PuTTY development team gets a _lot_ of mail. If you can possibly
  7682. solve your own problem by reading the manual, reading the FAQ,
  7683. reading the web site, asking a fellow user, or some other means,
  7684. then it would make our lives much easier.
  7685. We get so much e-mail that we literally do not have time to answer
  7686. it all. We regret this, but there's nothing we can do about it.
  7687. So if you can _possibly_ avoid sending mail to the PuTTY team, we
  7688. recommend you do so. In particular, support requests (section B.7)
  7689. are probably better sent to some public forum, or passed to a local
  7690. expert if possible.
  7691. The PuTTY contact email address is a private mailing list containing
  7692. four or five core developers. Don't be put off by it being a mailing
  7693. list: if you need to send confidential data as part of a bug report,
  7694. you can trust the people on the list to respect that confidence.
  7695. Also, the archives aren't publicly available, so you shouldn't be
  7696. letting yourself in for any spam by sending us mail.
  7697. Please use a meaningful subject line on your message. We get a lot
  7698. of mail, and it's hard to find the message we're looking for if they
  7699. all have subject lines like `PuTTY bug'.
  7700. B.1.1 Sending large attachments
  7701. Since the PuTTY contact address is a mailing list, e-mails larger
  7702. than 40Kb will be held for inspection by the list administrator, and
  7703. will not be allowed through unless they really appear to be worth
  7704. their large size.
  7705. If you are considering sending any kind of large data file to the
  7706. PuTTY team, it's almost always a bad idea, or at the very least it
  7707. would be better to ask us first whether we actually need the file.
  7708. Alternatively, you could put the file on a web site and just send us
  7709. the URL; that way, we don't have to download it unless we decide we
  7710. actually need it, and only one of us needs to download it instead of
  7711. it being automatically copied to all the developers.
  7712. (If the file contains confidential information, then you could
  7713. encrypt it with our Secure Contact Key; see section F.1 for
  7714. details. Please _only_ use this for information that _needs_ to be
  7715. confidential.)
  7716. Some people like to send mail in MS Word format. Please _don't_
  7717. send us bug reports, or any other mail, as a Word document. Word
  7718. documents are roughly fifty times larger than writing the same
  7719. report in plain text. In addition, most of the PuTTY team read their
  7720. e-mail on Unix machines, so copying the file to a Windows box to run
  7721. Word is very inconvenient. Not only that, but several of us don't
  7722. even _have_ a copy of Word!
  7723. Some people like to send us screen shots when demonstrating a
  7724. problem. Please don't do this without checking with us first
  7725. - we almost never actually need the information in the screen
  7726. shot. Sending a screen shot of an error box is almost certainly
  7727. unnecessary when you could just tell us in plain text what the
  7728. error was. (On some versions of Windows, pressing Ctrl-C when the
  7729. error box is displayed will copy the text of the message to the
  7730. clipboard.) Sending a full-screen shot is _occasionally_ useful, but
  7731. it's probably still wise to check whether we need it before sending
  7732. it.
  7733. If you _must_ mail a screen shot, don't send it as a .BMP file. BMPs
  7734. have no compression and they are _much_ larger than other image
  7735. formats such as PNG, TIFF and GIF. Convert the file to a properly
  7736. compressed image format before sending it.
  7737. Please don't mail us executables, at all. Our mail server blocks all
  7738. incoming e-mail containing executables, as a defence against the
  7739. vast numbers of e-mail viruses we receive every day. If you mail us
  7740. an executable, it will just bounce.
  7741. If you have made a tiny modification to the PuTTY code, please
  7742. send us a _patch_ to the source code if possible, rather than
  7743. sending us a huge .ZIP file containing the complete sources plus
  7744. your modification. If you've only changed 10 lines, we'd prefer to
  7745. receive a mail that's 30 lines long than one containing multiple
  7746. megabytes of data we already have.
  7747. B.2 Reporting bugs
  7748. If you think you have found a bug in PuTTY, your first steps should
  7749. be:
  7750. - Check the Wishlist page on the PuTTY website, and see if we
  7751. already know about the problem. If we do, it is almost certainly
  7752. not necessary to mail us about it, unless you think you have
  7753. extra information that might be helpful to us in fixing it. (Of
  7754. course, if we actually _need_ specific extra information about a
  7755. particular bug, the Wishlist page will say so.)
  7756. - Check the Change Log on the PuTTY website, and see if we have
  7757. already fixed the bug in the development snapshots.
  7758. - Check the FAQ on the PuTTY website (also provided as appendix
  7759. A in the manual), and see if it answers your question. The FAQ
  7760. lists the most common things which people think are bugs, but
  7761. which aren't bugs.
  7762. - Download the latest development snapshot and see if the problem
  7763. still happens with that. This really is worth doing. As a
  7764. general rule we aren't very interested in bugs that appear in
  7765. the release version but not in the development version, because
  7766. that usually means they are bugs we have _already fixed_. On the
  7767. other hand, if you can find a bug in the development version
  7768. that doesn't appear in the release, that's likely to be a new
  7769. bug we've introduced since the release and we're definitely
  7770. interested in it.
  7771. If none of those options solved your problem, and you still need
  7772. to report a bug to us, it is useful if you include some general
  7773. information:
  7774. - Tell us what version of PuTTY you are running. To find this
  7775. out, use the `About PuTTY' option from the System menu. Please
  7776. _do not_ just tell us `I'm running the latest version'; e-mail
  7777. can be delayed and it may not be obvious which version was the
  7778. latest at the time you sent the message.
  7779. - PuTTY is a multi-platform application; tell us what version of
  7780. what OS you are running PuTTY on. (If you're running on Unix,
  7781. or Windows for Arm, tell us, or we'll assume you're running on
  7782. Windows for Intel as this is overwhelmingly the case.)
  7783. - Tell us what protocol you are connecting with: SSH, Telnet,
  7784. Rlogin, SUPDUP, or Raw mode, or a serial connection.
  7785. - Tell us what kind of server you are connecting to; what OS, and
  7786. if possible what SSH server (if you're using SSH). You can get
  7787. some of this information from the PuTTY Event Log (see section
  7788. 3.1.3.1 in the manual).
  7789. - Send us the contents of the PuTTY Event Log, unless you have a
  7790. specific reason not to (for example, if it contains confidential
  7791. information that you think we should be able to solve your
  7792. problem without needing to know).
  7793. - Try to give us as much information as you can to help us see
  7794. the problem for ourselves. If possible, give us a step-by-step
  7795. sequence of _precise_ instructions for reproducing the fault.
  7796. - Don't just tell us that PuTTY `does the wrong thing'; tell us
  7797. exactly and precisely what it did, and also tell us exactly
  7798. and precisely what you think it should have done instead. Some
  7799. people tell us PuTTY does the wrong thing, and it turns out that
  7800. it was doing the right thing and their expectations were wrong.
  7801. Help to avoid this problem by telling us exactly what you think
  7802. it should have done, and exactly what it did do.
  7803. - If you think you can, you're welcome to try to fix the
  7804. problem yourself. A patch to the code which fixes a bug is an
  7805. excellent addition to a bug report. However, a patch is never a
  7806. _substitute_ for a good bug report; if your patch is wrong or
  7807. inappropriate, and you haven't supplied us with full information
  7808. about the actual bug, then we won't be able to find a better
  7809. solution.
  7810. - https://www.chiark.greenend.org.uk/~sgtatham/bugs.html is an
  7811. article on how to report bugs effectively in general. If your
  7812. bug report is _particularly_ unclear, we may ask you to go away,
  7813. read this article, and then report the bug again.
  7814. It is reasonable to report bugs in PuTTY's documentation, if you
  7815. think the documentation is unclear or unhelpful. But we do need
  7816. to be given exact details of _what_ you think the documentation
  7817. has failed to tell you, or _how_ you think it could be made
  7818. clearer. If your problem is simply that you don't _understand_
  7819. the documentation, we suggest asking around and seeing if someone
  7820. will explain what you need to know. _Then_, if you think the
  7821. documentation could usefully have told you that, send us a bug
  7822. report and explain how you think we should change it.
  7823. B.3 Reporting security vulnerabilities
  7824. If you've found a security vulnerability in PuTTY, you might well
  7825. want to notify us using an encrypted communications channel, to
  7826. avoid disclosing information about the vulnerability before a fixed
  7827. release is available.
  7828. For this purpose, we provide a GPG key suitable for encryption: the
  7829. Secure Contact Key. See section F.1 for details of this.
  7830. (Of course, vulnerabilities are also bugs, so please do include as
  7831. much information as possible about them, the same way you would with
  7832. any other bug report.)
  7833. B.4 Requesting extra features
  7834. If you want to request a new feature in PuTTY, the very first things
  7835. you should do are:
  7836. - Check the Wishlist page on the PuTTY website, and see if your
  7837. feature is already on the list. If it is, it probably won't
  7838. achieve very much to repeat the request. (But see section B.5 if
  7839. you want to persuade us to give your particular feature higher
  7840. priority.)
  7841. - Check the Wishlist and Change Log on the PuTTY website, and
  7842. see if we have already added your feature in the development
  7843. snapshots. If it isn't clear, download the latest development
  7844. snapshot and see if the feature is present. If it is, then it
  7845. will also be in the next release and there is no need to mail us
  7846. at all.
  7847. If you can't find your feature in either the development snapshots
  7848. _or_ the Wishlist, then you probably do need to submit a feature
  7849. request. Since the PuTTY authors are very busy, it helps if you try
  7850. to do some of the work for us:
  7851. - Do as much of the design as you can. Think about `corner cases';
  7852. think about how your feature interacts with other existing
  7853. features. Think about the user interface; if you can't come
  7854. up with a simple and intuitive interface to your feature, you
  7855. shouldn't be surprised if we can't either. Always imagine
  7856. whether it's possible for there to be more than one, or less
  7857. than one, of something you'd assumed there would be one of.
  7858. (For example, if you were to want PuTTY to put an icon in the
  7859. System tray rather than the Taskbar, you should think about what
  7860. happens if there's more than one PuTTY active; how would the
  7861. user tell which was which?)
  7862. - If you can program, it may be worth offering to write the
  7863. feature yourself and send us a patch. However, it is likely to
  7864. be helpful if you confer with us first; there may be design
  7865. issues you haven't thought of, or we may be about to make big
  7866. changes to the code which your patch would clash with, or
  7867. something. If you check with the maintainers first, there is a
  7868. better chance of your code actually being usable. Also, read the
  7869. design principles listed in appendix E: if you do not conform to
  7870. them, we will probably not be able to accept your patch.
  7871. B.5 Requesting features that have already been requested
  7872. If a feature is already listed on the Wishlist, then it usually
  7873. means we would like to add it to PuTTY at some point. However, this
  7874. may not be in the near future. If there's a feature on the Wishlist
  7875. which you would like to see in the _near_ future, there are several
  7876. things you can do to try to increase its priority level:
  7877. - Mail us and vote for it. (Be sure to mention that you've seen
  7878. it on the Wishlist, or we might think you haven't even _read_
  7879. the Wishlist). This probably won't have very _much_ effect; if
  7880. a huge number of people vote for something then it may make a
  7881. difference, but one or two extra votes for a particular feature
  7882. are unlikely to change our priority list immediately. Offering a
  7883. new and compelling justification might help. Also, don't expect
  7884. a reply.
  7885. - Offer us money if we do the work sooner rather than later. This
  7886. sometimes works, but not always. The PuTTY team all have full-
  7887. time jobs and we're doing all of this work in our free time; we
  7888. may sometimes be willing to give up some more of our free time
  7889. in exchange for some money, but if you try to bribe us for a
  7890. _big_ feature it's entirely possible that we simply won't have
  7891. the time to spare - whether you pay us or not. (Also, we don't
  7892. accept bribes to add _bad_ features to the Wishlist, because
  7893. our desire to provide high-quality software to the users comes
  7894. first.)
  7895. - Offer to help us write the code. This is probably the _only_ way
  7896. to get a feature implemented quickly, if it's a big one that we
  7897. don't have time to do ourselves.
  7898. B.6 Workarounds for SSH server bugs
  7899. It's normal for SSH implementations to automatically enable
  7900. workarounds for each other's bugs, using the software version
  7901. strings that are exchanged at the start of the connection. Typically
  7902. an SSH client will have a list of server version strings that it
  7903. believes to have particular bugs, and auto-enable the appropriate
  7904. set of workarounds when it sees one of those strings. (And servers
  7905. will have a similar list of workarounds for _client_ software they
  7906. believe to be buggy.)
  7907. If you've found a bug in an SSH server, and you'd like us to add
  7908. an auto-detected workaround for it, our policy is that *the server
  7909. implementor should fix it first*.
  7910. If the server implementor has fixed it in the latest version, and
  7911. can give us a complete description of the version strings that go
  7912. with the bug, then we're happy to use those version strings as a
  7913. trigger to automatically enable our workaround (assuming one is
  7914. possible). We _won't_ accept requests to auto-enable workarounds
  7915. for an open-ended set of version strings, such as `any version of
  7916. FooServer, including future ones not yet released'.
  7917. The aim of this policy is to encourage implementors to gradually
  7918. converge on the actual standardised SSH protocol. If we enable
  7919. people to continue violating the spec, by installing open-ended
  7920. workarounds in PuTTY for bugs they're never going to fix, then we're
  7921. contributing to an ecosystem in which everyone carries on having
  7922. bugs and everyone else carries on having to work around them.
  7923. An exception: if an SSH server is no longer maintained _at all_
  7924. (e.g. the company that produced it has gone out of business), and
  7925. every version of it that was ever released has a bug, then that's
  7926. one situation in which we may be prepared to add a workaround rule
  7927. that matches all versions of that software. (The aim is to stop
  7928. implementors from continuing to release software with the bug - and
  7929. if they're not releasing it _at all_ any more, then that's already
  7930. done!)
  7931. We do recognise that sometimes it will be difficult to get the
  7932. server maintainer to fix a bug, or even to answer support requests
  7933. at all. Or it might take them a very long time to get round to doing
  7934. anything about it. We're not completely unwilling to compromise:
  7935. we're prepared to add _manually enabled_ workarounds to PuTTY even
  7936. for bugs that an implementation hasn't fixed yet. We just won't
  7937. _automatically_ enable the workaround unless the server maintainer
  7938. has also done their part.
  7939. B.7 Support requests
  7940. If you're trying to make PuTTY do something for you and it isn't
  7941. working, but you're not sure whether it's a bug or not, then
  7942. _please_ consider looking for help somewhere else. This is one of
  7943. the most common types of mail the PuTTY team receives, and we simply
  7944. don't have time to answer all the questions. Questions of this type
  7945. include:
  7946. - If you want to do something with PuTTY but have no idea where to
  7947. start, and reading the manual hasn't helped, try posting to a
  7948. public forum and see if someone can explain it to you.
  7949. - If you have tried to do something with PuTTY but it hasn't
  7950. worked, and you aren't sure whether it's a bug in PuTTY or a bug
  7951. in your SSH server or simply that you're not doing it right,
  7952. then try posting to some public forum and see if someone can
  7953. solve your problem. Or try doing the same thing with a different
  7954. SSH client and see if it works with that. Please do not report
  7955. it as a PuTTY bug unless you are really sure it _is_ a bug in
  7956. PuTTY.
  7957. - If someone else installed PuTTY for you, or you're using PuTTY
  7958. on someone else's computer, try asking them for help first.
  7959. They're more likely to understand how they installed it and what
  7960. they expected you to use it for than we are.
  7961. - If you have successfully made a connection to your server and
  7962. now need to know what to type at the server's command prompt,
  7963. or other details of how to use the server-end software, talk to
  7964. your server's system administrator. This is not the PuTTY team's
  7965. problem. PuTTY is only a communications tool, like a telephone;
  7966. if you can't speak the same language as the person at the other
  7967. end of the phone, it isn't the telephone company's job to teach
  7968. it to you.
  7969. If you absolutely cannot get a support question answered any other
  7970. way, you can try mailing it to us, but we can't guarantee to have
  7971. time to answer it.
  7972. B.8 Web server administration
  7973. If the PuTTY web site is down (Connection Timed Out), please don't
  7974. bother mailing us to tell us about it. Most of us read our e-mail on
  7975. the same machines that host the web site, so if those machines are
  7976. down then we will notice _before_ we read our e-mail. So there's no
  7977. point telling us our servers are down.
  7978. Of course, if the web site has some other error (Connection Refused,
  7979. 404 Not Found, 403 Forbidden, or something else) then we might _not_
  7980. have noticed and it might still be worth telling us about it.
  7981. If you want to report a problem with our web site, check that you're
  7982. looking at our _real_ web site and not a mirror. The real web site
  7983. is at `https://www.chiark.greenend.org.uk/~sgtatham/putty/'; if
  7984. that's not where you're reading this, then don't report the problem
  7985. to us until you've checked that it's really a problem with the
  7986. main site. If it's only a problem with the mirror, you should try
  7987. to contact the administrator of that mirror site first, and only
  7988. contact us if that doesn't solve the problem (in case we need to
  7989. remove the mirror from our list).
  7990. B.9 Asking permission for things
  7991. PuTTY is distributed under the MIT Licence (see appendix D for
  7992. details). This means you can do almost _anything_ you like with our
  7993. software, our source code, and our documentation. The only things
  7994. you aren't allowed to do are to remove our copyright notices or the
  7995. licence text itself, or to hold us legally responsible if something
  7996. goes wrong.
  7997. So if you want permission to include PuTTY on a magazine cover disk,
  7998. or as part of a collection of useful software on a CD or a web site,
  7999. then _permission is already granted_. You don't have to mail us and
  8000. ask. Just go ahead and do it. We don't mind.
  8001. (If you want to distribute PuTTY alongside your own application for
  8002. use with that application, or if you want to distribute PuTTY within
  8003. your own organisation, then we recommend, but do not insist, that
  8004. you offer your own first-line technical support, to answer questions
  8005. about the interaction of PuTTY with your environment. If your users
  8006. mail us directly, we won't be able to tell them anything useful
  8007. about your specific setup.)
  8008. If you want to use parts of the PuTTY source code in another
  8009. program, then it might be worth mailing us to talk about technical
  8010. details, but if all you want is to ask permission then you don't
  8011. need to bother. You already have permission.
  8012. If you just want to link to our web site, just go ahead. (It's not
  8013. clear that we _could_ stop you doing this, even if we wanted to!)
  8014. B.10 Mirroring the PuTTY web site
  8015. If you want to set up a mirror of the PuTTY website, go ahead and
  8016. set one up. Please don't bother asking us for permission before
  8017. setting up a mirror. You already have permission.
  8018. If the mirror is in a country where we don't already have plenty
  8019. of mirrors, we may be willing to add it to the list on our mirrors
  8020. page. Read the guidelines on that page, make sure your mirror works,
  8021. and email us the information listed at the bottom of the page.
  8022. Note that we do not _promise_ to list your mirror: we get a lot of
  8023. mirror notifications and yours may not happen to find its way to the
  8024. top of the list.
  8025. Also note that we link to all our mirror sites using the
  8026. `rel="nofollow"' attribute. Running a PuTTY mirror is not intended
  8027. to be a cheap way to gain search rankings.
  8028. If you have technical questions about the process of mirroring, then
  8029. you might want to mail us before setting up the mirror (see also the
  8030. guidelines on the Mirrors page); but if you just want to ask for
  8031. permission, you don't need to. You already have permission.
  8032. B.11 Praise and compliments
  8033. One of the most rewarding things about maintaining free software
  8034. is getting e-mails that just say `thanks'. We are always happy to
  8035. receive e-mails of this type.
  8036. Regrettably we don't have time to answer them all in person. If you
  8037. mail us a compliment and don't receive a reply, _please_ don't think
  8038. we've ignored you. We did receive it and we were happy about it; we
  8039. just didn't have time to tell you so personally.
  8040. To everyone who's ever sent us praise and compliments, in the past
  8041. and the future: _you're welcome_!
  8042. B.12 E-mail address
  8043. The actual address to mail is <[email protected]>.
  8044. Appendix C: PPK file format
  8045. ---------------------------
  8046. This appendix documents the file format used by PuTTY to store
  8047. private keys.
  8048. In this appendix, binary data structures are described using data
  8049. type representations such as `uint32', `string' and `mpint' as
  8050. used in the SSH protocol standards themselves. These are defined
  8051. authoritatively by RFC 4251 section 5, `Data Type Representations
  8052. Used in the SSH Protocols'.
  8053. C.1 Overview
  8054. A PPK file stores a private key, and the corresponding public key.
  8055. Both are contained in the same file.
  8056. The file format can be completely unencrypted, or it can encrypt
  8057. the private key. The _public_ key is stored in cleartext in both
  8058. cases. (This enables PuTTY to send the public key to an SSH server
  8059. to see whether it will accept it, and not bother prompting for the
  8060. passphrase unless the server says yes.)
  8061. When the key file is encrypted, the encryption key is derived from a
  8062. passphrase. An encrypted PPK file is also tamper-proofed using a MAC
  8063. (authentication code), also derived from the same passphrase. The
  8064. MAC protects the encrypted private key data, but it also covers the
  8065. cleartext parts of the file. So you can't edit the public half of
  8066. the key without invalidating the MAC and causing the key file as a
  8067. whole to become useless.
  8068. This MAC protects the key file against active cryptographic attacks
  8069. in which the public half of a key pair is modified in a controlled
  8070. way that allows an attacker to deduce information about the private
  8071. half from the resulting corrupted signatures. Any attempt to do
  8072. that to a PPK file should be reliably caught by the MAC failing to
  8073. validate.
  8074. (Such an attack would only be useful if the key file was stored in a
  8075. location where the attacker could modify it without also having full
  8076. access to the process that you type passphrases into. But that's not
  8077. impossible; for example, if your home directory was on a network
  8078. file server, then the file server's administrator could access the
  8079. key file but not processes on the client machine.)
  8080. The MAC also covers the _comment_ on the key. This stops an attacker
  8081. from swapping keys with each other and editing the comments to
  8082. disguise the fact. As a consequence, PuTTYgen cannot edit the
  8083. comment on a key unless you decrypt the key with your passphrase
  8084. first.
  8085. (The circumstances in which _that_ attack would be useful are even
  8086. more restricted. One example might be that the different keys
  8087. trigger specific actions on the server you're connecting to and one
  8088. of those actions is more useful to the attacker than the other. But
  8089. once you have a MAC at all, it's no extra effort to make it cover as
  8090. much as possible, and usually sensible.)
  8091. C.2 Outer layer
  8092. The outer layer of a PPK file is text-based. The PuTTY tools will
  8093. always use LF line termination when writing PPK files, but will
  8094. tolerate CR+LF and CR-only on input.
  8095. The first few lines identify it as a PPK, and give some initial data
  8096. about what's stored in it and how. They look like this:
  8097. PuTTY-User-Key-File-version: algorithm-name
  8098. Encryption: encryption-type
  8099. Comment: key-comment-string
  8100. *version* is a decimal number giving the version number of the file
  8101. format itself. The current file format version is 3.
  8102. *algorithm-name* is the SSH protocol identifier for the public key
  8103. algorithm that this key is used for (such as `ssh-dss' or `ecdsa-
  8104. sha2-nistp384').
  8105. *encryption-type* indicates whether this key is stored encrypted,
  8106. and if so, by what method. Currently the only supported encryption
  8107. types are `aes256-cbc' and `none'.
  8108. *key-comment-string* is a free text field giving the comment. This
  8109. can contain any byte values other than 13 and 10 (CR and LF).
  8110. The next part of the file gives the public key. This is stored
  8111. unencrypted but base64-encoded (RFC 4648), and is preceded by a
  8112. header line saying how many lines of base64 data are shown, looking
  8113. like this:
  8114. Public-Lines: number-of-lines
  8115. that many lines of base64 data
  8116. The base64-encoded data in this blob is formatted in exactly the
  8117. same way as an SSH public key sent over the wire in the SSH protocol
  8118. itself. That is also the same format as the base64 data stored in
  8119. OpenSSH's `authorized_keys' file, except that in a PPK file the
  8120. base64 data is split across multiple lines. But if you remove the
  8121. newlines from the middle of this section, the resulting base64 blob
  8122. is in the right format to go in an `authorized_keys' line.
  8123. If the key is encrypted (i.e. *encryption-type* is not `none'),
  8124. then the next thing that appears is a sequence of lines specifying
  8125. how the keys for encrypting the file are to be derived from the
  8126. passphrase:
  8127. Key-Derivation: argon2-flavour
  8128. Argon2-Memory: decimal-integer
  8129. Argon2-Passes: decimal-integer
  8130. Argon2-Parallelism: decimal-integer
  8131. Argon2-Salt: hex-string
  8132. *argon2-flavour* is one of the identifiers `Argon2d', `Argon2i' or
  8133. `Argon2id', all describing variants of the Argon2 password-hashing
  8134. function.
  8135. The three integer values are used as parameters for Argon2, which
  8136. allows you to configure the amount of memory used (in Kbyte), the
  8137. number of passes of the algorithm to run (to tune its running time),
  8138. and the degree of parallelism required by the hash function. The
  8139. salt is decoded into a sequence of binary bytes and used as an
  8140. additional input to Argon2. (It is chosen randomly when the key file
  8141. is written, so that a guessing attack can't be mounted in parallel
  8142. against multiple key files.)
  8143. The next part of the file gives the private key. This is base64-
  8144. encoded in the same way:
  8145. Private-Lines: number-of-lines
  8146. that many lines of base64 data
  8147. The binary data represented in this base64 blob may be encrypted,
  8148. depending on the _encryption-type_ field in the key file header
  8149. shown above:
  8150. - If *encryption-type* is `none', then this data is stored in
  8151. plain text.
  8152. - If *encryption-type* is `aes256-cbc', then this data is
  8153. encrypted using AES, with a 256-bit key length, in the CBC
  8154. cipher mode. The key and initialisation vector are derived from
  8155. the passphrase: see section C.4.
  8156. In order to encrypt the private key data with AES, it must be
  8157. a multiple of 16 bytes (the AES cipher block length). This
  8158. is achieved by appending random padding to the data before
  8159. encrypting it. When decoding it after decryption, the random
  8160. data can be ignored: the internal structure of the data is
  8161. enough to tell you when you've reached the end of the meaningful
  8162. part.
  8163. Unlike public keys, the binary encoding of private keys is not
  8164. specified at all in the SSH standards. See section C.3 for details
  8165. of the private key format for each key type supported by PuTTY.
  8166. The final thing in the key file is the MAC:
  8167. Private-MAC: hex-mac-data
  8168. *hex-mac-data* is a hexadecimal-encoded value, 64 digits long (i.e.
  8169. 32 bytes), generated using the HMAC-SHA-256 algorithm with the
  8170. following binary data as input:
  8171. - string: the *algorithm-name* header field.
  8172. - string: the *encryption-type* header field.
  8173. - string: the *key-comment-string* header field.
  8174. - string: the binary public key data, as decoded from the base64
  8175. lines after the `Public-Lines' header.
  8176. - string: the plaintext of the binary private key data, as decoded
  8177. from the base64 lines after the `Private-Lines' header. If that
  8178. data was stored encrypted, then the decrypted version of it
  8179. is used in this MAC preimage, _including_ the random padding
  8180. mentioned above.
  8181. The MAC key is derived from the passphrase: see section C.4.
  8182. C.3 Private key encodings
  8183. This section describes the private key format for each key type
  8184. supported by PuTTY.
  8185. Because the PPK format also contains the public key (and both public
  8186. and private key are protected by the same MAC to ensure they can't
  8187. be made inconsistent), there is no need for the private key section
  8188. of the file to repeat data from the public section. So some of these
  8189. formats are very short.
  8190. In all cases, a decoding application can begin reading from the
  8191. start of the decrypted private key data, and know when it has read
  8192. all that it needs. This allows random padding after the meaningful
  8193. data to be safely ignored.
  8194. C.3.1 RSA
  8195. RSA keys are stored using an *algorithm-name* of `ssh-rsa'. (Keys
  8196. stored like this are also used by the updated RSA signature schemes
  8197. that use hashes other than SHA-1.)
  8198. The public key data has already provided the key modulus and the
  8199. public encoding exponent. The private data stores:
  8200. - mpint: the private decoding exponent of the key.
  8201. - mpint: one prime factor _p_ of the key.
  8202. - mpint: the other prime factor _q_ of the key. (RSA keys stored
  8203. in this format are expected to have exactly two prime factors.)
  8204. - mpint: the multiplicative inverse of _q_ modulo _p_.
  8205. C.3.2 DSA
  8206. DSA keys are stored using an *algorithm-name* of `ssh-dss'.
  8207. The public key data has already provided the key parameters (the
  8208. large prime _p_, the small prime _q_ and the group generator _g_),
  8209. and the public key _y_. The private key stores:
  8210. - mpint: the private key _x_, which is the discrete logarithm of
  8211. _y_ in the group generated by _g_ mod _p_.
  8212. C.3.3 NIST elliptic-curve keys
  8213. NIST elliptic-curve keys are stored using one of the following
  8214. *algorithm-name* values, each corresponding to a different elliptic
  8215. curve and key size:
  8216. - `ecdsa-sha2-nistp256'
  8217. - `ecdsa-sha2-nistp384'
  8218. - `ecdsa-sha2-nistp521'
  8219. The public key data has already provided the public elliptic curve
  8220. point. The private key stores:
  8221. - mpint: the private exponent, which is the discrete log of the
  8222. public point.
  8223. C.3.4 EdDSA elliptic-curve keys (Ed25519 and Ed448)
  8224. EdDSA elliptic-curve keys are stored using one of the following
  8225. *algorithm-name* values, each corresponding to a different elliptic
  8226. curve and key size:
  8227. - `ssh-ed25519'
  8228. - `ssh-ed448'
  8229. The public key data has already provided the public elliptic curve
  8230. point. The private key stores:
  8231. - mpint: the private exponent, which is the discrete log of the
  8232. public point.
  8233. C.4 Key derivation
  8234. When a key file is encrypted, there are three pieces of key material
  8235. that need to be computed from the passphrase:
  8236. - the key for the symmetric cipher used to encrypt the private key
  8237. - the initialisation vector for that cipher encryption
  8238. - the key for the MAC.
  8239. If *encryption-type* is `aes256-cbc', then the symmetric cipher key
  8240. is 32 bytes long, and the initialisation vector is 16 bytes (one
  8241. cipher block). The length of the MAC key is also chosen to be 32
  8242. bytes.
  8243. If *encryption-type* is `none', then all three of these pieces of
  8244. data have zero length. (The MAC is still generated and checked in
  8245. the key file format, but it has a zero-length key.)
  8246. If the amount of key material required is not zero, then the
  8247. passphrase is fed to the Argon2 key derivation function, in
  8248. whichever mode is described in the `Key-Derivation' header in
  8249. the key file, with parameters derived from the various `Argon2-
  8250. _Parameter_:' headers.
  8251. (If the key is unencrypted, then all those headers are omitted, and
  8252. Argon2 is not run at all.)
  8253. Argon2 takes two extra string inputs in addition to the passphrase
  8254. and the salt: a secret key, and some `associated data'. In PPK's use
  8255. of Argon2, these are both set to the empty string.
  8256. The `tag length' parameter to Argon2 (i.e. the amount of data it
  8257. is asked to output) is set to the sum of the lengths of all of the
  8258. data items required, i.e. (cipher key length + IV length + MAC key
  8259. length). The output data is interpreted as the concatenation of the
  8260. cipher key, the IV and the MAC key, in that order.
  8261. So, for `aes256-cbc', the tag length will be 32+16+32 = 80 bytes; of
  8262. the 80 bytes of output data, the first 32 bytes are used as the 256-
  8263. bit AES key, the next 16 as the CBC IV, and the final 32 bytes as
  8264. the HMAC-SHA-256 key.
  8265. C.5 Older versions of the PPK format
  8266. C.5.1 Version 2
  8267. PPK version 2 was used by PuTTY 0.52 to 0.74 inclusive.
  8268. In PPK version 2, the MAC algorithm used was HMAC-SHA-1 (so the
  8269. Private-MAC line contained only 40 hex digits).
  8270. The `Key-Derivation:' header and all the `Argon2-_Parameter_:'
  8271. headers were absent. Instead of using Argon2, the key material for
  8272. encrypting the private blob was derived from the passphrase in a
  8273. totally different way, as follows.
  8274. The cipher key for `aes256-cbc' was constructed by generating two
  8275. SHA-1 hashes, concatenating them, and taking the first 32 bytes of
  8276. the result. (So you'd get all 20 bytes of the first hash output, and
  8277. the first 12 of the second). Each hash preimage was as follows:
  8278. - uint32: a sequence number. This is 0 in the first hash, and 1 in
  8279. the second. (The idea was to extend this mechanism to further
  8280. hashes by continuing to increment the sequence number, if future
  8281. changes required even longer keys.)
  8282. - the passphrase, without any prefix length field.
  8283. In PPK v2, the CBC initialisation vector was all zeroes.
  8284. The MAC key was 20 bytes long, and was a single SHA-1 hash of the
  8285. following data:
  8286. - the fixed string `putty-private-key-file-mac-key', without any
  8287. prefix length field.
  8288. - the passphrase, without any prefix length field. (If the key is
  8289. stored unencrypted, the passphrase was taken to be the empty
  8290. string for these purposes.)
  8291. C.5.2 Version 1
  8292. PPK version 1 was a badly designed format, only used during initial
  8293. development, and not recommended for production use.
  8294. PPK version 1 was never used by a released version of PuTTY. It was
  8295. only emitted by some early development snapshots between version
  8296. 0.51 (which did not support SSH-2 public keys at all) and 0.52
  8297. (which already used version 2 of this file format). I _hope_ there
  8298. are no PPK v1 files in use anywhere. But just in case, the old badly
  8299. designed format is documented here anyway.
  8300. In PPK version 1, the input to the MAC does not include any of the
  8301. header fields or the public key. It is simply the private key data
  8302. (still in plaintext and including random padding), all by itself
  8303. (without a wrapping string).
  8304. PPK version 1 keys must therefore be rigorously validated after
  8305. loading, to ensure that the public and private parts of the key were
  8306. consistent with each other.
  8307. PPK version 1 only supported the RSA and DSA key types. For RSA,
  8308. this validation can be done using only the provided data (since the
  8309. private key blob contains enough information to reconstruct the
  8310. public values anyway). But for DSA, that isn't quite enough.
  8311. Hence, PPK version 1 DSA keys extended the private data so that
  8312. immediately after _x_ was stored an extra value:
  8313. - string: a SHA-1 hash of the public key data, whose preimage
  8314. consists of
  8315. - string: the large prime _p_
  8316. - string: the small prime _q_
  8317. - string: the group generator _g_
  8318. The idea was that checking this hash would verify that the key
  8319. parameters had not been tampered with, and then the loading
  8320. application could directly verify that _g_^_x_ = _y_.
  8321. In an _unencrypted_ version 1 key file, the MAC is replaced by a
  8322. plain SHA-1 hash of the private key data. This is indicated by the
  8323. `Private-MAC:' header being replaced with `Private-Hash:' instead.
  8324. Appendix D: PuTTY Licence
  8325. -------------------------
  8326. PuTTY is copyright 1997-2025 Simon Tatham.
  8327. Portions copyright Robert de Bath, Joris van Rantwijk, Delian
  8328. Delchev, Andreas Schultz, Jeroen Massar, Wez Furlong, Nicolas Barry,
  8329. Justin Bradford, Ben Harris, Malcolm Smith, Ahmad Khalifa, Markus
  8330. Kuhn, Colin Watson, Christopher Staite, Lorenz Diener, Christian
  8331. Brabandt, Jeff Smith, Pavel Kryukov, Maxim Kuznetsov, Svyatoslav
  8332. Kuzmich, Nico Williams, Viktor Dukhovni, Josh Dersch, Lars
  8333. Brinkhoff, and CORE SDI S.A.
  8334. Permission is hereby granted, free of charge, to any person
  8335. obtaining a copy of this software and associated documentation files
  8336. (the `Software'), to deal in the Software without restriction,
  8337. including without limitation the rights to use, copy, modify, merge,
  8338. publish, distribute, sublicense, and/or sell copies of the Software,
  8339. and to permit persons to whom the Software is furnished to do so,
  8340. subject to the following conditions:
  8341. The above copyright notice and this permission notice shall be
  8342. included in all copies or substantial portions of the Software.
  8343. THE SOFTWARE IS PROVIDED `AS IS', WITHOUT WARRANTY OF ANY KIND,
  8344. EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
  8345. OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  8346. NONINFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE
  8347. FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
  8348. CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
  8349. WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  8350. Appendix E: PuTTY hacking guide
  8351. -------------------------------
  8352. This appendix lists a selection of the design principles applying
  8353. to the PuTTY source code. If you are planning to send code
  8354. contributions, you should read this first.
  8355. E.1 Cross-OS portability
  8356. Despite Windows being its main area of fame, PuTTY is no longer a
  8357. Windows-only application suite. It has a working Unix port; a Mac
  8358. port is in progress; more ports may or may not happen at a later
  8359. date.
  8360. Therefore, embedding Windows-specific code in core modules such as
  8361. ssh.c is not acceptable. We went to great lengths to _remove_ all
  8362. the Windows-specific stuff from our core modules, and to shift it
  8363. out into Windows-specific modules. Adding large amounts of Windows-
  8364. specific stuff in parts of the code that should be portable is
  8365. almost guaranteed to make us reject a contribution.
  8366. The PuTTY source base is divided into platform-specific modules
  8367. and platform-generic modules. The Unix-specific modules are all in
  8368. the `unix' subdirectory; the Windows-specific modules are in the
  8369. `windows' subdirectory.
  8370. All the modules in the main source directory and other
  8371. subdirectories - notably _all_ of the code for the various back ends
  8372. - are platform-generic. We want to keep them that way.
  8373. This also means you should stick to the C semantics guaranteed by
  8374. the C standard: try not to make assumptions about the precise size
  8375. of basic types such as `int' and `long int'; don't use pointer casts
  8376. to do endianness-dependent operations, and so on.
  8377. (Even _within_ a platform front end you should still be careful of
  8378. some of these portability issues. The Windows front end compiles on
  8379. both 32- and 64-bit x86 and also Arm.)
  8380. Our current choice of C standards version is _mostly_ C99. With a
  8381. couple of exceptions, you can assume that C99 features are available
  8382. (in particular <stdint.h>, <stdbool.h> and `inline'), but you
  8383. shouldn't use things that are new in C11 (such as <uchar.h> or
  8384. _Generic).
  8385. The exceptions to that rule are due to the need for Visual Studio
  8386. compatibility:
  8387. - Don't use variable-length arrays. Visual Studio doesn't support
  8388. them even now that it's adopted the rest of C99. We use -Wvla
  8389. when building with gcc and clang, to make it easier to avoid
  8390. accidentally breaking that rule.
  8391. - For historical reasons, we still build with one older VS version
  8392. which lacks <inttypes.h>. So that file is included centrally
  8393. in `defs.h', and has a set of workaround definitions for the
  8394. PRIx64-type macros we use. If you need to use another one
  8395. of those macros, you need to add a workaround definition in
  8396. `defs.h', and don't casually re-include <inttypes.h> anywhere
  8397. else in the source file.
  8398. Here are a few portability assumptions that we _do_ currently allow
  8399. (because we'd already have to thoroughly vet the existing code if
  8400. they ever needed to change, and it doesn't seem worth doing that
  8401. unless we really have to):
  8402. - You can assume `int' is _at least_ 32 bits wide. (We've never
  8403. tried to port PuTTY to a platform with 16-bit int, and it
  8404. doesn't look likely to be necessary in future.)
  8405. - Similarly, you can assume `char' is exactly 8 bits. (Exceptions
  8406. to that are even less likely to be relevant to us than short
  8407. int.)
  8408. - You can assume that using `memset' to write zero bytes over a
  8409. whole structure will have the effect of setting all its pointer
  8410. fields to NULL. (The standard itself guarantees this for
  8411. _integer_ fields, but not for pointers.)
  8412. - You can assume that `time_t' has POSIX semantics, i.e. that
  8413. it represents an integer number of non-leap seconds since
  8414. 1970-01-01 00:00:00 UTC. (Times in this format are used in
  8415. X authorisation, but we could work around that by carefully
  8416. distinguishing local `time_t' from time values used in the wire
  8417. protocol; but these semantics of `time_t' are also baked into
  8418. the shared library API used by the GSSAPI authentication code,
  8419. which would be much harder to change.)
  8420. - You can assume that the execution character encoding is a
  8421. superset of the printable characters of ASCII. (In particular,
  8422. it's fine to do arithmetic on a `char' value representing a
  8423. Latin alphabetic character, without bothering to allow for
  8424. EBCDIC or other non-consecutive encodings of the alphabet.)
  8425. On the other hand, here are some particular things _not_ to assume:
  8426. - Don't assume anything about the _signedness_ of `char'. In
  8427. particular, you _must_ cast `char' values to `unsigned char'
  8428. before passing them to any <ctype.h> function (because those
  8429. expect a non-negative character value, or EOF). If you need
  8430. a particular signedness, explicitly specify `signed char' or
  8431. `unsigned char', or use C99 int8_t or uint8_t.
  8432. - From past experience with MacOS, we're still a bit nervous about
  8433. '\n' and '\r' potentially having unusual meanings on a given
  8434. platform. So it's fine to say `\n' in a string you're passing to
  8435. `printf', but in any context where those characters appear in a
  8436. standardised wire protocol or a binary file format, they should
  8437. be spelled '\012' and '\015' respectively.
  8438. E.2 Multiple backends treated equally
  8439. PuTTY is not an SSH client with some other stuff tacked on the side.
  8440. PuTTY is a generic, multiple-backend, remote VT-terminal client
  8441. which happens to support one backend which is larger, more popular
  8442. and more useful than the rest. Any extra feature which can possibly
  8443. be general across all backends should be so: localising features
  8444. unnecessarily into the SSH back end is a design error. (For example,
  8445. we had several code submissions for proxy support which worked by
  8446. hacking ssh.c. Clearly this is completely wrong: the network.h
  8447. abstraction is the place to put it, so that it will apply to all
  8448. back ends equally, and indeed we eventually put it there after
  8449. another contributor sent a better patch.)
  8450. The rest of PuTTY should try to avoid knowing anything about
  8451. specific back ends if at all possible. To support a feature which is
  8452. only available in one network protocol, for example, the back end
  8453. interface should be extended in a general manner such that _any_
  8454. back end which is able to provide that feature can do so. If it so
  8455. happens that only one back end actually does, that's just the way it
  8456. is, but it shouldn't be relied upon by any code.
  8457. E.3 Multiple sessions per process on some platforms
  8458. Some ports of PuTTY - notably the in-progress Mac port - are
  8459. constrained by the operating system to run as a single process
  8460. potentially managing multiple sessions.
  8461. Therefore, the platform-independent parts of PuTTY never use global
  8462. variables to store per-session data. The global variables that do
  8463. exist are tolerated because they are not specific to a particular
  8464. login session. The random number state in sshrand.c, the timer list
  8465. in timing.c and the queue of top-level callbacks in callback.c serve
  8466. all sessions equally. But most data is specific to a particular
  8467. network session, and is therefore stored in dynamically allocated
  8468. data structures, and pointers to these structures are passed around
  8469. between functions.
  8470. Platform-specific code can reverse this decision if it likes. The
  8471. Windows code, for historical reasons, stores most of its data as
  8472. global variables. That's OK, because _on Windows_ we know there is
  8473. only one session per PuTTY process, so it's safe to do that. But
  8474. changes to the platform-independent code should avoid introducing
  8475. global variables, unless they are genuinely cross-session.
  8476. E.4 C, not C++
  8477. PuTTY is written entirely in C, not in C++.
  8478. We have made _some_ effort to make it easy to compile our code using
  8479. a C++ compiler: notably, our `snew', `snewn' and `sresize' macros
  8480. explicitly cast the return values of malloc and realloc to the
  8481. target type. (This has type checking advantages even in C: it means
  8482. you never accidentally allocate the wrong size piece of memory for
  8483. the pointer type you're assigning it to. C++ friendliness is really
  8484. a side benefit.)
  8485. We want PuTTY to continue being pure C, at least in the platform-
  8486. independent parts and the currently existing ports. Patches which
  8487. switch the Makefiles to compile it as C++ and start using classes
  8488. will not be accepted.
  8489. The one exception: a port to a new platform may use languages other
  8490. than C if they are necessary to code on that platform. If your
  8491. favourite PDA has a GUI with a C++ API, then there's no way you can
  8492. do a port of PuTTY without using C++, so go ahead and use it. But
  8493. keep the C++ restricted to that platform's subdirectory; if your
  8494. changes force the Unix or Windows ports to be compiled as C++, they
  8495. will be unacceptable to us.
  8496. E.5 Security-conscious coding
  8497. PuTTY is a network application and a security application. Assume
  8498. your code will end up being fed deliberately malicious data by
  8499. attackers, and try to code in a way that makes it unlikely to be a
  8500. security risk.
  8501. In particular, try not to use fixed-size buffers for variable-size
  8502. data such as strings received from the network (or even the user).
  8503. We provide functions such as dupcat and dupprintf, which dynamically
  8504. allocate buffers of the right size for the string they construct.
  8505. Use these wherever possible.
  8506. E.6 Independence of specific compiler
  8507. Windows PuTTY can currently be compiled with any of three Windows
  8508. compilers: MS Visual C, the Cygwin / mingw32 GNU tools, and clang
  8509. (in MS compatibility mode).
  8510. This is a really useful property of PuTTY, because it means people
  8511. who want to contribute to the coding don't depend on having a
  8512. specific compiler; so they don't have to fork out money for MSVC if
  8513. they don't already have it, but on the other hand if they _do_ have
  8514. it they also don't have to spend effort installing gcc alongside it.
  8515. They can use whichever compiler they happen to have available, or
  8516. install whichever is cheapest and easiest if they don't have one.
  8517. Therefore, we don't want PuTTY to start depending on which compiler
  8518. you're using. Using GNU extensions to the C language, for example,
  8519. would ruin this useful property (not that anyone's ever tried
  8520. it!); and more realistically, depending on an MS-specific library
  8521. function supplied by the MSVC C library (_snprintf, for example)
  8522. is a mistake, because that function won't be available under the
  8523. other compilers. Any function supplied in an official Windows DLL
  8524. as part of the Windows API is fine, and anything defined in the C
  8525. library standard is also fine, because those should be available
  8526. irrespective of compilation environment. But things in between,
  8527. available as non-standard library and language extensions in only
  8528. one compiler, are disallowed.
  8529. (_snprintf in particular should be unnecessary, since we provide
  8530. dupprintf; see section E.5.)
  8531. Compiler independence should apply on all platforms, of course, not
  8532. just on Windows.
  8533. E.7 Small code size
  8534. PuTTY is tiny, compared to many other Windows applications. And
  8535. it's easy to install: it depends on no DLLs, no other applications,
  8536. no service packs or system upgrades. It's just one executable. You
  8537. install that executable wherever you want to, and run it.
  8538. We want to keep both these properties - the small size, and the ease
  8539. of installation - if at all possible. So code contributions that
  8540. depend critically on external DLLs, or that add a huge amount to the
  8541. code size for a feature which is only useful to a small minority of
  8542. users, are likely to be thrown out immediately.
  8543. We do vaguely intend to introduce a DLL plugin interface for PuTTY,
  8544. whereby seriously large extra features can be implemented in plugin
  8545. modules. The important thing, though, is that those DLLs will be
  8546. _optional_; if PuTTY can't find them on startup, it should run
  8547. perfectly happily and just won't provide those particular features.
  8548. A full installation of PuTTY might one day contain ten or twenty
  8549. little DLL plugins, which would cut down a little on the ease of
  8550. installation - but if you really needed ease of installation you
  8551. _could_ still just install the one PuTTY binary, or just the DLLs
  8552. you really needed, and it would still work fine.
  8553. Depending on _external_ DLLs is something we'd like to avoid if
  8554. at all possible (though for some purposes, such as complex SSH
  8555. authentication mechanisms, it may be unavoidable). If it can't be
  8556. avoided, the important thing is to follow the same principle of
  8557. graceful degradation: if a DLL can't be found, then PuTTY should run
  8558. happily and just not supply the feature that depended on it.
  8559. E.8 Single-threaded code
  8560. PuTTY and its supporting tools, or at least the vast majority of
  8561. them, run in only one OS thread.
  8562. This means that if you're devising some piece of internal mechanism,
  8563. there's no need to use locks to make sure it doesn't get called by
  8564. two threads at once. The only way code can be called re-entrantly is
  8565. by recursion.
  8566. That said, most of Windows PuTTY's network handling is triggered
  8567. off Windows messages requested by WSAAsyncSelect(), so if you call
  8568. MessageBox() deep within some network event handling code you should
  8569. be aware that you might be re-entered if a network event comes in
  8570. and is passed on to our window procedure by the MessageBox() message
  8571. loop.
  8572. Also, the front ends can use multiple threads if they like. For
  8573. example, the Windows front-end code spawns subthreads to deal with
  8574. bidirectional blocking I/O on non-network streams such as Windows
  8575. pipes. However, it keeps tight control of its auxiliary threads, and
  8576. uses them only for that one purpose, as a form of select(). Pretty
  8577. much all the code outside windows/handle-io.c is _only_ ever called
  8578. from the one primary thread; the others just loop round blocking
  8579. on file handles, and signal the main thread (via Windows event
  8580. objects) when some real work needs doing. This is not considered a
  8581. portability hazard because that code is already Windows-specific and
  8582. needs rewriting on other platforms.
  8583. One important consequence of this: PuTTY has only one thread in
  8584. which to do everything. That `everything' may include managing
  8585. more than one login session (section E.3), managing multiple data
  8586. channels within an SSH session, responding to GUI events even when
  8587. nothing is happening on the network, and responding to network
  8588. requests from the server (such as repeat key exchange) even when the
  8589. program is dealing with complex user interaction such as the re-
  8590. configuration dialog box. This means that _almost none_ of the PuTTY
  8591. code can safely block.
  8592. E.9 Keystrokes sent to the server wherever possible
  8593. In almost all cases, PuTTY sends keystrokes to the server. Even
  8594. weird keystrokes that you think should be hot keys controlling
  8595. PuTTY. Even Alt-F4 or Alt-Space, for example. If a keystroke has a
  8596. well-defined escape sequence that it could usefully be sending to
  8597. the server, then it should do so, or at the very least it should be
  8598. configurably able to do so.
  8599. To unconditionally turn a key combination into a hot key to control
  8600. PuTTY is almost always a design error. If a hot key is really truly
  8601. required, then try to find a key combination for it which _isn't_
  8602. already used in existing PuTTYs (either it sends nothing to the
  8603. server, or it sends the same thing as some other combination).
  8604. Even then, be prepared for the possibility that one day that key
  8605. combination might end up being needed to send something to the
  8606. server - so make sure that there's an alternative way to invoke
  8607. whatever PuTTY feature it controls.
  8608. E.10 640x480 friendliness in configuration panels
  8609. There's a reason we have lots of tiny configuration panels instead
  8610. of a few huge ones, and that reason is that not everyone has a
  8611. 1600x1200 desktop. 640x480 is still a viable resolution for running
  8612. Windows (and indeed it's still the default if you start up in safe
  8613. mode), so it's still a resolution we care about.
  8614. Accordingly, the PuTTY configuration box, and the PuTTYgen control
  8615. window, are deliberately kept just small enough to fit comfortably
  8616. on a 640x480 display. If you're adding controls to either of these
  8617. boxes and you find yourself wanting to increase the size of the
  8618. whole box, _don't_. Split it into more panels instead.
  8619. E.11 Coroutines in protocol code
  8620. Large parts of the code in modules implementing wire protocols
  8621. (mainly SSH) are structured using a set of macros that implement
  8622. (something close to) Donald Knuth's `coroutines' concept in C.
  8623. Essentially, the purpose of these macros are to arrange that a
  8624. function can call crReturn() to return to its caller, and the next
  8625. time it is called control will resume from just after that crReturn
  8626. statement.
  8627. This means that any local (automatic) variables declared in such a
  8628. function will be corrupted every time you call crReturn. If you need
  8629. a variable to persist for longer than that, you _must_ make it a
  8630. field in some appropriate structure containing the persistent state
  8631. of the coroutine - typically the main state structure for a protocol
  8632. layer.
  8633. See `https://www.chiark.greenend.org.uk/~sgtatham/coroutines.html'
  8634. for a more in-depth discussion of what these macros are for and how
  8635. they work.
  8636. Another caveat: most of these coroutines are not _guaranteed_ to run
  8637. to completion, because the SSH connection (or whatever) that they're
  8638. part of might be interrupted at any time by an unexpected network
  8639. event or user action. So whenever a coroutine-managed variable
  8640. refers to a resource that needs releasing, you should also ensure
  8641. that the cleanup function for its containing state structure can
  8642. reliably release it even if the coroutine is aborted at an arbitrary
  8643. point.
  8644. For example, if an SSH packet protocol layer has to have a field
  8645. that sometimes points to a piece of allocated memory, then you
  8646. should ensure that when you free that memory you reset the pointer
  8647. field to NULL. Then, no matter when the protocol layer's cleanup
  8648. function is called, it can reliably free the memory if there is any,
  8649. and not crash if there isn't.
  8650. E.12 Explicit vtable structures to implement traits
  8651. A lot of PuTTY's code is written in a style that looks structurally
  8652. rather like an object-oriented language, in spite of PuTTY being a
  8653. pure C program.
  8654. For example, there's a single data type called ssh_hash, which is
  8655. an abstraction of a secure hash function, and a bunch of functions
  8656. called things like ssh_hash__foo_ that do things with those data
  8657. types. But in fact, PuTTY supports many different hash functions,
  8658. and each one has to provide its own implementation of those
  8659. functions.
  8660. In C++ terms, this is rather like having a single abstract base
  8661. class, and multiple concrete subclasses of it, each of which fills
  8662. in all the pure virtual methods in a way that's compatible with the
  8663. data fields of the subclass. The implementation is more or less the
  8664. same, as well: in C, we do explicitly in the source code what the
  8665. C++ compiler will be doing behind the scenes at compile time.
  8666. But perhaps a closer analogy in functional terms is the Rust concept
  8667. of a `trait', or the Java idea of an `interface'. C++ supports a
  8668. multi-level hierarchy of inheritance, whereas PuTTY's system - like
  8669. traits or interfaces - has only two levels, one describing a generic
  8670. object of a type (e.g. a hash function) and another describing a
  8671. specific implementation of that type (e.g. SHA-256).
  8672. The PuTTY code base has a standard idiom for doing this in C, as
  8673. follows.
  8674. Firstly, we define two struct types for our trait. One of them
  8675. describes a particular _kind_ of implementation of that trait,
  8676. and it's full of (mostly) function pointers. The other describes
  8677. a specific _instance_ of an implementation of that trait, and it
  8678. will contain a pointer to a const instance of the first type. For
  8679. example:
  8680. typedef struct MyAbstraction MyAbstraction;
  8681. typedef struct MyAbstractionVtable MyAbstractionVtable;
  8682. struct MyAbstractionVtable {
  8683. MyAbstraction *(*new)(const MyAbstractionVtable *vt);
  8684. void (*free)(MyAbstraction *);
  8685. void (*modify)(MyAbstraction *, unsigned some_parameter);
  8686. unsigned (*query)(MyAbstraction *, unsigned some_parameter);
  8687. };
  8688. struct MyAbstraction {
  8689. const MyAbstractionVtable *vt;
  8690. };
  8691. Here, we imagine that MyAbstraction might be some kind of object
  8692. that contains mutable state. The associated vtable structure shows
  8693. what operations you can perform on a MyAbstraction: you can create
  8694. one (dynamically allocated), free one you already have, or call the
  8695. example methods `modify' (to change the state of the object in some
  8696. way) and `query' (to return some value derived from the object's
  8697. current state).
  8698. (In most cases, the vtable structure has a name ending in `vtable'.
  8699. But for historical reasons a lot of the crypto primitives that
  8700. use this scheme - ciphers, hash functions, public key methods and
  8701. so on - instead have names ending in `alg', on the basis that the
  8702. primitives they implement are often referred to as `encryption
  8703. algorithms', `hash algorithms' and so forth.)
  8704. Now, to define a concrete instance of this trait, you'd define a
  8705. struct that contains a MyAbstraction field, plus any other data it
  8706. might need:
  8707. struct MyImplementation {
  8708. unsigned internal_data[16];
  8709. SomeOtherType *dynamic_subthing;
  8710. MyAbstraction myabs;
  8711. };
  8712. Next, you'd implement all the necessary methods for that
  8713. implementation of the trait, in this kind of style:
  8714. static MyAbstraction *myimpl_new(const MyAbstractionVtable *vt)
  8715. {
  8716. MyImplementation *impl = snew(MyImplementation);
  8717. memset(impl, 0, sizeof(*impl));
  8718. impl->dynamic_subthing = allocate_some_other_type();
  8719. impl->myabs.vt = vt;
  8720. return &impl->myabs;
  8721. }
  8722. static void myimpl_free(MyAbstraction *myabs)
  8723. {
  8724. MyImplementation *impl = container_of(myabs, MyImplementation, myabs);
  8725. free_other_type(impl->dynamic_subthing);
  8726. sfree(impl);
  8727. }
  8728. static void myimpl_modify(MyAbstraction *myabs, unsigned param)
  8729. {
  8730. MyImplementation *impl = container_of(myabs, MyImplementation, myabs);
  8731. impl->internal_data[param] += do_something_with(impl->dynamic_subthing);
  8732. }
  8733. static unsigned myimpl_query(MyAbstraction *myabs, unsigned param)
  8734. {
  8735. MyImplementation *impl = container_of(myabs, MyImplementation, myabs);
  8736. return impl->internal_data[param];
  8737. }
  8738. Having defined those methods, now we can define a const instance of
  8739. the vtable structure containing pointers to them:
  8740. const MyAbstractionVtable MyImplementation_vt = {
  8741. .new = myimpl_new,
  8742. .free = myimpl_free,
  8743. .modify = myimpl_modify,
  8744. .query = myimpl_query,
  8745. };
  8746. _In principle_, this is all you need. Client code can construct a
  8747. new instance of a particular implementation of MyAbstraction by
  8748. digging out the new method from the vtable and calling it (with
  8749. the vtable itself as a parameter), which returns a MyAbstraction *
  8750. pointer that identifies a newly created instance, in which the vt
  8751. field will contain a pointer to the same vtable structure you passed
  8752. in. And once you have an instance object, say MyAbstraction *myabs,
  8753. you can dig out one of the other method pointers from the vtable it
  8754. points to, and call that, passing the object itself as a parameter.
  8755. But in fact, we don't do that, because it looks pretty ugly at all
  8756. the call sites. Instead, what we generally do in this code base is
  8757. to write a set of static inline wrapper functions in the same header
  8758. file that defined the MyAbstraction structure types, like this:
  8759. static inline MyAbstraction *myabs_new(const MyAbstractionVtable *vt)
  8760. { return vt->new(vt); }
  8761. static inline void myabs_free(MyAbstraction *myabs)
  8762. { myabs->vt->free(myabs); }
  8763. static inline void myimpl_modify(MyAbstraction *myabs, unsigned param)
  8764. { myabs->vt->modify(myabs, param); }
  8765. static inline unsigned myimpl_query(MyAbstraction *myabs, unsigned param)
  8766. { return myabs->vt->query(myabs, param); }
  8767. And now call sites can use those reasonably clean-looking wrapper
  8768. functions, and shouldn't ever have to directly refer to the vt field
  8769. inside any myabs object they're holding. For example, you might
  8770. write something like this:
  8771. MyAbstraction *myabs = myabs_new(&MyImplementation_vtable);
  8772. myabs_update(myabs, 10);
  8773. unsigned output = myabs_query(myabs, 2);
  8774. myabs_free(myabs);
  8775. and then all this code can use a different implementation of the
  8776. same abstraction by just changing which vtable pointer it passed in
  8777. in the first line.
  8778. Some things to note about this system:
  8779. - The implementation instance type (here `MyImplementation'
  8780. contains the abstraction type (`MyAbstraction') as one of its
  8781. fields. But that field is not necessarily at the start of the
  8782. structure. So you can't just _cast_ pointers back and forth
  8783. between the two types. Instead:
  8784. - You `up-cast' from implementation to abstraction by taking
  8785. the address of the MyAbstraction field. You can see the
  8786. example new method above doing this, returning &impl->myabs.
  8787. All new methods do this on return.
  8788. - Going in the other direction, each method that was
  8789. passed a generic MyAbstraction *myabs parameter has to
  8790. recover a pointer to the specific implementation type
  8791. MyImplementation *impl. The idiom for doing that is to use
  8792. the `container_of' macro, also seen in the Linux kernel
  8793. code. Generally, container_of(p, Type, field) says: `I'm
  8794. confident that the pointer value `p' is pointing to the
  8795. field called `field' within a larger struct of type Type.
  8796. Please return me the pointer to the containing structure.'
  8797. So in this case, we take the `myabs' pointer passed to the
  8798. function, and `down-cast' it into a pointer to the larger
  8799. and more specific structure type MyImplementation, by
  8800. adjusting the pointer value based on the offset within that
  8801. structure of the field called `myabs'.
  8802. This system is flexible enough to permit `multiple inheritance',
  8803. or rather, multiple _implementation_: having one object type
  8804. implement more than one trait. For example, the ProxySocket
  8805. type implements both the Socket trait and the Plug trait that
  8806. connects to it, because it has to act as an adapter between
  8807. another instance of each of those types.
  8808. It's also perfectly possible to have the same object implement
  8809. the _same_ trait in two different ways. At the time of writing
  8810. this I can't think of any case where we actually do this, but a
  8811. theoretical example might be if you needed to support a trait
  8812. like Comparable in two ways that sorted by different criteria.
  8813. There would be no difficulty doing this in the PuTTY system:
  8814. simply have your implementation struct contain two (or more)
  8815. fields of the same abstraction type. The fields will have
  8816. different names, which makes it easy to explicitly specify which
  8817. one you're returning a pointer to during up-casting, or which
  8818. one you're down-casting from using container_of. And then both
  8819. sets of implementation methods can recover a pointer to the same
  8820. containing structure.
  8821. - Unlike in C++, all objects in PuTTY that use this system are
  8822. dynamically allocated. The `constructor' functions (whether
  8823. they're virtualised across the whole abstraction or specific to
  8824. each implementation) always allocate memory and return a pointer
  8825. to it. The `free' method (our analogue of a destructor) always
  8826. expects the input pointer to be dynamically allocated, and frees
  8827. it. As a result, client code doesn't need to know how large
  8828. the implementing object type is, because it will never need to
  8829. allocate it (on the stack or anywhere else).
  8830. - Unlike in C++, the abstraction's `vtable' structure does not
  8831. only hold methods that you can call on an instance object. It
  8832. can also hold several other kinds of thing:
  8833. - Methods that you can call _without_ an instance object,
  8834. given only the vtable structure identifying a particular
  8835. implementation of the trait. You might think of these as
  8836. `static methods', as in C++, except that they're _virtual_
  8837. - the same code can call the static method of a different
  8838. `class' given a different vtable pointer. So they're more
  8839. like `virtual static methods', which is a concept C++
  8840. doesn't have. An example is the pubkey_bits method in
  8841. ssh_keyalg.
  8842. - The most important case of a `virtual static method' is the
  8843. new method that allocates and returns a new object. You can
  8844. think of it as a `virtual constructor' - another concept C++
  8845. doesn't have. (However, not all types need one of these: see
  8846. below.)
  8847. - The vtable can also contain constant data relevant to the
  8848. class as a whole - `virtual constant data'. For example, a
  8849. cryptographic hash function will contain an integer field
  8850. giving the length of the output hash, and most crypto
  8851. primitives will contain a string field giving the identifier
  8852. used in the SSH protocol that describes that primitive.
  8853. The effect of all of this is that you can make other pieces of
  8854. code able to use any instance of one of these types, by passing
  8855. it an actual vtable as a parameter. For example, the hash_simple
  8856. function takes an ssh_hashalg vtable pointer specifying any
  8857. hash algorithm you like, and internally, it creates an object
  8858. of that type, uses it, and frees it. In C++, you'd probably
  8859. do this using a template, which would mean you had multiple
  8860. specialisations of hash_simple - and then it would be much more
  8861. difficult to decide _at run time_ which one you needed to use.
  8862. Here, hash_simple is still just one function, and you can decide
  8863. as late as you like which vtable to pass to it.
  8864. - The abstract _instance_ structure can also contain publicly
  8865. visible data fields (this time, usually treated as mutable)
  8866. which are common to all implementations of the trait. For
  8867. example, BinaryPacketProtocol has lots of these.
  8868. - Not all abstractions of this kind want virtual constructors. It
  8869. depends on how different the implementations are.
  8870. With a crypto primitive like a hash algorithm, the constructor
  8871. call looks the same for every implementing type, so it makes
  8872. sense to have a standardised virtual constructor in the
  8873. vtable and a ssh_hash_new wrapper function which can make an
  8874. instance of whatever vtable you pass it. And then you make
  8875. all the vtable objects themselves globally visible throughout
  8876. the source code, so that any module can call (for example)
  8877. ssh_hash_new(&ssh_sha256).
  8878. But with other kinds of object, the constructor for each
  8879. implementing type has to take a different set of parameters.
  8880. For example, implementations of Socket are not generally
  8881. interchangeable at construction time, because constructing
  8882. different kinds of socket require totally different kinds of
  8883. address parameter. In that situation, it makes more sense to
  8884. keep the vtable structure itself private to the implementing
  8885. source file, and instead, publish an ordinary constructing
  8886. function that allocates and returns an instance of that
  8887. particular subtype, taking whatever parameters are appropriate
  8888. to that subtype.
  8889. - If you do have virtual constructors, you can choose whether
  8890. they take a vtable pointer as a parameter (as shown above), or
  8891. an _existing_ instance object. In the latter case, they can
  8892. refer to the object itself as well as the vtable. For example,
  8893. you could have a trait come with a virtual constructor called
  8894. `clone', meaning `Make a copy of this object, no matter which
  8895. implementation it is.'
  8896. - Sometimes, a single vtable structure type can be shared
  8897. between two completely different object types, and contain
  8898. all the methods for both. For example, ssh_compression_alg
  8899. contains methods to create, use and free ssh_compressor and
  8900. ssh_decompressor objects, which are not interchangeable - but
  8901. putting their methods in the same vtable means that it's easy to
  8902. create a matching pair of objects that are compatible with each
  8903. other.
  8904. - Passing the vtable itself as an argument to the new method is
  8905. not compulsory: if a given new implementation is only used by
  8906. a single vtable, then that function can simply hard-code the
  8907. vtable pointer that it writes into the object it constructs.
  8908. But passing the vtable is more flexible, because it allows
  8909. a single constructor function to be shared between multiple
  8910. slightly different object types. For example, SHA-384 and SHA-
  8911. 512 share the same new method and the same implementation data
  8912. type, because they're very nearly the same hash algorithm - but
  8913. a couple of the other methods in their vtables are different,
  8914. because the `reset' function has to set up the initial algorithm
  8915. state differently, and the `digest' method has to write out a
  8916. different amount of data.
  8917. One practical advantage of having the myabs__foo_ family of
  8918. inline wrapper functions in the header file is that if you
  8919. change your mind later about whether the vtable needs to be
  8920. passed to new, you only have to update the myabs_new wrapper,
  8921. and then the existing call sites won't need changing.
  8922. - Another piece of `stunt object orientation' made possible by
  8923. this scheme is that you can write two vtables that both use the
  8924. same structure layout for the implementation object, and have
  8925. an object _transform from one to the other_ part way through
  8926. its lifetime, by overwriting its own vtable pointer field. For
  8927. example, the sesschan type that handles the server side of an
  8928. SSH terminal session will sometimes transform in mid-lifetime
  8929. into an SCP or SFTP file-transfer channel in this way, at the
  8930. point where the client sends an `exec' or `subsystem' request
  8931. that indicates that that's what it wants to do with the channel.
  8932. This concept would be difficult to arrange in C++. In Rust,
  8933. it wouldn't even _make sense_, because in Rust, objects
  8934. implementing a trait don't even contain a vtable pointer at
  8935. all - instead, the `trait object' type (identifying a specific
  8936. instance of some implementation of a given trait) consists of
  8937. a pair of pointers, one to the object itself and one to the
  8938. vtable. In that model, the only way you could make an existing
  8939. object turn into a different trait would be to know where all
  8940. the pointers to it were stored elsewhere in the program, and
  8941. persuade all their owners to rewrite them.
  8942. - Another stunt you can do is to have a vtable that doesn't have
  8943. a corresponding implementation structure at all, because the
  8944. only methods implemented in it are the constructors, and they
  8945. always end up returning an implementation of some other vtable.
  8946. For example, some of PuTTY's crypto primitives have a hardware-
  8947. accelerated version and a pure software version, and decide at
  8948. run time which one to use (based on whether the CPU they're
  8949. running on supports the necessary acceleration instructions).
  8950. So, for example, there are vtables for ssh_sha256_sw and
  8951. ssh_sha256_hw, each of which has its own data layout and its own
  8952. implementations of all the methods; and then there's a top-level
  8953. vtable ssh_sha256, which only provides the `new' method, and
  8954. implements it by calling the `new' method on one or other of the
  8955. subtypes depending on what it finds out about the machine it's
  8956. running on. That top-level selector vtable is nearly always the
  8957. one used by client code. (Except for the test suite, which has
  8958. to instantiate both of the subtypes in order to make sure they
  8959. both pass the tests.)
  8960. As a result, the top-level selector vtable ssh_sha256 doesn't
  8961. need to implement any method that takes an ssh_cipher *
  8962. parameter, because no ssh_cipher object is ever constructed
  8963. whose vt field points to &ssh_sha256: they all point to one of
  8964. the other two full implementation vtables.
  8965. E.13 Do as we say, not as we do
  8966. The current PuTTY code probably does not conform strictly to _all_
  8967. of the principles listed above. There may be the occasional SSH-
  8968. specific piece of code in what should be a backend-independent
  8969. module, or the occasional dependence on a non-standard X library
  8970. function under Unix.
  8971. This should not be taken as a licence to go ahead and violate the
  8972. rules. Where we violate them ourselves, we're not happy about it,
  8973. and we would welcome patches that fix any existing problems. Please
  8974. try to help us make our code better, not worse!
  8975. Appendix F: PuTTY download keys and signatures
  8976. ----------------------------------------------
  8977. We create GPG signatures for all the PuTTY files distributed from
  8978. our web site, so that users can be confident that the files have not
  8979. been tampered with. Here we identify our public keys, and explain
  8980. our signature policy so you can have an accurate idea of what each
  8981. signature guarantees. This description is provided as both a web
  8982. page on the PuTTY site, and an appendix in the PuTTY manual.
  8983. As of release 0.58, all of the PuTTY executables contain fingerprint
  8984. material (usually accessed via the `-pgpfp' command-line option),
  8985. such that if you have an executable you trust, you can use it to
  8986. establish a trust path, for instance to a newer version downloaded
  8987. from the Internet.
  8988. As of release 0.67, the Windows executables and installer also
  8989. contain built-in signatures that are automatically verified by
  8990. Windows' own mechanism (`Authenticode'). The keys used for that are
  8991. different, and are not covered here.
  8992. See question A.9.18 in the FAQ for some gotchas when verifying
  8993. checksums and signatures.
  8994. (Note that none of the keys, signatures, etc mentioned here have
  8995. anything to do with keys used with SSH - they are purely for
  8996. verifying the origin of files distributed by the PuTTY team.)
  8997. F.1 Public keys
  8998. We maintain multiple keys, stored with different levels of security
  8999. due to being used in different ways. See section F.2 below for
  9000. details.
  9001. The keys we provide are:
  9002. Snapshot Key
  9003. Used to sign routine development builds of PuTTY: nightly
  9004. snapshots, pre-releases, and sometimes also custom diagnostic
  9005. builds we send to particular users.
  9006. Release Key
  9007. Used to sign manually released versions of PuTTY.
  9008. Secure Contact Key
  9009. An encryption-capable key suitable for people to send
  9010. confidential messages to the PuTTY team, e.g. reports of
  9011. vulnerabilities.
  9012. Master Key
  9013. Used to tie all the above keys into the GPG web of trust. The
  9014. Master Key signs all the other keys, and other GPG users have
  9015. signed it in turn.
  9016. The current issue of those keys are available for download from the
  9017. PuTTY website, and are also available on PGP keyservers using the
  9018. key IDs listed below.
  9019. *Master Key* (2023)
  9020. RSA, 4096-bit. Key ID: B15D9EFC216B06A1. Fingerprint:
  9021. 28D4 7C46 55E7 65A6 D827 AC66 B15D 9EFC 216B 06A1
  9022. *Release Key* (2023)
  9023. RSA, 3072-bit. Key ID: 1993D21BCAD1AA77. Fingerprint:
  9024. F412 BA3A A30F DC0E 77B4 E387 1993 D21B CAD1 AA77
  9025. *Snapshot Key* (2023)
  9026. RSA, 3072-bit. Key ID: 10625E553F53FAAD. Fingerprint:
  9027. 74CC 6DD9 ABA7 31D4 C5A0 C2D0 1062 5E55 3F53 FAAD
  9028. *Secure Contact Key* (2023)
  9029. RSA, 3072-bit. Key ID: 1559F6A8929F5EFC. Fingerprint:
  9030. 01F5 A2B1 1388 D64B 707F 897F 1559 F6A8 929F 5EFC
  9031. F.2 Security details
  9032. The various keys have various different security levels. This
  9033. section explains what those security levels are, and how far you can
  9034. expect to trust each key.
  9035. F.2.1 The Development Snapshots key
  9036. The Development Snapshots private key is stored _without a
  9037. passphrase_. This is necessary, because the snapshots are generated
  9038. every night without human intervention, so nobody would be able to
  9039. type a passphrase.
  9040. The snapshots are built and signed on a team member's home
  9041. computers, before being uploaded to the web server from which you
  9042. download them.
  9043. Therefore, a signature from the Development Snapshots key _DOES_
  9044. protect you against:
  9045. - People tampering with the PuTTY binaries between the PuTTY web
  9046. site and you.
  9047. - The maintainers of our web server attempting to abuse their root
  9048. privilege to tamper with the binaries.
  9049. But it _DOES NOT_ protect you against:
  9050. - People tampering with the binaries before they are uploaded to
  9051. our download servers.
  9052. - People tampering with the build machines so that the next set of
  9053. binaries they build will be malicious in some way.
  9054. - People stealing the unencrypted private key from the build
  9055. machine it lives on.
  9056. Of course, we take all reasonable precautions to guard the build
  9057. machines. But when you see a signature, you should always be certain
  9058. of precisely what it guarantees and precisely what it does not.
  9059. F.2.2 The Releases key
  9060. The Releases key is more secure: because it is only used at release
  9061. time, to sign each release by hand, we can store it encrypted.
  9062. The Releases private key is kept encrypted on the developers' own
  9063. local machines. So an attacker wanting to steal it would have to
  9064. also steal the passphrase.
  9065. F.2.3 The Secure Contact Key
  9066. The Secure Contact Key is stored with a similar level of security to
  9067. the Release Key: it is stored with a passphrase, and no automated
  9068. script has access to it.
  9069. F.2.4 The Master Keys
  9070. The Master Key signs almost nothing. Its purpose is to bind the
  9071. other keys together and certify that they are all owned by the same
  9072. people and part of the same integrated setup. The only signatures
  9073. produced by the Master Key, _ever_, should be the signatures on the
  9074. other keys.
  9075. The Master Key is especially long, and its private key and
  9076. passphrase are stored with special care.
  9077. We have collected some third-party signatures on the Master Key, in
  9078. order to increase the chances that you can find a suitable trust
  9079. path to them.
  9080. We have uploaded our various keys to public keyservers, so that even
  9081. if you don't know any of the people who have signed our keys, you
  9082. can still be reasonably confident that an attacker would find it
  9083. hard to substitute fake keys on all the public keyservers at once.
  9084. F.3 Key rollover
  9085. Our current keys were generated in July 2023.
  9086. Each new Master Key is signed with the old one, to show that it
  9087. really is owned by the same people and not substituted by an
  9088. attacker.
  9089. Each new Master Key also signs the previous Release Keys, in case
  9090. you're trying to verify the signatures on a release prior to the
  9091. rollover and can find a chain of trust to those keys from any of the
  9092. people who have signed our new Master Key.
  9093. Each release is signed with the Release Key that was current at the
  9094. time of release. We don't go back and re-sign old releases with
  9095. newly generated keys.
  9096. The details of all previous keys are given here.
  9097. *Keys generated in the 2021 rollover*
  9098. *Master Key* (2021)
  9099. RSA, 3072-bit. Key ID: DD4355EAAC1119DE. Fingerprint:
  9100. A872 D42F 1660 890F 0E05 223E DD43 55EA AC11 19DE
  9101. *Release Key* (2021)
  9102. RSA, 3072-bit. Key ID: E4F83EA2AA4915EC. Fingerprint:
  9103. 2CF6 134B D3F7 7A65 88EB D668 E4F8 3EA2 AA49 15EC
  9104. *Snapshot Key* (2021)
  9105. RSA, 3072-bit. Key ID: B43979F89F446CFD. Fingerprint:
  9106. 1FD3 BCAC E532 FBE0 6A8C 09E2 B439 79F8 9F44 6CFD
  9107. *Secure Contact Key* (2021)
  9108. RSA, 3072-bit. Key ID: 012C59D4211BD62A. Fingerprint:
  9109. E30F 1354 2A04 BE0E 56F0 5801 012C 59D4 211B D62A
  9110. *Keys generated in the 2018 rollover*
  9111. *Master Key* (2018)
  9112. RSA, 4096-bit. Key ID: 76BC7FE4EBFD2D9E. Fingerprint:
  9113. 24E1 B1C5 75EA 3C9F F752 A922 76BC 7FE4 EBFD 2D9E
  9114. *Release Key* (2018)
  9115. RSA, 3072-bit. Key ID: 6289A25F4AE8DA82. Fingerprint:
  9116. E273 94AC A3F9 D904 9522 E054 6289 A25F 4AE8 DA82
  9117. *Snapshot Key* (2018)
  9118. RSA, 3072-bit. Key ID: 38BA7229B7588FD1. Fingerprint:
  9119. C92B 52E9 9AB6 1DDA 33DB 2B7A 38BA 7229 B758 8FD1
  9120. *Secure Contact Key* (2018)
  9121. RSA, 3072-bit. Key ID: 657D487977F95C98. Fingerprint:
  9122. A680 0082 2998 6E46 22CA 0E43 657D 4879 77F9 5C98
  9123. *Key generated in 2016* (when we first introduced the Secure Contact
  9124. Key)
  9125. *Secure Contact Key* (2016)
  9126. RSA, 2048-bit. Main key ID: 2048R/8A0AF00B (long version:
  9127. 2048R/C4FCAAD08A0AF00B). Encryption subkey ID: 2048R/50C2CF5C
  9128. (long version: 2048R/9EB39CC150C2CF5C). Fingerprint:
  9129. 8A26 250E 763F E359 75F3 118F C4FC AAD0 8A0A F00B
  9130. *Keys generated in the 2015 rollover*
  9131. *Master Key* (2015)
  9132. RSA, 4096-bit. Key ID: 4096R/04676F7C (long
  9133. version: 4096R/AB585DC604676F7C). Fingerprint:
  9134. 440D E3B5 B7A1 CA85 B3CC 1718 AB58 5DC6 0467 6F7C
  9135. *Release Key* (2015)
  9136. RSA, 2048-bit. Key ID: 2048R/B43434E4 (long
  9137. version: 2048R/9DFE2648B43434E4). Fingerprint:
  9138. 0054 DDAA 8ADA 15D2 768A 6DE7 9DFE 2648 B434 34E4
  9139. *Snapshot Key* (2015)
  9140. RSA, 2048-bit. Key ID: 2048R/D15F7E8A (long
  9141. version: 2048R/EEF20295D15F7E8A). Fingerprint:
  9142. 0A3B 0048 FE49 9B67 A234 FEB6 EEF2 0295 D15F 7E8A
  9143. *Original keys generated in 2000* (two sets, RSA and DSA)
  9144. *Master Key* (original RSA)
  9145. RSA, 1024-bit. Key ID: 1024R/1E34AC41 (long
  9146. version: 1024R/9D5877BF1E34AC41). Fingerprint:
  9147. 8F 15 97 DA 25 30 AB 0D 88 D1 92 54 11 CF 0C 4C
  9148. *Master Key* (original DSA)
  9149. DSA, 1024-bit. Key ID: 1024D/6A93B34E (long
  9150. version: 1024D/4F5E6DF56A93B34E). Fingerprint:
  9151. 313C 3E76 4B74 C2C5 F2AE 83A8 4F5E 6DF5 6A93 B34E
  9152. *Release Key* (original RSA)
  9153. RSA, 1024-bit. Key ID: 1024R/B41CAE29 (long
  9154. version: 1024R/EF39CCC0B41CAE29). Fingerprint:
  9155. AE 65 D3 F7 85 D3 18 E0 3B 0C 9B 02 FF 3A 81 FE
  9156. *Release Key* (original DSA)
  9157. DSA, 1024-bit. Key ID: 1024D/08B0A90B (long
  9158. version: 1024D/FECD6F3F08B0A90B). Fingerprint:
  9159. 00B1 1009 38E6 9800 6518 F0AB FECD 6F3F 08B0 A90B
  9160. *Snapshot Key* (original RSA)
  9161. RSA, 1024-bit. Key ID: 1024R/32B903A9 (long
  9162. version: 1024R/FAAED21532B903A9). Fingerprint:
  9163. 86 8B 1F 79 9C F4 7F BD 8B 1B D7 8E C6 4E 4C 03
  9164. *Snapshot Key* (original DSA)
  9165. DSA, 1024-bit. Key ID: 1024D/7D3E4A00 (long
  9166. version: 1024D/165E56F77D3E4A00). Fingerprint:
  9167. 63DD 8EF8 32F5 D777 9FF0 2947 165E 56F7 7D3E 4A00
  9168. Appendix G: SSH-2 names specified for PuTTY
  9169. -------------------------------------------
  9170. There are various parts of the SSH-2 protocol where things
  9171. are specified using a textual name. Names ending in
  9172. @putty.projects.tartarus.org are reserved for allocation by the
  9173. PuTTY team. Allocated names are documented here.
  9174. G.1 Connection protocol channel request names
  9175. These names can be sent in a SSH_MSG_CHANNEL_REQUEST message.
  9176. [email protected]
  9177. This is sent by a client to announce that it will not have more
  9178. than one channel open at a time in the current connection (that
  9179. one being the one the request is sent on). The intention is that
  9180. the server, knowing this, can set the window on that one channel
  9181. to something very large, and leave flow control to TCP. There is
  9182. no message-specific data.
  9183. [email protected]
  9184. PuTTY sends this request along with some
  9185. SSH_MSG_CHANNEL_WINDOW_ADJUST messages as part of its window-
  9186. size tuning. It can be sent on any type of channel. There is no
  9187. message-specific data. Servers MUST treat it as an unrecognised
  9188. request and respond with SSH_MSG_CHANNEL_FAILURE.
  9189. (Some SSH servers get confused by this message, so there is a
  9190. bug-compatibility mode for disabling it. See section 4.27.3.)
  9191. G.2 Key exchange method names
  9192. [email protected]
  9193. [email protected]
  9194. [email protected]
  9195. [email protected]
  9196. [email protected]
  9197. [email protected]
  9198. [email protected]
  9199. [email protected]
  9200. [email protected]
  9201. [email protected]
  9202. [email protected]
  9203. These appeared in various drafts of what eventually became
  9204. RFC 4432. They have been superseded by rsa1024-sha1 and rsa2048-
  9205. sha256.
  9206. G.3 Encryption algorithm names
  9207. [email protected]
  9208. [email protected]
  9209. These were used in drafts of what eventually became RFC 4345.
  9210. They have been superseded by arcfour128 and arcfour256.
  9211. G.4 Agent extension request names
  9212. The SSH agent protocol, which is only specified in an Internet-
  9213. Draft at the time of writing (draft-miller-ssh-agent),
  9214. defines an extension mechanism. These names can be sent in an
  9215. SSH_AGENTC_EXTENSION message.
  9216. [email protected]
  9217. The payload is a single SSH-2 string containing a keypair in
  9218. the PPK format defined in appendix C. Compared to the standard
  9219. SSH_AGENTC_ADD_IDENTITY, this extension allows adding keys
  9220. in encrypted form, with the agent requesting a decryption
  9221. passphrase from the user on demand, and able to revert the key
  9222. to encrypted form.
  9223. [email protected]
  9224. The payload is a single SSH-2 string specifying a public key
  9225. blob, as in SSH_AGENTC_REMOVE_IDENTITY. Requests that the agent
  9226. forget any cleartext form of a specific key.
  9227. Returns SSH_AGENT_SUCCESS if the agent ended up holding the
  9228. key only in encrypted form (even if it was already encrypted);
  9229. returns SSH_AGENT_EXTENSION_FAILURE if not (if it wasn't held by
  9230. the agent at all, or only in cleartext form).
  9231. [email protected]
  9232. No payload. Requests that the agent forget the cleartext form of
  9233. any keys for which it holds an encrypted form.
  9234. If the agent holds any keys with an encrypted form (or no keys
  9235. at all), returns SSH_AGENT_SUCCESS to indicate that no such keys
  9236. are now held in cleartext form, followed by a uint32 specifying
  9237. how many keys remain in cleartext form (because the agent didn't
  9238. hold an encrypted form for them). If the agent holds nothing but
  9239. keys in cleartext form, returns SSH_AGENT_EXTENSION_FAILURE.
  9240. [email protected]
  9241. No payload. Returns SSH_AGENT_SUCCESS followed by a list of
  9242. identities similar to SSH_AGENT_IDENTITIES_ANSWER, except that
  9243. each key has an extra SSH-2 string at the end. Currently that
  9244. string contains a single uint32 flags word, with the following
  9245. bits defined:
  9246. Bit 0
  9247. If set, key is held with an encrypted form (so that the
  9248. `reencrypt' extension can do something useful with it).
  9249. Bit 1
  9250. If set, key's cleartext form is not currently held (so the
  9251. user will have to supply a passphrase before the key can be
  9252. used).
  9253. Appendix H: PuTTY authentication plugin protocol
  9254. ------------------------------------------------
  9255. This appendix contains the specification for the protocol spoken
  9256. over local IPC between PuTTY and an authentication helper plugin.
  9257. If you already have an authentication plugin and want to configure
  9258. PuTTY to use it, see section 4.22.3 for how to do that. This
  9259. appendix is for people writing new authentication plugins.
  9260. H.1 Requirements
  9261. The following requirements informed the specification of this
  9262. protocol.
  9263. *Automate keyboard-interactive authentication.* We're motivated in
  9264. the first place by the observation that the general SSH userauth
  9265. method `keyboard-interactive' (defined in [RFC4256]) can be used
  9266. for many kinds of challenge/response or one-time-password styles
  9267. of authentication, and in more than one of those, the necessary
  9268. responses might be obtained from an auxiliary network connection,
  9269. such as an HTTPS transaction. So it's useful if a user doesn't have
  9270. to manually copy-type or copy-paste from their web browser into
  9271. their SSH client, but instead, the process can be automated.
  9272. *Be able to pass prompts on to the user.* On the other hand, some
  9273. userauth methods can be only _partially_ automated; some of the
  9274. server's prompts might still require human input. Also, the plugin
  9275. automating the authentication might need to ask its own questions
  9276. that are not provided by the SSH server. (For example, `please
  9277. enter the master key that the real response will be generated by
  9278. hashing'.) So after the plugin intercepts the server's questions, it
  9279. needs to be able to ask its own questions of the user, which may or
  9280. may not be the same questions sent by the server.
  9281. *Allow automatic generation of the username.* Sometimes, the
  9282. authentication method comes with a mechanism for discovering the
  9283. username to be used in the SSH login. So the plugin has to start up
  9284. early enough that the client hasn't committed to a username yet.
  9285. *Future expansion route to other SSH userauth flavours.* The initial
  9286. motivation for this protocol is specific to keyboard-interactive.
  9287. But other SSH authentication methods exist, and they may also
  9288. benefit from automation in future. We're making no attempt here to
  9289. predict what those methods might be or how they might be automated,
  9290. but we do need to leave a space where they can be slotted in later
  9291. if necessary.
  9292. *Minimal information loss.* Keyboard-interactive prompts and replies
  9293. should be passed to and from the plugin in a form as close as
  9294. possible to the way they look on the wire in SSH itself. Therefore,
  9295. the protocol resembles SSH in its data formats and marshalling
  9296. (instead of, for example, translating from SSH binary packet style
  9297. to another well-known format such as JSON, which would introduce
  9298. edge cases in character encoding).
  9299. *Half-duplex.* Simultaneously trying to read one I/O stream and
  9300. write another adds a lot of complexity to software. It becomes
  9301. necessary to have an organised event loop containing select or
  9302. WaitForMultipleObjects or similar, which can invoke the handler
  9303. for whichever event happens soonest. There's no need to add that
  9304. complexity in an application like this, which isn't transferring
  9305. large amounts of bulk data or multiplexing unrelated activities. So,
  9306. to keep life simple for plugin authors, we set the ground rule that
  9307. it must always be 100% clear which side is supposed to be sending a
  9308. message next. That way, the plugin can be written as sequential code
  9309. progressing through the protocol, making simple read and write calls
  9310. to receive or send each message.
  9311. *Communicate success/failure, to facilitate caching in the plugin.*
  9312. A plugin might want to cache recently used data for next time, but
  9313. only in the case where authentication using that data was actually
  9314. successful. So the client has to tell the plugin what the outcome
  9315. was, if it's known. (But this is best-effort only. Obviously the
  9316. plugin cannot _depend_ on hearing the answer, because any IPC
  9317. protocol at all carries the risk that the other end might crash or
  9318. be killed by things outside its control.)
  9319. H.2 Transport and configuration
  9320. Plugins are executable programs on the client platform.
  9321. The SSH client must be manually configured to use a plugin for
  9322. a particular connection. The configuration takes the form of a
  9323. command line, including the location of the plugin executable,
  9324. and optionally command-line arguments that are meaningful to the
  9325. particular plugin.
  9326. The client invokes the plugin as a subprocess, passing it a pair of
  9327. 8-bit-clean pipes as its standard input and output. On those pipes,
  9328. the client and plugin will communicate via the protocol specified
  9329. below.
  9330. H.3 Data formats and marshalling
  9331. This protocol borrows the low-level data formatting from SSH itself,
  9332. in particular the following wire encodings from [RFC4251] section 5:
  9333. *byte*
  9334. An integer between 0 and 0xFF inclusive, transmitted as a single
  9335. byte of binary data.
  9336. *boolean*
  9337. The values `true' or `false', transmitted as the bytes 1 and 0
  9338. respectively.
  9339. *uint32*
  9340. An integer between 0 and 0xFFFFFFFF inclusive, transmitted as 4
  9341. bytes of binary data, in big-endian (`network') byte order.
  9342. *string*
  9343. A sequence of bytes, preceded by a *uint32* giving the number of
  9344. bytes in the sequence. The length field does not include itself.
  9345. For example, the empty string is represented by four zero bytes
  9346. (the *uint32* encoding of 0); the string "AB" is represented by
  9347. the six bytes 0,0,0,2,'A','B'.
  9348. Unlike SSH itself, the protocol spoken between the client and the
  9349. plugin is unencrypted, because local inter-process pipes are assumed
  9350. to be secured by the OS kernel. So the binary packet protocol is
  9351. much simpler than SSH proper, and is similar to SFTP and the OpenSSH
  9352. agent protocol.
  9353. The data sent in each direction of the conversation consists of a
  9354. sequence of *messages* exchanged between the SSH client and the
  9355. plugin. Each message is encoded as a *string*. The contents of the
  9356. string begin with a *byte* giving the message type, which determines
  9357. the format of the rest of the message.
  9358. H.4 Protocol versioning
  9359. This protocol itself is versioned. At connection setup, the client
  9360. states the highest version number it knows how to speak, and then
  9361. the plugin responds by choosing the version number that will
  9362. actually be spoken (which may not be higher than the client's
  9363. value).
  9364. Including a version number makes it possible to make breaking
  9365. changes to the protocol later.
  9366. Even version numbers represent released versions of this spec.
  9367. Odd numbers represent drafts or development versions in between
  9368. releases. A client and plugin negotiating an odd version number
  9369. are not guaranteed to interoperate; the developer testing the
  9370. combination is responsible for ensuring the two are compatible.
  9371. This document describes version 2 of the protocol, the first
  9372. released version. (The initial drafts had version 1.)
  9373. H.5 Overview and sequence of events
  9374. At the very beginning of the user authentication phase of SSH, the
  9375. client launches the plugin subprocess, if one is configured. It
  9376. immediately sends the PLUGIN_INIT message, telling the plugin some
  9377. initial information about where the SSH connection is to.
  9378. The plugin responds with PLUGIN_INIT_RESPONSE, which may optionally
  9379. tell the SSH client what username to use.
  9380. The client begins trying to authenticate with the SSH server in the
  9381. usual way, using the username provided by the plugin (if any) or
  9382. alternatively one obtained via its normal (non-plugin) policy.
  9383. The client follows its normal policy for selecting authentication
  9384. methods to attempt. If it chooses a method that this protocol does
  9385. not cover, then the client will perform that method in its own way
  9386. without consulting the plugin.
  9387. However, if the client and server decide to attempt a method that
  9388. this protocol _does_ cover, then the client sends PLUGIN_PROTOCOL
  9389. specifying the SSH protocol id for the authentication method being
  9390. used. The plugin responds with PLUGIN_PROTOCOL_ACCEPT if it's
  9391. willing to assist with this auth method, or PLUGIN_PROTOCOL_REJECT
  9392. if it isn't.
  9393. If the plugin sends PLUGIN_PROTOCOL_REJECT, then the client will
  9394. proceed as if the plugin were not present. Later, if another auth
  9395. method is negotiated (either because this one failed, or because it
  9396. succeeded but the server wants multiple auth methods), the client
  9397. may send a further PLUGIN_PROTOCOL and try again.
  9398. If the plugin sends PLUGIN_PROTOCOL_ACCEPT, then a protocol segment
  9399. begins that is specific to that auth method, terminating in either
  9400. PLUGIN_AUTH_SUCCESS or PLUGIN_AUTH_FAILURE. After that, again, the
  9401. client may send a further PLUGIN_PROTOCOL.
  9402. Currently the only supported method is `keyboard-interactive',
  9403. defined in [RFC4256]. Once the client has announced this to the
  9404. server, the followup protocol is as follows:
  9405. Each time the server sends an SSH_MSG_USERAUTH_INFO_REQUEST message
  9406. requesting authentication responses from the user, the SSH client
  9407. translates the message into PLUGIN_KI_SERVER_REQUEST and passes it
  9408. on to the plugin.
  9409. At this point, the plugin may optionally send back
  9410. PLUGIN_KI_USER_REQUEST containing prompts to be presented
  9411. to the actual user. The client will reply with a matching
  9412. PLUGIN_KI_USER_RESPONSE after asking the user to reply to the
  9413. question(s) in the request message. The plugin can repeat this cycle
  9414. multiple times.
  9415. Once the plugin has all the information it needs to
  9416. respond to the server's authentication prompts, it sends
  9417. PLUGIN_KI_SERVER_RESPONSE back to the client, which translates it
  9418. into SSH_MSG_USERAUTH_INFO_RESPONSE to send on to the server.
  9419. After that, as described in [RFC4256], the server is free
  9420. to accept authentication, reject it, or send another
  9421. SSH_MSG_USERAUTH_INFO_REQUEST. Each SSH_MSG_USERAUTH_INFO_REQUEST is
  9422. dealt with in the same way as above.
  9423. If the server terminates keyboard-interactive authentication
  9424. with SSH_MSG_USERAUTH_SUCCESS or SSH_MSG_USERAUTH_FAILURE, the
  9425. client informs the plugin by sending either PLUGIN_AUTH_SUCCESS
  9426. or PLUGIN_AUTH_FAILURE. PLUGIN_AUTH_SUCCESS is sent when _that
  9427. particular authentication method_ was successful, regardless of
  9428. whether the SSH server chooses to request further authentication
  9429. afterwards: in particular, SSH_MSG_USERAUTH_FAILURE with the
  9430. `partial success' flag (see [RFC4252] section 5.1) translates into
  9431. PLUGIN_AUTH_SUCCESS.
  9432. The plugin's standard input will close when the client no longer
  9433. requires the plugin's services, for any reason. This could be
  9434. because authentication is complete (with overall success or overall
  9435. failure), or because the user has manually aborted the session in
  9436. mid-authentication, or because the client crashed.
  9437. H.6 Message formats
  9438. This section describes the format of every message in the protocol.
  9439. As described in section H.3, every message starts with the same two
  9440. fields:
  9441. - *uint32*: overall length of the message
  9442. - *byte*: message type.
  9443. The length field does not include itself, but does include the type
  9444. code.
  9445. The following subsections each give the format of the remainder of
  9446. the message, after the type code.
  9447. The type codes themselves are defined here:
  9448. #define PLUGIN_INIT 1
  9449. #define PLUGIN_INIT_RESPONSE 2
  9450. #define PLUGIN_PROTOCOL 3
  9451. #define PLUGIN_PROTOCOL_ACCEPT 4
  9452. #define PLUGIN_PROTOCOL_REJECT 5
  9453. #define PLUGIN_AUTH_SUCCESS 6
  9454. #define PLUGIN_AUTH_FAILURE 7
  9455. #define PLUGIN_INIT_FAILURE 8
  9456. #define PLUGIN_KI_SERVER_REQUEST 20
  9457. #define PLUGIN_KI_SERVER_RESPONSE 21
  9458. #define PLUGIN_KI_USER_REQUEST 22
  9459. #define PLUGIN_KI_USER_RESPONSE 23
  9460. If this protocol is extended to be able to assist with further
  9461. auth methods, their message type codes will also begin from 20,
  9462. overlapping the codes for keyboard-interactive.
  9463. H.6.1 PLUGIN_INIT
  9464. *Direction*: client to plugin
  9465. *When*: the first message sent at connection startup
  9466. *What happens next*: the plugin will send PLUGIN_INIT_RESPONSE or
  9467. PLUGIN_INIT_FAILURE
  9468. *Message contents after the type code*:
  9469. - *uint32*: the highest version number of this protocol that the
  9470. client knows how to speak.
  9471. - *string*: the hostname of the server. This will be the
  9472. _logical_ hostname, in cases where it differs from the physical
  9473. destination of the network connection. Whatever name would be
  9474. used by the SSH client to cache the server's host key, that's
  9475. the same name passed in this message.
  9476. - *uint32*: the port number on the server. (Together with the host
  9477. name, this forms a primary key identifying a particular server.
  9478. Port numbers may be vital because a single host can run two
  9479. unrelated SSH servers with completely different authentication
  9480. requirements, e.g. system sshd on port 22 and Gerrit on port
  9481. 29418.)
  9482. - *string*: the username that the client will use to log in, if
  9483. the plugin chooses not to override it. An empty string means
  9484. that the client has no opinion about this (and might, for
  9485. example, prompt the user).
  9486. H.6.2 PLUGIN_INIT_RESPONSE
  9487. *Direction*: plugin to client
  9488. *When*: response to PLUGIN_INIT
  9489. *What happens next*: the client will send PLUGIN_PROTOCOL, or
  9490. perhaps terminate the session (if no auth method is ever negotiated
  9491. that the plugin can help with)
  9492. *Message contents after the type code*:
  9493. - *uint32*: the version number of this protocol that the
  9494. connection will use. Must be no greater than the max version
  9495. number sent by the client in PLUGIN_INIT.
  9496. - *string*: the username that the plugin suggests the client use.
  9497. An empty string means that the plugin has no opinion and the
  9498. client should stick with the username it already had (or prompt
  9499. the user, if it had none).
  9500. H.6.3 PLUGIN_INIT_FAILURE
  9501. *Direction*: plugin to client
  9502. *When*: response to PLUGIN_INIT
  9503. *What happens next*: the session is over
  9504. *Message contents after the type code*:
  9505. - *string*: an error message to present to the user indicating why
  9506. the plugin was unable to start up.
  9507. H.6.4 PLUGIN_PROTOCOL
  9508. *Direction*: client to plugin
  9509. *When*: sent after PLUGIN_INIT_RESPONSE, or after a previous auth
  9510. phase terminates with PLUGIN_AUTH_SUCCESS or PLUGIN_AUTH_FAILURE
  9511. *What happens next*: the plugin will send PLUGIN_PROTOCOL_ACCEPT or
  9512. PLUGIN_PROTOCOL_REJECT
  9513. *Message contents after the type code*:
  9514. - *string*: the SSH protocol id of the auth method the client
  9515. intends to attempt. Currently the only method specified for use
  9516. in this protocol is `keyboard-interactive'.
  9517. H.6.5 PLUGIN_PROTOCOL_REJECT
  9518. *Direction*: plugin to client
  9519. *When*: sent after PLUGIN_PROTOCOL
  9520. *What happens next*: the client will either send another
  9521. PLUGIN_PROTOCOL or terminate the session
  9522. *Message contents after the type code*:
  9523. - *string*: an error message to present to the user, explaining
  9524. why the plugin cannot help with this authentication protocol.
  9525. An example might be `unable to open <config file>: <OS error
  9526. message>', if the plugin depends on some configuration that the
  9527. user has not set up.
  9528. If the plugin does not support this this particular
  9529. authentication protocol at all, this string should be left
  9530. blank, so that no message will be presented to the user at all.
  9531. H.6.6 PLUGIN_PROTOCOL_ACCEPT
  9532. *Direction*: plugin to client
  9533. *When*: sent after PLUGIN_PROTOCOL
  9534. *What happens next*: depends on the auth protocol agreed on. For
  9535. keyboard-interactive, the client will send PLUGIN_KI_SERVER_REQUEST
  9536. or PLUGIN_AUTH_SUCCESS or PLUGIN_AUTH_FAILURE. No other method is
  9537. specified.
  9538. *Message contents after the type code*: none.
  9539. H.6.7 PLUGIN_KI_SERVER_REQUEST
  9540. *Direction*: client to plugin
  9541. *When*: sent after PLUGIN_PROTOCOL, or after a previous
  9542. PLUGIN_KI_SERVER_RESPONSE, when the SSH server has sent
  9543. SSH_MSG_USERAUTH_INFO_REQUEST
  9544. *What happens next*: the plugin will send either
  9545. PLUGIN_KI_USER_REQUEST or PLUGIN_KI_SERVER_RESPONSE
  9546. *Message contents after the type code*: the exact contents of the
  9547. SSH_MSG_USERAUTH_INFO_REQUEST just sent by the server. See [RFC4256]
  9548. section 3.2 for details. The summary:
  9549. - *string*: name of this prompt collection (e.g. to use as a
  9550. dialog-box title)
  9551. - *string*: instructions to be displayed before this prompt
  9552. collection
  9553. - *string*: language tag (deprecated)
  9554. - *uint32*: number of prompts in this collection
  9555. - That many copies of:
  9556. - *string*: prompt (in UTF-8)
  9557. - *boolean*: whether the response to this prompt is safe to
  9558. echo to the screen
  9559. H.6.8 PLUGIN_KI_SERVER_RESPONSE
  9560. *Direction*: plugin to client
  9561. *When*: response to PLUGIN_KI_SERVER_REQUEST, perhaps after
  9562. one or more intervening pairs of PLUGIN_KI_USER_REQUEST and
  9563. PLUGIN_KI_USER_RESPONSE
  9564. *What happens next*: the client will send a further
  9565. PLUGIN_KI_SERVER_REQUEST, or PLUGIN_AUTH_SUCCESS or
  9566. PLUGIN_AUTH_FAILURE
  9567. *Message contents after the type code*: the exact contents of the
  9568. SSH_MSG_USERAUTH_INFO_RESPONSE that the client should send back to
  9569. the server. See [RFC4256] section 3.4 for details. The summary:
  9570. - *uint32*: number of responses (must match the `number of
  9571. prompts' field from the corresponding server request)
  9572. - That many copies of:
  9573. - *string*: response to the _n_th prompt (in UTF-8)
  9574. H.6.9 PLUGIN_KI_USER_REQUEST
  9575. *Direction*: plugin to client
  9576. *When*: response to PLUGIN_KI_SERVER_REQUEST, if the plugin cannot
  9577. answer the server's auth prompts without presenting prompts of its
  9578. own to the user
  9579. *What happens next*: the client will send PLUGIN_KI_USER_RESPONSE
  9580. *Message contents after the type code*: exactly the same as in
  9581. PLUGIN_KI_SERVER_REQUEST (see section H.6.7).
  9582. H.6.10 PLUGIN_KI_USER_RESPONSE
  9583. *Direction*: client to plugin
  9584. *When*: response to PLUGIN_KI_USER_REQUEST
  9585. *What happens next*: the plugin will send PLUGIN_KI_SERVER_RESPONSE,
  9586. or another PLUGIN_KI_USER_REQUEST
  9587. *Message contents after the type code*: exactly the same as in
  9588. PLUGIN_KI_SERVER_RESPONSE (see section H.6.8).
  9589. H.6.11 PLUGIN_AUTH_SUCCESS
  9590. *Direction*: client to plugin
  9591. *When*: sent after PLUGIN_KI_SERVER_RESPONSE, or (in unusual cases)
  9592. after PLUGIN_PROTOCOL_ACCEPT
  9593. *What happens next*: the client will either send another
  9594. PLUGIN_PROTOCOL or terminate the session
  9595. *Message contents after the type code*: none
  9596. H.6.12 PLUGIN_AUTH_FAILURE
  9597. *Direction*: client to plugin
  9598. *When*: sent after PLUGIN_KI_SERVER_RESPONSE, or (in unusual cases)
  9599. after PLUGIN_PROTOCOL_ACCEPT
  9600. *What happens next*: the client will either send another
  9601. PLUGIN_PROTOCOL or terminate the session
  9602. *Message contents after the type code*: none
  9603. H.7 References
  9604. [RFC4251] RFC 4251, `The Secure Shell (SSH) Protocol Architecture'.
  9605. [RFC4252] RFC 4252, `The Secure Shell (SSH) Authentication
  9606. Protocol'.
  9607. [RFC4256] RFC 4256, `Generic Message Exchange Authentication for the
  9608. Secure Shell Protocol (SSH)' (better known by its wire id `keyboard-
  9609. interactive').
  9610. Appendix I: PuTTY privacy considerations
  9611. ----------------------------------------
  9612. This appendix lists the implications of using PuTTY for your privacy
  9613. and personal data.
  9614. The short summary: PuTTY never `phones home' to us, the developers.
  9615. It does store data on your own computer, and it does transmit data
  9616. over the network, but in both cases, only as necessary to do its
  9617. job. In particular, data is only transmitted over the network to the
  9618. server you told PuTTY to connect to.
  9619. But if you're concerned about exactly _what_ information is stored
  9620. or transmitted, then here's a more detailed description.
  9621. I.1 Information that PuTTY stores locally
  9622. When you use PuTTY, it stores a small amount of information on
  9623. your computer, necessary for doing its own job. This information
  9624. is stored in the user account of the user who runs PuTTY, so it is
  9625. under your control: you can view it, change it, or delete it.
  9626. If you need to delete all of this data, you can use the `-cleanup'
  9627. command-line option, as described in section 3.11.2.
  9628. PuTTY does not transmit your saved session data to any other site.
  9629. However, you may need to be aware of the fact that it is stored on
  9630. _your_ computer. (For example, somebody else accessing your computer
  9631. might be able to find a list of sites you have connected to, if you
  9632. have saved details of them.)
  9633. I.1.1 Host key cache
  9634. If you use the SSH protocol, then PuTTY stores a list of the SSH
  9635. servers you have connected to, together with their host keys.
  9636. This is known as the `host key cache'. It is used to detect network
  9637. attacks, by notifying you if a server you've connected to before
  9638. doesn't look like the same one you thought it was. (See section 2.2
  9639. for a basic introduction to host keys.)
  9640. The host key cache is optional. An entry is only saved in the host
  9641. key cache if you select the `Accept' action at one of the PuTTY
  9642. suite's host key verification prompts. So if you want to make an SSH
  9643. connection without PuTTY saving any trace of where you connected to,
  9644. you can press `Connect Once' instead of `Accept', which does not
  9645. store the host key in the cache.
  9646. However, if you do this, PuTTY can't automatically detect the host
  9647. key changing in the future, so you should check the key fingerprint
  9648. yourself every time you connect. *This is vitally important.* If you
  9649. don't let PuTTY cache host keys _and_ don't check them yourself,
  9650. then it becomes easy for an attacker to interpose a listener between
  9651. you and the server you're connecting to. The entire cryptographic
  9652. system of SSH depends on making sure the host key is right.
  9653. The host key cache is only used by SSH. No other protocol supported
  9654. by PuTTY has any analogue of it.
  9655. I.1.2 Saved sessions
  9656. After you set up PuTTY's configuration for a particular network
  9657. connection, you can choose to save it as a `saved session', so that
  9658. you can make the same connection again later without having to re-
  9659. enter all the details.
  9660. PuTTY will not do this unless you use the `Save' button in
  9661. its configuration box. It never saves session configuration
  9662. automatically.
  9663. So if you want to make an SSH connection without leaving any trace
  9664. of where you connected to, you should not make a saved session for
  9665. that connection. Instead, re-enter the details by hand every time
  9666. you do it.
  9667. I.1.3 Jump list
  9668. On Windows, the operating system provides a feature called a `jump
  9669. list'. This is a menu that pops up from an application's icon in
  9670. the Windows taskbar, and the application can configure entries that
  9671. appear in it. Applications typically include menu items to re-launch
  9672. recently used documents or configurations.
  9673. PuTTY updates its jump list whenever a saved session is loaded,
  9674. either to launch it immediately or to load it within the
  9675. configuration dialog box. So if you have a collection of saved
  9676. sessions, the jump list will contain a record of which ones you have
  9677. recently used.
  9678. An exception is that saved sessions are not included in the jump
  9679. list if they are not `launchable', meaning that they actually
  9680. specify a host name or serial port to connect to. A non-launchable
  9681. session can specify all the other configuration details (such as
  9682. fonts, window size, keyboard setup, SSH features, etc), but leave
  9683. out the hostname.
  9684. If you want to avoid leaving any evidence of having made a
  9685. particular connection, then make the connection without creating
  9686. a launchable saved session for it: either make no saved session
  9687. at all, or create a non-launchable one which sets up every detail
  9688. _except_ the destination host name. Then it won't appear in the jump
  9689. list.
  9690. (The saved session itself would also be evidence, of course, as
  9691. discussed in the previous section.)
  9692. I.1.4 Log files
  9693. PuTTY can be configured to save a log file of your entire session
  9694. to the computer you run it on. By default it does not do so: the
  9695. content of your session is not saved.
  9696. See section 4.2 for details of the logging features. Some logging
  9697. modes store only output sent by the server and printed in PuTTY's
  9698. terminal window. Other more thorough modes also store your input
  9699. that PuTTY sends _to_ the server.
  9700. If the logging feature is enabled, then by default, PuTTY will avoid
  9701. saving data in the log file that it knows to be sensitive, such as
  9702. passwords. However, it cannot reliably identify _all_ passwords. If
  9703. you use a password for your initial login to an SSH server, PuTTY
  9704. knows that is a password, and will omit it from the log file. But if
  9705. after login you type a password into an application on the server,
  9706. then PuTTY will not know that _that_ is a password, so it will
  9707. appear in the log file, if PuTTY is writing a type that includes
  9708. keyboard input.
  9709. PuTTY can also be configured to include all passwords in its log
  9710. files, even the ones it would normally leave out. This is intended
  9711. for debugging purposes, for example if a server is refusing your
  9712. password and you need to check whether the password is being sent
  9713. correctly. We do not recommend enabling this option routinely.
  9714. I.1.5 Random seed file
  9715. PuTTY stores a small file of random bytes under the name
  9716. `putty.rnd', which is reloaded the next time it is run and used to
  9717. seed its random number generator. These bytes are meaningless and
  9718. random, and do not contain an encrypted version of anything.
  9719. I.2 Sending information over the network
  9720. PuTTY is a communications tool. Its _purpose_ is to connect to
  9721. another computer, over a network or a serial port, and send
  9722. information. However it only makes the network connections that its
  9723. configuration instructs it to.
  9724. I.2.1 PuTTY only connects to the specified destination host
  9725. No PuTTY tool will `phone home' to any site under the control of
  9726. us (the development team), or to any other site apart from the
  9727. destination host or proxy host in its configuration, and any DNS
  9728. server that is needed to look up the IP addresses corresponding to
  9729. those host names.
  9730. No information about your network sessions, and no information from
  9731. the computer you run PuTTY on, is collected or recorded by the PuTTY
  9732. developers.
  9733. Information you provide to PuTTY (via keyboard input, the command
  9734. line, or files loaded by the file transfer tools) is sent to the
  9735. server that PuTTY's configuration tells it to connect to. It is not
  9736. sent anywhere else.
  9737. I.2.2 What data is sent to the destination host
  9738. When you log in to a server, PuTTY will send your username. If you
  9739. use a password to authenticate to the server, PuTTY will send it
  9740. that password as well.
  9741. (Therefore, the server is told what your password is during login.
  9742. This means that if you use the same password on two servers, the
  9743. administrator of one could find out your password and log in to your
  9744. account on the other.)
  9745. If you use an SSH private key to authenticate, PuTTY will send the
  9746. _public_ key, but not the private key. If you typed a passphrase to
  9747. decrypt the private key, PuTTY will not send the passphrase either.
  9748. (Therefore, it is safer to use the same _public key_ to authenticate
  9749. to two SSH servers. Neither server gains the ability to impersonate
  9750. you to the other server. However, if the server maintainers talked
  9751. to each other, they would at least be able to find out that your
  9752. accounts on the two machines were owned by the same person, if they
  9753. didn't already know.)
  9754. When PuTTY prompts for a private key passphrase, a small copy of the
  9755. PuTTY icon appears to the left of the prompt, to indicate that the
  9756. prompt was genuinely from PuTTY. (We call this a `trust sigil'.)
  9757. That icon never appears next to text sent from the server. So if a
  9758. server tries to mimic that prompt to trick you into telling it your
  9759. private key passphrase, it won't be able to fake that trust sigil,
  9760. and you can tell the difference.
  9761. If you're running Pageant, and you haven't configured a specific
  9762. public key to authenticate to this server, then PuTTY will try
  9763. all the keys in Pageant one after the other, sending each public
  9764. key to the server to see if it's acceptable. This can lead to the
  9765. server finding out about other public keys you own. However, if you
  9766. configure PuTTY to use a specific public key, then it will ignore
  9767. all the other keys in Pageant.
  9768. Once you have logged in, keystrokes you type in the PuTTY terminal
  9769. window, and data you paste in with the mouse, are sent to the
  9770. destination host. That is PuTTY's primary job.
  9771. The server can request PuTTY to send details of mouse movements in
  9772. the terminal window, in order to implement mouse-controlled user
  9773. interfaces on the server. If you consider this to be a privacy
  9774. intrusion, you can turn off that terminal feature in the Features
  9775. configuration panel (`Disable xterm-style mouse reporting', as
  9776. described in section 4.6.2).
  9777. I.3 Configuration
  9778. The operation of a PuTTY network tool is controlled by its
  9779. configuration. This configuration is obtained from:
  9780. - the command line used to run the tool
  9781. - settings configured in the GUI before opening a network session
  9782. - optionally, the contents of a saved session, if the command line
  9783. or a GUI action instructed PuTTY to load one
  9784. - the special saved session called `Default Settings', which
  9785. applies if no other saved session is loaded
  9786. - defaults built in to PuTTY itself.
  9787. The defaults built in to PuTTY do not tell it to save log files, or
  9788. specify the name of any network site to connect to.
  9789. However, if PuTTY has been installed for you by somebody else,
  9790. such as an organisation, then that organisation may have provided
  9791. their own default configuration. In that situation you may wish
  9792. to check that the defaults they have set are compatible with your
  9793. privacy needs. For example, an organisation providing your PuTTY
  9794. configuration might configure PuTTY to save log files of your
  9795. sessions, even though PuTTY's own default is not to do so.
  9796. I.4 Modified versions of PuTTY
  9797. PuTTY is free software. Its source code is available, so anyone
  9798. can make a modified version of it. The modified version can behave
  9799. differently from the original in any way it likes.
  9800. This list of privacy considerations only applies to the original
  9801. version of PuTTY, as distributed by its development team. We
  9802. cannot make any promises about the behaviour of modified versions
  9803. distributed by other people.
  9804. [PuTTY release 0.83]