Connections and trust

Verify the host key

Confirm a new server fingerprint through an independent channel before accepting it.

9 minute lesson

~~~

Start from the behavior you can observe. The VPS console or provider metadata supplies a fingerprint that can be compared out of band.

The first-connection prompt cannot prove the key is correct by itself because the network presenting the host also presents the fingerprint. The useful target is not encyclopedic coverage. Make one deliberate choice, observe its consequences, and know which requirement would make you revise it.

It is tempting to type yes automatically because the hostname looks familiar. That trades a clear decision for an assumption you will eventually have to debug. The stronger move is to obtain the expected fingerprint independently, compare it exactly, and record the verified host identity. Make the boundary explicit in code and in the project notes.

Tie the decision back to the larger job: Connect to the intended host and know exactly which identity, network path, and trust decision made it possible. Record enough evidence that another developer can repeat the result without relying on your memory.

Create a new server, collect the fingerprint from its console, and verify it before the first SSH acceptance. Repeat it once with an invalid or hostile condition and write down the boundary the failure revealed.

Lesson completed

Take this course offline

Get every free book and course as PDF and EPUB files.

Get the download library →