CertGrid CertGrid
Hands-on Lab·CompTIA Linux+

The SSH server and what blocks a login

Domain 2 names secure remote access, and the question that actually comes up is why a good key is refused. This guide reads the effective server configuration, makes a working key login, then breaks it three ways on purpose - a drop-in that denies the account, a directory mode the server refuses to ignore, and a login shell that says no after the key was accepted - reading the exit code and the journal each time.

Services and Users Guide 21 of 28 Intermediate

One Debian-family host. Every login is made by a throwaway account against this machine's own sshd, so the session this page was captured over is never at risk.
Server NameIP AddressOSRolesCPURAMHDD
LPLUS-A01192.168.0.73Ubuntu 26.04 LTSDebian-family host - apt, ufw, netplan, AppArmor2 Core4 GB50 GB

This guide includes

Use this when someone cannot log in and the key looks correct. This matters because the client's message is the same three words for causes that are nothing alike, and because the server writes the real reason in the journal every time.

Before you start

  1. The configuration actually in force

  2. An account and a key, so there is something to block

  3. A drop-in that refuses one account

  4. The permission the server refuses to ignore

  5. A shell that refuses after the key was accepted

  6. Putting the machine back

Official sources