📄 faq.but
字号:
C at least have stopped being backwards compatible to Win32s. Also,the last time we tried this it didn't work very well.If you're interested in running PuTTY under Windows 3.1, help andtesting in this area would be very welcome!\S{faq-mac-port}{Question} Will there be a port to the Mac?There is a port to the Mac OS in progress. It's just about usable, buthas an awful lot of gaps and rough edges that will need cleaning upbefore release (such as useful random numbers).A separate port to Mac OS X is also underway.\S{faq-epoc}{Question} Will there be a port to EPOC?I hope so, but given that ports aren't really progressing very fasteven on systems the developers \e{do} already know how to programfor, it might be a long time before any of us get round to learninga new system and doing the port for that.However, some of the work has been done by other people, and a betaport of PuTTY for the Nokia 9200 Communicator series is availablefrom \W{http://s2putty.sourceforge.net/}\cw{http://s2putty.sourceforge.net/}\H{faq-embedding} Embedding PuTTY in other programs\S{faq-dll}{Question} Is the SSH or Telnet code available as a DLL?No, it isn't. It would take a reasonable amount of rewriting forthis to be possible, and since the PuTTY project itself doesn'tbelieve in DLLs (they make installation more error-prone) none of ushas taken the time to do it.Most of the code cleanup work would be a good thing to happen ingeneral, so if anyone feels like helping, we wouldn't say no.\S{faq-vb}{Question} Is the SSH or Telnet code available as a VisualBasic component?No, it isn't. None of the PuTTY team uses Visual Basic, and none ofus has any particular need to make SSH connections from a VisualBasic application. In addition, all the preliminary work to turn itinto a DLL would be necessary first; and furthermore, we don't evenknow how to write VB components.If someone offers to do some of this work for us, we might considerit, but unless that happens I can't see VB integration beinganywhere other than the very bottom of our priority list.\S{faq-ipc}{Question} How can I use PuTTY to make an SSH connectionfrom within another program?Probably your best bet is to use Plink, the command-line connectiontool. If you can start Plink as a second Windows process, andarrange for your primary process to be able to send data to thePlink process, and receive data from it, through pipes, then youshould be able to make SSH connections from your program.This is what CVS for Windows does, for example.\H{faq-details} Details of PuTTY's operation\S{faq-term}{Question} What terminal type does PuTTY use?For most purposes, PuTTY can be considered to be an \cw{xterm}terminal.PuTTY also supports some terminal control sequences not supported bythe real \cw{xterm}: notably the Linux console sequences thatreconfigure the colour palette, and the title bar control sequencesused by \cw{DECterm} (which are different from the \cw{xterm} ones;PuTTY supports both).By default, PuTTY announces its terminal type to the server as\c{xterm}. If you have a problem with this, you can reconfigure itto say something else; \c{vt220} might help if you have trouble.\S{faq-settings}{Question} Where does PuTTY store its data?On Windows, PuTTY stores most of its data (saved sessions, SSH hostkeys) in the Registry. The precise location is\c HKEY_CURRENT_USER\Software\SimonTatham\PuTTYand within that area, saved sessions are stored under \c{Sessions}while host keys are stored under \c{SshHostKeys}.PuTTY also requires a random number seed file, to improve theunpredictability of randomly chosen data needed as part of the SSHcryptography. This is stored by default in your Windows homedirectory (\c{%HOMEDRIVE%\\%HOMEPATH%}), or in the actual Windowsdirectory (such as \c{C:\\WINDOWS}) if the home directory doesn'texist, for example if you're using Win95. If you want to change thelocation of the random number seed file, you can put your chosenpathname in the Registry, at\c HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\RandSeedFileOn Unix, PuTTY stores all of this data in a directory \cw{~/.putty}.\H{faq-howto} HOWTO questions\S{faq-startmax}{Question} How can I make PuTTY start up maximised?Create a Windows shortcut to start PuTTY from, and set it as \q{RunMaximized}.\S{faq-startsess}{Question} How can I create a Windows shortcut tostart a particular saved session directly?To run a PuTTY session saved under the name \q{\cw{mysession}},create a Windows shortcut that invokes PuTTY with a command linelike\c \path\name\to\putty.exe -load mysession(Note: prior to 0.53, the syntax was \c{@session}. This is nowdeprecated and may be removed at some point.)\S{faq-startssh}{Question} How can I start an SSH session straightfrom the command line?Use the command line \c{putty -ssh host.name}. Alternatively, createa saved session that specifies the SSH protocol, and start the savedsession as shown in \k{faq-startsess}.\S{faq-cutpaste}{Question} How do I copy and paste between PuTTY andother Windows applications?Copy and paste works similarly to the X Window System. You use theleft mouse button to select text in the PuTTY window. The act ofselection \e{automatically} copies the text to the clipboard: thereis no need to press Ctrl-Ins or Ctrl-C or anything else. In fact,pressing Ctrl-C will send a Ctrl-C character to the other end ofyour connection (just like it does the rest of the time), which mayhave unpleasant effects. The \e{only} thing you need to do, to copytext to the clipboard, is to select it.To paste the clipboard contents into a PuTTY window, by default youclick the right mouse button. If you have a three-button mouse andare used to X applications, you can configure pasting to be done bythe middle button instead, but this is not the default because mostWindows users don't have a middle button at all.You can also paste by pressing Shift-Ins.\S{faq-options}{Question} How do I use all PuTTY's features (publickeys, proxying, cipher selection, etc.) in PSCP, PSFTP and Plink?Most major features (e.g., public keys, port forwarding) are availablethrough command line options. See the documentation.Not all features are accessible from the command line yet, althoughwe'd like to fix this. In the meantime, you can use most ofPuTTY's features if you create a PuTTY saved session, and then usethe name of the saved session on the command line in place of ahostname. This works for PSCP, PSFTP and Plink (but don't expectport forwarding in the file transfer applications!).\S{faq-pscp}{Question} How do I use PSCP.EXE? When I double-click itgives me a command prompt window which then closes instantly.PSCP is a command-line application, not a GUI application. If yourun it without arguments, it will simply print a help message andterminate.To use PSCP properly, run it from a Command Prompt window. See\k{pscp} in the documentation for more details.\S{faq-pscp-spaces}{Question} How do I use PSCP to copy a file whosename has spaces in?If PSCP is using the traditional SCP protocol, this is confusing. Ifyou're specifying a file at the local end, you just use one set ofquotes as you would normally do:\c pscp "local filename with spaces" user@host:\c pscp user@host:myfile "local filename with spaces"But if the filename you're specifying is on the \e{remote} side, youhave to use backslashes and two sets of quotes:\c pscp user@host:"\"remote filename with spaces\"" local_filename\c pscp local_filename user@host:"\"remote filename with spaces\""Worse still, in a remote-to-local copy you have to specify the localfile name explicitly, otherwise PSCP will complain that they don'tmatch (unless you specified the \c{-unsafe} option). The followingcommand will give an error message:\c c:\>pscp user@host:"\"oo er\"" .\c warning: remote host tried to write to a file called 'oo er'\c when we requested a file called '"oo er"'.Instead, you need to specify the local file name in full:\c c:\>pscp user@host:"\"oo er\"" "oo er"If PSCP is using the newer SFTP protocol, none of this is a problem,and all filenames with spaces in are specified using a single pairof quotes in the obvious way:\c pscp "local file" user@host:\c pscp user@host:"remote file" .\H{faq-trouble} Troubleshooting\S{faq-incorrect-mac}{Question} Why do I see \q{Incorrect MACreceived on packet}?One possible cause of this that used to be common is a bug in oldSSH 2 servers distributed by \cw{ssh.com}. (This is not the onlypossible cause; see \k{errors-crc} in the documentation.)Version 2.3.0 and below of their SSH 2 serverconstructs Message Authentication Codes in the wrong way, andexpects the client to construct them in the same wrong way. PuTTYconstructs the MACs correctly by default, and hence these oldservers will fail to work with it.If you are using PuTTY version 0.52 or better, this should workautomatically: PuTTY should detect the buggy servers from theirversion number announcement, and automatically start to constructits MACs in the same incorrect manner as they do, so it will be ableto work with them.If you are using PuTTY version 0.51 or below, you can enable theworkaround by going to the SSH panel and ticking the box labelled\q{Imitate SSH 2 MAC bug}. It's possible that you might have to dothis with 0.52 as well, if a buggy server exists that PuTTY doesn'tknow about.In this context MAC stands for Message Authentication Code. It's acryptographic term, and it has nothing at all to do with EthernetMAC (Media Access Control) addresses.\S{faq-pscp-protocol}{Question} Why do I see \q{Fatal: Protocolerror: Expected control record} in PSCP?This happens because PSCP was expecting to see data from the serverthat was part of the PSCP protocol exchange, and instead it saw datathat it couldn't make any sense of at all.This almost always happens because the startup scripts in youraccount on the server machine are generating output. This isimpossible for PSCP, or any other SCP client, to work around. Youshould never use startup files (\c{.bashrc}, \c{.cshrc} and so on)which generate output in non-interactive sessions.This is not actually a PuTTY problem. If PSCP fails in this way,then all other SCP clients are likely to fail in exactly the sameway. The problem is at the server end.\S{faq-colours}{Question} I clicked on a colour in the Colourspanel, and the colour didn't change in my terminal.That isn't how you're supposed to use the Colours panel.During the course of a session, PuTTY potentially uses \e{all} thecolours listed in the Colours panel. It's not a question of usingonly one of them and you choosing which one; PuTTY will use them\e{all}. The purpose of the Colours panel is to let you adjust theappearance of all the colours. So to change the colour of thecursor, for example, you would select \q{Cursor Colour}, press the\q{Modify} button, and select a new colour from the dialog box thatappeared. Similarly, if you want your session to appear in green,you should select \q{Default Foreground} and press \q{Modify}.Clicking on \q{ANSI Green} won't turn your session green; it willonly allow you to adjust the \e{shade} of green used when PuTTY isinstructed by the server to display green text.\S{faq-winsock2}{Question} Plink on Windows 95 says it can't find\cw{WS2_32.DLL}.Plink requires the extended Windows network library, WinSock version2. This is installed as standard on Windows 98 and above, and onWindows NT, and even on later versions of Windows 95; but earlyWin95 installations don't have it.In order to use Plink on these systems, you will need to downloadthe\W{http://www.microsoft.com/windows95/downloads/contents/wuadmintools/s_wunetworkingtools/w95sockets2/}{WinSock 2 upgrade}:\c http://www.microsoft.com/windows95/downloads/contents/\c wuadmintools/s_wunetworkingtools/w95sockets2/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -