80/91
Sign inSign up free

724. A Key That Can Only Run Backups

medium 20 XP ~7 minHands-on lab

The backup server pushes archives to this host as yusuf, using the key in /srv/lab/backup-server.pub. A plain key line would also give it a full shell, port forwarding and more.

Task

Add the key to yusuf's ~/.ssh/authorized_keys so that a login with it:

  • is accepted only from 172.16.8.0/24,
  • always runs /usr/local/bin/backup-receive, whatever command the client asks for,
  • gets no terminal, no port, agent or X11 forwarding.

The key already in the file for yusuf's own laptop must keep working exactly as before.

About this machine

Ubuntu 24.04 with no internet access. You are student with passwordless sudo. The grader checks the final state of the machine, not the commands you typed. Values like names and ports are generated for you.

Teaching or writing about this? Embed this lab on your page

TerminalNot started

Your machine is ready to start

A fresh, isolated Ubuntu machine boots in a few seconds with the task already set up.

No account needed: 3 of 3 free tries left. Guest machines last 30 minutes.