Linux Labs

Networking / Stage 10 of 14

SSH — trusting the server and logging in with a key

Not running Starting usually ~20 s
Leave the lesson

Step 9 of 9 · summary · 2 min

Summary

  • At an SSH login the client checks the server key against known_hosts, and the server checks the user key against authorized_keys.
  • A changed server key is compared with a trusted source before known_hosts is updated.
  • The server log explains a key refusal; the key file and the directories above it must not be writable by others.
  • sshd -T prints the settings in force; after a change — sshd -t, a restart and a fresh login.
  • At the start of the lesson the key was right, but the server would not take it from a file anyone could write to.
Ubuntu 24.04
Loading…