The PuTTY SSH client: what happens between click and prompt

Typing a host name and pressing Open hides four separate steps. Knowing them turns most connection failures from mysteries into a single obvious fix, which is why this page walks the handshake before it walks the settings.

Four steps in every SSH session

  1. TCP reaches the host. Your Windows machine opens a socket to port 22. A refused or timed-out connection never gets past this step, and the cause is networking, not SSH.
  2. The server proves its identity. It presents a host key; PuTTY compares the fingerprint with its cache and shows the security alert if there is no match.
  3. You prove yours. Password, public key, or keyboard-interactive with a one-time code.
  4. A channel opens. Usually an interactive shell, but it may equally be a port forward or a file-transfer subsystem.
Diagram showing a private key on a Windows laptop proving identity to a locked remote server
Public-key login: the private key stays on your PC and never crosses the wire.

Settings that matter on the SSH branch

Password or key?

Passwords are fine for a machine you touch twice a year. For anything you connect to weekly, generate a key pair in PuTTYgen, upload the public half, and load the private half into Pageant at logon. It is faster to use and far harder to brute force. The full procedure is in how to use SSH keys with PuTTY.

Security habits for Windows operators

When PuTTY refuses to connect

Match the message to a cause rather than retrying blindly: "Network error: Connection refused" means nothing is listening; "Connection timed out" means a firewall swallowed the packets; "Server refused our key" means the public key is missing or has the wrong permissions on the server. The PuTTY connection error reference works through each one.

SSH questions from Windows desks

What does the security alert about the server host key mean?
PuTTY has never seen this server's fingerprint before, or the fingerprint changed. Compare it with a value you obtained from the server owner before accepting it.
Which port does PuTTY use for SSH?
TCP port 22 by default. If your provider moved the service, type the alternate port in the Port box on the Session screen before connecting.
Can PuTTY use an OpenSSH private key file?
Not directly. Load the OpenSSH key into PuTTYgen and save it as a .ppk file, which is the format PuTTY and Pageant expect.
Why does my session freeze after a few minutes of inactivity?
A firewall or NAT device dropped the idle TCP flow. Setting a keepalive of 30 seconds under Connection usually solves it.