Sebastian Kuschel reports that pfd_closing can be called for a socket
[u/mdw/putty] / doc / gs.but
CommitLineData
39a938f7 1\define{versionidgs} \versionid $Id$
8f1529bc 2
e5b0d077 3\C{gs} Getting started with PuTTY
4
388f343b 5This chapter gives a quick guide to the simplest types of
6interactive login session using PuTTY.
7
6cc170f0 8\H{gs-insecure} \ii{Starting a session}
388f343b 9
421406a4 10When you start PuTTY, you will see a \i{dialog box}. This dialog box
388f343b 11allows you to control everything PuTTY can do. See \k{config} for
12details of all the things you can control.
13
14You don't usually need to change most of the configuration options.
15To start the simplest kind of session, all you need to do is to
16enter a few basic parameters.
17
421406a4 18In the \q{Host Name} box, enter the Internet \i{host name} of the server
388f343b 19you want to connect to. You should have been told this by the
20provider of your login account.
21
7374c779 22Now select a login \i{protocol} to use, from the \q{Connection type}
6cc170f0 23buttons. For a login session, you should select \i{Telnet},
24\i{Rlogin} or \i{SSH}. See \k{which-one} for a description of the
25differences between the three protocols, and advice on which one to
26use. The fourth protocol, \I{raw protocol}\e{Raw}, is not used for
27interactive login sessions; you would usually use this for debugging
7374c779 28other Internet services (see \k{using-rawprot}). The fifth option,
29\e{Serial}, is used for connecting to a local serial line, and works
30somewhat differently: see \k{using-serial} for more information on
31this.
388f343b 32
d60c975d 33When you change the selected protocol, the number in the \q{Port}
388f343b 34box will change. This is normal: it happens because the various
35login services are usually provided on different network ports by
36the server machine. Most servers will use the standard port numbers,
37so you will not need to change the port setting. If your server
38provides login services on a non-standard port, your system
39administrator should have told you which one. (For example, many
6cc170f0 40\i{MUDs} run Telnet service on a port other than 23.)
388f343b 41
d60c975d 42Once you have filled in the \q{Host Name}, \q{Protocol}, and
43possibly \q{Port} settings, you are ready to connect. Press the
44\q{Open} button at the bottom of the dialog box, and PuTTY will
388f343b 45begin trying to connect you to the server.
46
421406a4 47\H{gs-hostkey} \ii{Verifying the host key} (SSH only)
388f343b 48
6cc170f0 49If you are not using the \i{SSH} protocol, you can skip this
50section.
388f343b 51
52If you are using SSH to connect to a server for the first time, you
53will probably see a message looking something like this:
54
717c214c 55\c The server's host key is not cached in the registry. You
56\c have no guarantee that the server is the computer you
57\c think it is.
49b6c392 58\c The server's rsa2 key fingerprint is:
717c214c 59\c ssh-rsa 1024 7b:e5:6f:a7:f4:f9:81:62:5c:e3:1f:bf:8b:57:6c:5a
60\c If you trust this host, hit Yes to add the key to
61\c PuTTY's cache and carry on connecting.
62\c If you want to carry on connecting just once, without
63\c adding the key to the cache, hit No.
64\c If you do not trust this host, hit Cancel to abandon the
65\c connection.
388f343b 66
67This is a feature of the SSH protocol. It is designed to protect you
6cc170f0 68against a network attack known as \i\e{spoofing}: secretly
69redirecting your connection to a different computer, so that you
70send your password to the wrong machine. Using this technique, an
71attacker would be able to learn the password that guards your login
72account, and could then log in as if they were you and use the
73account for their own purposes.
388f343b 74
75To prevent this attack, each server has a unique identifying code,
76called a \e{host key}. These keys are created in a way that prevents
77one server from forging another server's key. So if you connect to a
78server and it sends you a different host key from the one you were
2f8d6d43 79expecting, PuTTY can warn you that the server may have been switched
388f343b 80and that a spoofing attack might be in progress.
81
82PuTTY records the host key for each server you connect to, in the
6cc170f0 83Windows \i{Registry}. Every time you connect to a server, it checks
84that the host key presented by the server is the same host key as it
85was the last time you connected. If it is not, you will see a
86warning, and you will have the chance to abandon your connection
87before you type any private information (such as a password) into
88it.
388f343b 89
90However, when you connect to a server you have not connected to
2f8d6d43 91before, PuTTY has no way of telling whether the host key is the
388f343b 92right one or not. So it gives the warning shown above, and asks you
6cc170f0 93whether you want to \I{trusting host keys}trust this host key or
94not.
388f343b 95
96Whether or not to trust the host key is your choice. If you are
97connecting within a company network, you might feel that all the
98network users are on the same side and spoofing attacks are
99unlikely, so you might choose to trust the key without checking it.
100If you are connecting across a hostile network (such as the
101Internet), you should check with your system administrator, perhaps
102by telephone or in person. (Some modern servers have more than one
103host key. If the system administrator sends you more than one
421406a4 104\I{host key fingerprint}fingerprint, you should make sure the one
105PuTTY shows you is on the list, but it doesn't matter which one it is.)
388f343b 106
107\# FIXME: this is all very fine but of course in practice the world
108doesn't work that way. Ask the team if they have any good ideas for
109changes to this section!
110
6cc170f0 111\H{gs-login} \ii{Logging in}
388f343b 112
113After you have connected, and perhaps verified the server's host
6cc170f0 114key, you will be asked to log in, probably using a \i{username} and
115a \i{password}. Your system administrator should have provided you
116with these. Enter the username and the password, and the server
117should grant you access and begin your session. If you have
118\I{mistyping a password}mistyped your password, most servers will
119give you several chances to get it right.
388f343b 120
121If you are using SSH, be careful not to type your username wrongly,
122because you will not have a chance to correct it after you press
49b6c392 123Return; many SSH servers do not permit you to make two login attempts
124using \i{different usernames}. If you type your username wrongly, you
125must close PuTTY and start again.
388f343b 126
127If your password is refused but you are sure you have typed it
128correctly, check that Caps Lock is not enabled. Many login servers,
129particularly Unix computers, treat upper case and lower case as
130different when checking your password; so if Caps Lock is on, your
131password will probably be refused.
132
6cc170f0 133\H{gs-session} After logging in
388f343b 134
135After you log in to the server, what happens next is up to the
136server! Most servers will print some sort of login message and then
421406a4 137present a \i{prompt}, at which you can type
138\I{commands on the server}commands which the
6cc170f0 139server will carry out. Some servers will offer you on-line help;
140others might not. If you are in doubt about what to do next, consult
141your system administrator.
388f343b 142
6cc170f0 143\H{gs-logout} \ii{Logging out}
388f343b 144
145When you have finished your session, you should log out by typing
146the server's own logout command. This might vary between servers; if
147in doubt, try \c{logout} or \c{exit}, or consult a manual or your
148system administrator. When the server processes your logout command,
2f8d6d43 149the PuTTY window should close itself automatically.
388f343b 150
6cc170f0 151You \e{can} close a PuTTY session using the \i{Close button} in the
388f343b 152window border, but this might confuse the server - a bit like
153hanging up a telephone unexpectedly in the middle of a conversation.
154We recommend you do not do this unless the server has stopped
155responding to you and you cannot close the window any other way.