Read the scenario first
Each lab starts with a situation, the way a ticket or an exam question does. Work out what is being asked before you type anything.
Free tool · No sign-up needed
Harden an SSH server’s configuration: turn off root login and password sign-in with sed, then restart the service.
Last updated
Linux command line · Intermediate · About 10 minutes
An audit flagged the SSH configuration on db01: root can sign in directly, and passwords are accepted, so the server is open to password guessing. Every administrator already signs in with a key.
Change the two settings in /etc/ssh/sshd_config and restart the service so they take effect. The practice terminal has no text editor, so make the changes with sed.
A practice Ubuntu terminal that runs in your browser. It understands real commands, and nothing you type can break anything.
Show the current values of PermitRootLogin and PasswordAuthentication. (not done yet)
Set PermitRootLogin to no. (not done yet)
Set PasswordAuthentication to no. (not done yet)
Restart the SSH service so the new settings are read. (not done yet)
Take it further in OpenpassAI
OpenpassAI’s Hands-on Labs put you in a Linux or Windows terminal for the certification you’re studying, in guided, hint-only and timed modes.
About this lab
Free performance-based questions: Security+, Linux+, Server+
One way to complete the lab, with the reason for each step. Try it yourself first.
grep -E "PermitRootLogin|PasswordAuthentication" /etc/ssh/sshd_configsudo sed -i 's/^PermitRootLogin yes/PermitRootLogin no/' /etc/ssh/sshd_configsudo sed -i 's/^PasswordAuthentication yes/PasswordAuthentication no/' /etc/ssh/sshd_configsudo systemctl restart sshGuide
Each lab starts with a situation, the way a ticket or an exam question does. Work out what is being asked before you type anything.
Typing a command, getting it wrong and fixing it is what makes it stick. Use the hints when you’re stuck, not before.
Every lab has a worked solution with the reason for each step. Read it even when you finished: there is often a shorter way.
Reset the lab a day later and do it without hints. If you can, you know it. If you can’t, you’ve found what to study.
14 free labs in your browser: Linux and Windows command line, firewall rules and SOHO router setup, checked as you go.
Open the toolFree performance-based questions for 19 CompTIA exams: firewall rules, network diagrams, command-line tasks and drag-and-drop.
Open the toolFree practice tests for 261 popular certification exams, with explanations and a score by exam domain.
Open the toolFAQs
Find quick answers or contact our support team.
No. It’s a practice terminal that runs in your browser. It understands the real commands the lab needs, and many more, and it answers the way an Ubuntu server would. It isn’t a full operating system: nothing is installed, and nothing you type can break anything.
The everyday ones: ls, cd, cat, grep, awk, sed, sort, uniq, find, chmod, chown, useradd, usermod, passwd, systemctl, journalctl, ip, ping, dig, ss and ufw, with pipes, redirects and sudo. Type help in the terminal for the full list. Text editors and package installs aren’t included.
It practices skills from CompTIA Security+ (Security Operations), CompTIA Linux+ (Security) and CompTIA Server+ (Security and Disaster Recovery).
No. The labs run in your browser and nothing is saved. Sign up only if you want OpenpassAI’s full labs and progress tracking.
OpenpassAI
Hi 👋 I’m OpenpassAI. Ready to prepare for your exam the smarter way?
Ready to explore OpenpassAI? I can show you how the platform helps you prepare, practice, and pass.