Skip to main content

Verify an Ubuntu SSH host key before signing in

· 7 min read
OmmLabs · Sponsored by Omm Rudraksha

An SSH address tells an application where to connect. The host key helps it check which server answered. Before you type an Ubuntu password into Server App Manager, the first-run screen asks you to verify that host identity.

This guide explains that decision using a sample endpoint. It covers the dashboard's current password-based source preview and the information to request from a server administrator. It does not ask you to change an SSH service or accept an unexplained key.

Separate the credentials you are looking at​

Three things can appear in an SSH discussion: the account password, a user's login key and the server's host key. They serve different purposes.

The password is a credential for the Ubuntu account. A user's SSH login key pair is another possible account authentication method. A server host key belongs to the endpoint answering the connection and is used when checking that endpoint's identity.

A fingerprint is a compact representation of a key. It is useful for comparison, but a displayed fingerprint does not establish trust on its own. You still need a trusted expected value for the intended machine. The first connection is where that independent information matters most.

Obtain the expected fingerprint first​

Ask the server owner for the host-key type and SHA-256 fingerprint through a channel you already trust. A hosting-provider console or an established administrator contact can provide that reference.

Confirm which environment the information describes. An organization can have a test VM, production VM and replacement VM behind similar names. Record the intended hostname and SSH port alongside the fingerprint so that the reference is connected to a particular endpoint.

Do not use a screenshot sent by an unknown contact as your only authority. Likewise, retrieving a key over the same unverified network path only tells you what that path currently presents. It does not independently establish that the responder is the server you intend to manage.

Inspect a public host key from a trusted console​

An authorized administrator can inspect the public host-key file for the algorithm involved. For an Ed25519 host key, a typical read-only command is:

ssh-keygen -lf /etc/ssh/ssh_host_ed25519_key.pub

This reads a public key file and displays its fingerprint. The path is an example for that key type; use the actual public host-key file on the intended machine. Keep this console access independent of the unverified connection you are checking.

The OpenSSH ssh-keygen manual documents fingerprint display and hash selection. You do not need to generate a new key to inspect an existing public key's fingerprint. Avoid exposing or copying the server's private host-key file during this task.

Match the key type as well as the value​

A server can have more than one host key. A fingerprint for an RSA key will not match a fingerprint for an Ed25519 key, even when both keys belong to the same machine.

Read the type shown by the dashboard, then compare it with the trusted reference for that type. If your administrator supplied only another algorithm, ask for the corresponding reference rather than deciding that the mismatch is harmless.

Check the complete SHA-256 value. Comparing only the first few characters creates unnecessary ambiguity. If you are moving the reference between systems, watch for line wrapping, truncation and accidental spaces introduced by a message or screenshot.

Enter the same endpoint you verified​

In the dashboard, enter a value such as user@server.example.com. For an existing custom SSH port, use the dashboard's documented user@server.example.com:2222 format.

Confirm all three endpoint components: username, host and port. A website's HTTPS port and an ASP.NET application's internal listening port are not automatically SSH ports.

The username selects the Ubuntu account, while the host key identifies the answering SSH endpoint. You can therefore get a correct host fingerprint and still enter an incorrect account name. Treat these as distinct checks when diagnosing an unsuccessful sign-in.

Read the first-run confirmation carefully​

The source preview first obtains the host identity without attempting password authentication. After you confirm the fingerprint, it verifies the confirmed key again during the password connection.

If the reference matches completely, confirm the trust step and then enter the account password. A successful first sign-in saves the registration locally. If authentication fails, that failure is about account access or policy; it should not be “fixed” by weakening host verification.

Use the connection guide for the current screen flow. Product behavior can change between source revisions, so include the application revision when reporting a trust-screen problem.

Understand what gets remembered​

Server App Manager keeps the saved server profile in local state. Later sign-ins check the saved key rather than silently replacing it with whatever a connection presents.

This local profile is separate from the host records maintained by Windows OpenSSH. Trusting an endpoint in one client does not mean every other client has adopted that decision.

When comparing a terminal test with the dashboard, identify which trust record each one uses. The OpenSSH client configuration manual describes its own host-key checking behavior and known-hosts settings. Those settings should not be assumed to control the dashboard's SSH implementation.

Investigate a changed key before entering credentials​

A key can legitimately change after a machine rebuild or a planned host-key rotation. A hostname can also resolve to another host, an address can be reassigned, or a connection can reach the wrong endpoint.

The visible mismatch alone does not distinguish those causes. Stop the sign-in attempt and ask the server owner to confirm what changed. Obtain the replacement fingerprint through the trusted channel again.

Record the old endpoint, expected environment, time of the change and verified new identity. This gives the next operator a clear explanation instead of a vague note that a warning was ignored during an incident.

Keep recovery separate from guessing​

If a saved registration must be replaced, follow the dashboard's documented removal and recovery process. Normal server removal requires a signed-in administrator and confirmation.

For a permanently unreachable saved server, the source guide describes a stopped-app procedure involving the local server profile. Use that procedure only after identifying the correct state directory and protecting the existing records.

Removing a saved profile changes what the local app remembers; it does not prove that a newly presented key is valid. You still need to verify the new host before reenrolling it. Read update and removal for the actual paths and current behavior.

Practice a mismatch in an isolated environment​

A useful lab exercise uses two disposable endpoints with different host keys and a clearly labeled test address. Enroll one verified identity, then present the other only within that controlled exercise.

The expected outcome is a blocked later sign-in, followed by investigation and independently verified reenrollment. Keep a record of what the app displayed and whether it prevented the credential step.

Label screenshots as lab examples and remove account names and addresses that identify real infrastructure. The purpose is to understand the trust workflow, not to collect a reusable bypass for a production warning.

Ask for the right help when something fails​

A productive report includes the application revision, the key type displayed, whether this is first enrollment or a later sign-in, and the point at which the flow stopped.

You usually do not need to publish your real host address or a full authentication transcript to explain the interface problem. If a suspected vulnerability involves credentials or trust handling, use the security reporting route first.

A good result is simple to describe: the saved identity corresponds to the intended host, the comparison used an independent reference, and later identity changes stop for investigation. That gives the password sign-in step a clear foundation rather than relying on familiarity with an address.