Systems Administrator

Case File: The Keys That Never Left

The deploy account on the build server accepts keys from people who left months ago, and some keys are weak. At a simulated Linux prompt, list the keys in authorized_keys with ssh-keygen -lf (size, fingerprint, comment, type), remove the keys of the people who left and every DSA key and RSA key shorter than 2048 bits with sed -i, keep the restricted backup key that has options in front of it, and keep a copy first. The checks read the file, so deleting by a pattern that matches several keys fails.

50 min

Case File: The Keys That Never Left

The deploy account on the build server accepts keys from people who left months ago, and some keys are weak. At a simulated Linux prompt, list the keys in authorized_keys with ssh-keygen -lf (size, fingerprint, comment, type), remove the keys of the people who left and every DSA key and RSA key shorter than 2048 bits with sed -i, keep the restricted backup key that has options in front of it, and keep a copy first. The checks read the file, so deleting by a pattern that matches several keys fails.

In this lesson:

  • ssh
  • authorized_keys
  • keys
  • linux
  • console
  • case-file

๐Ÿ”’ This lesson is part of a paid plan

This lesson is part of the Pro plan. Upgrade to unlock the full lesson, the labs and the exam.

Upgrade Now

This lesson is part of a paid plan

Upgrade to Pro to unlock this course, its labs and its exam.

View Pricing Plans