📄 gs.but
字号:
\versionid $Id: gs.but,v 1.1.1.1.10.2 2004/12/29 11:32:20 pekangas Exp $\C{gs} Getting started with PuTTYThis chapter gives a quick guide to the simplest types ofinteractive login session using PuTTY.\H{gs-insecure} \ii{Starting a session}When you start PuTTY, you will see a dialog box. This dialog boxallows you to control everything PuTTY can do. See \k{config} fordetails of all the things you can control.You don't usually need to change most of the configuration options.To start the simplest kind of session, all you need to do is toenter a few basic parameters.In the \q{Host Name} box, enter the Internet host name of the serveryou want to connect to. You should have been told this by theprovider of your login account.Now select a login \i{protocol} to use, from the \q{Protocol}buttons. For a login session, you should select \i{Telnet},\i{Rlogin} or \i{SSH}. See \k{which-one} for a description of thedifferences between the three protocols, and advice on which one touse. The fourth protocol, \I{raw protocol}\e{Raw}, is not used forinteractive login sessions; you would usually use this for debuggingother Internet services (see \k{using-rawprot}).When you change the selected protocol, the number in the \q{Port}box will change. This is normal: it happens because the variouslogin services are usually provided on different network ports bythe server machine. Most servers will use the standard port numbers,so you will not need to change the port setting. If your serverprovides login services on a non-standard port, your systemadministrator should have told you which one. (For example, many\i{MUDs} run Telnet service on a port other than 23.)Once you have filled in the \q{Host Name}, \q{Protocol}, andpossibly \q{Port} settings, you are ready to connect. Press the\q{Open} button at the bottom of the dialog box, and PuTTY willbegin trying to connect you to the server.\H{gs-hostkey} \i{Verifying the host key} (SSH only)If you are not using the \i{SSH} protocol, you can skip thissection.If you are using SSH to connect to a server for the first time, youwill probably see a message looking something like this:\c The server's host key is not cached in the registry. You\c have no guarantee that the server is the computer you\c think it is.\c The server's rsa2 key fingerprint is:\c ssh-rsa 1024 7b:e5:6f:a7:f4:f9:81:62:5c:e3:1f:bf:8b:57:6c:5a\c If you trust this host, hit Yes to add the key to\c PuTTY's cache and carry on connecting.\c If you want to carry on connecting just once, without\c adding the key to the cache, hit No.\c If you do not trust this host, hit Cancel to abandon the\c connection.This is a feature of the SSH protocol. It is designed to protect youagainst a network attack known as \i\e{spoofing}: secretlyredirecting your connection to a different computer, so that yousend your password to the wrong machine. Using this technique, anattacker would be able to learn the password that guards your loginaccount, and could then log in as if they were you and use theaccount for their own purposes.To prevent this attack, each server has a unique identifying code,called a \e{host key}. These keys are created in a way that preventsone server from forging another server's key. So if you connect to aserver and it sends you a different host key from the one you wereexpecting, PuTTY can warn you that the server may have been switchedand that a spoofing attack might be in progress.PuTTY records the host key for each server you connect to, in theWindows \i{Registry}. Every time you connect to a server, it checksthat the host key presented by the server is the same host key as itwas the last time you connected. If it is not, you will see awarning, and you will have the chance to abandon your connectionbefore you type any private information (such as a password) intoit.However, when you connect to a server you have not connected tobefore, PuTTY has no way of telling whether the host key is theright one or not. So it gives the warning shown above, and asks youwhether you want to \I{trusting host keys}trust this host key ornot.Whether or not to trust the host key is your choice. If you areconnecting within a company network, you might feel that all thenetwork users are on the same side and spoofing attacks areunlikely, so you might choose to trust the key without checking it.If you are connecting across a hostile network (such as theInternet), you should check with your system administrator, perhapsby telephone or in person. (Some modern servers have more than onehost key. If the system administrator sends you more than onefingerprint, you should make sure the one PuTTY shows you is on thelist, but it doesn't matter which one it is.)\# FIXME: this is all very fine but of course in practice the worlddoesn't work that way. Ask the team if they have any good ideas forchanges to this section!\H{gs-login} \ii{Logging in}After you have connected, and perhaps verified the server's hostkey, you will be asked to log in, probably using a \i{username} anda \i{password}. Your system administrator should have provided youwith these. Enter the username and the password, and the servershould grant you access and begin your session. If you have\I{mistyping a password}mistyped your password, most servers willgive you several chances to get it right.If you are using SSH, be careful not to type your username wrongly,because you will not have a chance to correct it after you pressReturn; many SSH servers do not permit you to make two login attemptsusing \i{different usernames}. If you type your username wrongly, youmust close PuTTY and start again.If your password is refused but you are sure you have typed itcorrectly, check that Caps Lock is not enabled. Many login servers,particularly Unix computers, treat upper case and lower case asdifferent when checking your password; so if Caps Lock is on, yourpassword will probably be refused.\H{gs-session} After logging inAfter you log in to the server, what happens next is up to theserver! Most servers will print some sort of login message and thenpresent a \i{prompt}, at which you can type commands which theserver will carry out. Some servers will offer you on-line help;others might not. If you are in doubt about what to do next, consultyour system administrator.\H{gs-logout} \ii{Logging out}When you have finished your session, you should log out by typingthe server's own logout command. This might vary between servers; ifin doubt, try \c{logout} or \c{exit}, or consult a manual or yoursystem administrator. When the server processes your logout command,the PuTTY window should close itself automatically.You \e{can} close a PuTTY session using the \i{Close button} in thewindow border, but this might confuse the server - a bit likehanging up a telephone unexpectedly in the middle of a conversation.We recommend you do not do this unless the server has stoppedresponding to you and you cannot close the window any other way.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -