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.
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
Upgrade to Pro to unlock this course, its labs and its exam.
View Pricing Plans