📄 config.but
字号:
\versionid $Id: config.but,v 1.1.1.4.2.2 2004/12/29 11:32:19 pekangas Exp $\C{config} Configuring PuTTYThis chapter describes all the configuration options in PuTTY.PuTTY is configured using the control panel that comes up before youstart a session. Some options can also be changed in the middle of asession, by selecting \q{Change Settings} from the window menu.\H{config-session} The Session panelThe Session configuration panel contains the basic options you needto specify in order to open a session at all, and also allows you tosave your settings to be reloaded later.\S{config-hostname} The host name section\cfg{winhelp-topic}{session.hostname}The top box on the Session panel, labelled \q{Specify yourconnection by host name}, contains the details that need to befilled in before PuTTY can open a session at all.\b The \q{Host Name} box is where you type the name, or the IPaddress, of the server you want to connect to.\b The \q{Protocol} radio buttons let you choose what type ofconnection you want to make: a raw connection, a Telnet connection, anrlogin connection or an SSH connection. (See \k{which-one} for asummary of the differences between SSH, Telnet and rlogin, and\k{using-rawprot} for an explanation of \q{raw} connections.)\b The \q{Port} box lets you specify which port number on the serverto connect to. If you select Telnet, Rlogin, or SSH, this box willbe filled in automatically to the usual value, and you will onlyneed to change it if you have an unusual server. If you select Rawmode, you will almost certainly need to fill in the \q{Port} box.\S{config-saving} Loading and storing saved sessions\cfg{winhelp-topic}{session.saved}The next part of the Session configuration panel allows you to saveyour preferred PuTTY options so they will appear automatically thenext time you start PuTTY. It also allows you to create \e{savedsessions}, which contain a full set of configuration options plus ahost name and protocol. A saved session contains all the informationPuTTY needs to start exactly the session you want.\b To save your default settings: first set up the settings the wayyou want them saved. Then come back to the Session panel. Select the\q{Default Settings} entry in the saved sessions list, with a singleclick. Then press the \q{Save} button.Note that PuTTY does not allow you to save a host name into theDefault Settings entry. This ensures that when PuTTY is started up,the host name box is always empty, so a user can always just type ina host name and connect.If there is a specific host you want to store the details of how toconnect to, you should create a saved session, which will beseparate from the Default Settings.\b To save a session: first go through the rest of the configurationbox setting up all the options you want. Then come back to theSession panel. Enter a name for the saved session in the \q{SavedSessions} input box. (The server name is often a good choice for asaved session name.) Then press the \q{Save} button. Your savedsession name should now appear in the list box.\b To reload a saved session: single-click to select the sessionname in the list box, and then press the \q{Load} button. Your savedsettings should all appear in the configuration panel.\b To modify a saved session: first load it as described above. Thenmake the changes you want. Come back to the Session panel, and pressthe \q{Save} button. The new settings will be saved over the top ofthe old ones\lcont{To save the new settings under a different name, you can enter the newname in the \q{Saved Sessions} box, or single-click to select asession name in the list box to overwrite that session. To save\q{Default Settings}, you must single-click the name before saving.}\b To start a saved session immediately: double-click on the sessionname in the list box.\b To delete a saved session: single-click to select the sessionname in the list box, and then press the \q{Delete} button.Each saved session is independent of the Default Settingsconfiguration. If you change your preferences and update DefaultSettings, you must also update every saved session separately.Saved sessions are stored in the Registry, at the location\c HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\SessionsIf you need to store them in a file, you could try the methoddescribed in \k{config-file}.\S{config-closeonexit} \q{Close Window on Exit}\cfg{winhelp-topic}{session.coe}Finally in the Session panel, there is an option labelled \q{CloseWindow on Exit}. This controls whether the PuTTY session windowdisappears as soon as the session inside it terminates. If you arelikely to want to copy and paste text out of the session after ithas terminated, or restart the session, you should arrange for thisoption to be off.\q{Close Window On Exit} has three settings. \q{Always} means alwaysclose the window on exit; \q{Never} means never close on exit(always leave the window open, but \I{inactive window}inactive). Thethird setting, and the default one, is \q{Only on clean exit}. In thismode, a session which terminates normally will cause its window toclose, but one which is aborted unexpectedly by network trouble or aconfusing message from the server will leave the window up.\H{config-logging} The Logging panel\cfg{winhelp-topic}{logging.main}The Logging configuration panel allows you to save log files of yourPuTTY sessions, for debugging, analysis or future reference.The main option is a radio-button set that specifies whether PuTTYwill log anything at all. The options are\b \q{Logging turned off completely}. This is the default option; inthis mode PuTTY will not create a log file at all.\b \q{Log printable output only}. In this mode, a log file will becreated and written to, but only printable text will be saved intoit. The various terminal control codes that are typically sent downan interactive session alongside the printable text will be omitted.This might be a useful mode if you want to read a log file in a texteditor and hope to be able to make sense of it.\b \q{Log all session output}. In this mode, \e{everything} sent bythe server into your terminal session is logged. If you view the logfile in a text editor, therefore, you may well find it full ofstrange control characters. This is a particularly useful mode ifyou are experiencing problems with PuTTY's terminal handling: youcan record everything that went to the terminal, so that someoneelse can replay the session later in slow motion and watch to seewhat went wrong.\b \q{Log SSH packet data}. In this mode (which is only used by SSHconnections), the SSH message packets sent over the encryptedconnection are written to the log file. You might need this to debuga network-level problem, or more likely to send to the PuTTY authorsas part of a bug report. \e{BE WARNED} that if you log in using apassword, the password can appear in the log file; see\k{config-logssh} for options that may help to remove sensitivematerial from the log file before you send it to anyone else.\S{config-logfilename} \q{Log file name}\cfg{winhelp-topic}{logging.filename}In this edit box you enter the name of the file you want to log thesession to. The \q{Browse} button will let you look around your filesystem to find the right place to put the file; or if you alreadyknow exactly where you want it to go, you can just type a pathnameinto the edit box.There are a few special features in this box. If you use the \c{&}character in the file name box, PuTTY will insert details of thecurrent session in the name of the file it actually opens. Theprecise replacements it will do are:\b \c{&Y} will be replaced by the current year, as four digits.\b \c{&M} will be replaced by the current month, as two digits.\b \c{&D} will be replaced by the current day of the month, as twodigits.\b \c{&T} will be replaced by the current time, as six digits(HHMMSS) with no punctuation.\b \c{&H} will be replaced by the host name you are connecting to.For example, if you enter the host name\c{c:\\puttylogs\\log-&h-&y&m&d-&t.dat}, you will end up with files lookinglike\c log-server1.example.com-20010528-110859.dat\c log-unixbox.somewhere.org-20010611-221001.dat\S{config-logfileexists} \q{What to do if the log file already exists}\cfg{winhelp-topic}{logging.exists}This control allows you to specify what PuTTY should do if it triesto start writing to a log file and it finds the file already exists.You might want to automatically destroy the existing log file andstart a new one with the same name. Alternatively, you might want toopen the existing log file and add data to the \e{end} of it.Finally (the default option), you might not want to have anyautomatic behaviour, but to ask the user every time the problemcomes up.\S{config-logssh} Options specific to SSH packet loggingThese options only apply if SSH packet data is being logged.The following options allow particularly sensitive portions ofunencrypted packets to be automatically left out of the log file.They are only intended to deter casual nosiness; an attacker couldglean a lot of useful information from even these obfuscated logs(e.g., length of password).\S2{config-logssh-omitpw} \q{Omit known password fields}\cfg{winhelp-topic}{logging.ssh.omitpassword}When checked, password fields are removed from the log of transmittedpackets. (This includes any user responses to challenge-responseauthentication methods such as \q{keyboard-interactive}.) This doesnot include X11 authentication data if using X11 forwarding.Note that this will only omit data that PuTTY \e{knows} to be apassword. However, if you start another login session within yourPuTTY session, for instance, any password used will appear in theclear in the packet log. The next option may be of use to protectagainst this.This option is enabled by default.\S2{config-logssh-omitdata} \q{Omit session data}\cfg{winhelp-topic}{logging.ssh.omitdata}When checked, all \q{session data} is omitted; this is defined as datain terminal sessions and in forwarded channels (TCP, X11, andauthentication agent). This will usually substantially reduce the sizeof the resulting log file.This option is disabled by default.\H{config-terminal} The Terminal panelThe Terminal configuration panel allows you to control the behaviourof PuTTY's terminal emulation.\S{config-autowrap} \q{Auto wrap mode initially on}\cfg{winhelp-topic}{terminal.autowrap}Auto wrap mode controls what happens when text printed in a PuTTYwindow reaches the right-hand edge of the window.With auto wrap mode on, if a long line of text reaches theright-hand edge, it will wrap over on to the next line so you canstill see all the text. With auto wrap mode off, the cursor willstay at the right-hand edge of the screen, and all the characters inthe line will be printed on top of each other.If you are running a full-screen application and you occasionallyfind the screen scrolling up when it looks as if it shouldn't, youcould try turning this option off.Auto wrap mode can be turned on and off by control sequences sent bythe server. This configuration option controls the \e{default}state, which will be restored when you reset the terminal (see\k{reset-terminal}). However, if you modify this option inmid-session using \q{Change Settings}, it will take effectimmediately.\S{config-decom} \q{DEC Origin Mode initially on}\cfg{winhelp-topic}{terminal.decom}DEC Origin Mode is a minor option which controls how PuTTYinterprets cursor-position control sequences sent by the server.The server can send a control sequence that restricts the scrollingregion of the display. For example, in an editor, the server mightreserve a line at the top of the screen and a line at the bottom,and might send a control sequence that causes scrolling operationsto affect only the remaining lines.With DEC Origin Mode on, cursor coordinates are counted from the topof the scrolling region. With it turned off, cursor coordinates arecounted from the top of the whole screen regardless of the scrollingregion.It is unlikely you would need to change this option, but if you finda full-screen application is displaying pieces of text in what lookslike the wrong part of the screen, you could try turning DEC OriginMode on to see whether that helps.DEC Origin Mode can be turned on and off by control sequences sentby the server. This configuration option controls the \e{default}state, which will be restored when you reset the terminal (see\k{reset-terminal}). However, if you modify this option inmid-session using \q{Change Settings}, it will take effectimmediately.\S{config-crlf} \q{Implicit CR in every LF}\cfg{winhelp-topic}{terminal.lfhascr}Most servers send two control characters, CR and LF, to start a newline of the screen. The CR character makes the cursor return to theleft-hand side of the screen. The LF character makes the cursor moveone line down (and might make the screen scroll).Some servers only send LF, and expect the terminal to move thecursor over to the left automatically. If you come across a server
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -