Mission 333

SSH mode matrix

Compare directory and key-file modes used by an SSH account.

Permissions and users
8 minutes Admin Lesson 333 of 360
statchmod
Lesson 333 of 360 0/360 lessons 0/17 missions Permissions and users · 8 minutes
0%
Continue View profile
Ops lab terminal Training lab
New learnerrank 0XP 0%complete
learner@clairos:/home/learner $ Unix ops lab: type a command, press Enter
Instructions 8 minutes

Click any instruction for the command details, the why, and the common mistake to avoid.

Inspect the SSH directory

Run stat ~/.ssh.

stat ~/.ssh
Set the SSH directory mode

Run chmod 700 ~/.ssh.

chmod 700 ~/.ssh
Set the key-file mode

Run chmod 600 ~/.ssh/authorized_keys.

chmod 600 ~/.ssh/authorized_keys
Verify the key-file mode

Run stat ~/.ssh/authorized_keys.

stat ~/.ssh/authorized_keys
Lesson support

What to notice while you play.

Objective

Build repeatable confidence with keeping SSH directories and key files appropriately restricted.

Hint

Start with stat ~/.ssh, inspect the result, then continue in order.

Why it matters

Keeping SSH directories and key files appropriately restricted helps operators explain what they know before they change anything.

Common mistakes
  • Skipping the output that proves keeping SSH directories and key files appropriately restricted.
  • Changing several things before recording a baseline.
Reference

Commands in this lesson.

chmod <mode> <path>

Change a simulated numeric permission mode.

stat <path>

Show lab file details.