Rocky Linux 9.8
Overview
Rocky Linux is a community-driven enterprise Linux distribution built by the Rocky Enterprise Software Foundation to be binary compatible with Red Hat Enterprise Linux 9. Version 9.8 is a point release in the RHEL 9 family.
This SecureAnyCloud image is pinned to Rocky Linux 9.8. The machine reports release 9.8 and carries every update available for that stream at build time.
What you get:
- Rocky Linux 9.8, binary compatible with RHEL 9
- Every available update applied at build time, verified with a zero-pending check
- Unattended updates already armed, so the machine keeps patching itself
- Azure Linux Agent (waagent) and cloud-init for Azure integration
- Chronyd for NTP time synchronization
- SELinux in enforcing mode, both at runtime and persisted for the next boot
- BaseOS, AppStream and Extras repositories enabled, with signature checking on
- Exactly one externally reachable port: SSH on 22
- Gen2 Hyper-V virtual machine support
- 24/7 SecureAnyCloud support
Platform: Microsoft Azure (Gen2 Hyper-V). Default user: azureuser.
Security posture
This image ships with no known credential. There is no default password and no baked-in SSH key.
- The root account password is locked, so no one can log in as root with a password.
PasswordAuthenticationis disabled in the SSH daemon, so every login is by key.KbdInteractiveAuthenticationis also disabled, which closes the other password path.PermitRootLoginis set toprohibit-password, so root cannot be reached with a password even if one is set later.- The only key that works is the public key you supply when you create the virtual machine. Azure injects it into
azureuserat first boot, so no two machines you launch share a secret. - No SSH host keys are baked into the image. Each machine generates its own at first boot, so no two machines built from this image share a host identity.
/etc/machine-idships empty and is regenerated per machine.- SELinux is left in enforcing mode, the Rocky Linux default.
Prerequisites
Before you deploy, make sure you have:
- An active Microsoft Azure subscription
- Access to the Azure Portal or the Azure CLI
- An SSH key pair for Linux VM access
- Familiarity with Azure VM management
Recommended VM size: Standard_B2s (2 vCPU, 4 GB RAM) or larger.
Deploy the Virtual Machine
Option A: Azure Portal
- Open the Azure Marketplace and search for "Rocky Linux 9.8 SecureAnyCloud".
- Select the image and click Create.
- On the Basics tab, configure:
- Subscription: select your Azure subscription
- Resource Group: create a new one or select an existing one
- Virtual Machine Name: enter a name for your VM
- Region: select your preferred Azure region
- Size:
Standard_B2sis recommended
- Under Administrator Account, select SSH public key and enter your key.
- Under Inbound Port Rules, allow SSH (port 22).
- Click Review + Create, then Create.
Option B: Azure CLI
az vm image terms accept --urn sac1647283583153:rocky-9-8:default:latest
az vm create \
--resource-group myResourceGroup \
--name my-rocky-9-8-vm \
--image sac1647283583153:rocky-9-8:default:latest \
--size Standard_B2s \
--admin-username azureuser \
--generate-ssh-keys \
--public-ip-sku StandardConnect via SSH
Run these commands on your own workstation, not on the VM. Find the public IP, then connect:
az vm show --resource-group myResourceGroup --name my-rocky-9-8-vm --show-details --query publicIps -o tsv ssh azureuser@<vm-ip>There is no password to enter. If SSH asks for one, the key your client is offering is not the key you supplied at create time.
Confirm the release
Check that the machine runs the Rocky Linux 9.8 release you expect:
cat /etc/rocky-release grep -E '^(NAME|VERSION|ID|PLATFORM_ID)=' /etc/os-release uname -rmExpected output:
Rocky Linux release 9.8 (Blue Onyx) NAME="Rocky Linux" VERSION="9.8 (Blue Onyx)" ID="rocky" PLATFORM_ID="platform:el9" 5.14.0-687.29.1.el9_8.x86_64 x86_64The kernel version carries an el9_8 tag, which marks the machine as being on the 9.8 stream rather than an older 9 series minor release.
Check the patch level
The image is fully updated at build time. dnf check-update returns exit code 100 when updates are pending, and 0 when none are:
sudo dnf check-update echo "check-update exit code: $?"Confirm that no reboot is outstanding. needs-restarting -r returns 0 when nothing requires a restart:
sudo dnf needs-restarting -r echo "needs-restarting exit code: $?"List the enabled repositories to confirm that your update path is intact:
dnf repolist --enabledExpected output:
repo id repo name appstream Rocky Linux 9 - AppStream baseos Rocky Linux 9 - BaseOS extras Rocky Linux 9 - ExtrasCodeReady Builder (crb) is not enabled on this image. It carries developer and build-time packages that most server workloads do not need. Enable it yourself if you need it. First check its state:
echo "crb state: $(dnf repolist --all 2>/dev/null | grep -c '^crb ')"To turn it on, run sudo dnf config-manager --set-enabled crb.
Package signatures are verified on every install. No repository on this image sets gpgcheck=0.
Unattended updates are already armed
This image does not just ship patched. It keeps patching itself. dnf-automatic is installed and configured to apply updates, and its timer is enabled so it starts on every boot:
systemctl is-enabled dnf-automatic.timer
systemctl is-active dnf-automatic.timer grep -E '^(upgrade_type|download_updates|apply_updates)' /etc/dnf/automatic.confExpected output:
enabled active upgrade_type = default download_updates = yes apply_updates = yesupgrade_type is deliberately set to default rather than security. The security-only mode resolves against errata metadata. Where that metadata is not published, a security-only policy silently resolves to nothing and applies no updates at all. Setting default applies every available update, so it cannot quietly do nothing.
If you prefer to control the schedule yourself, disable the timer and patch on your own cadence:
echo "to take manual control: sudo systemctl disable --now dnf-automatic.timer"To patch by hand at any time, run sudo dnf upgrade -y, then reboot with sudo systemctl reboot if a new kernel was installed.
Verify the security posture
Confirm that SELinux is enforcing, root is locked and SSH accepts keys only:
getenforce grep -E '^[[:space:]]*SELINUX=' /etc/selinux/config
sudo passwd -S root
sudo sshd -T | grep -E '^(permitrootlogin|passwordauthentication|pubkeyauthentication|kbdinteractiveauthentication)'Expected output:
Enforcing SELINUX=enforcing root LK 2009-12-22 -1 -1 -1 -1 (Alternate authentication scheme in use.) permitrootlogin without-password pubkeyauthentication yes passwordauthentication no kbdinteractiveauthentication nowithout-password is how OpenSSH reports the prohibit-password setting. Both names mean the same thing: root may not authenticate with a password.
The commands check both the runtime mode and the persisted /etc/selinux/config value, because a runtime setting that is not persisted would silently revert on your next reboot.
Verify Azure integration
Confirm that the Azure Linux Agent, cloud-init and time synchronization are healthy, and check your resources:
systemctl is-active waagent
systemctl is-enabled waagent cloud-init --version
systemctl is-active chronyd df -h / free -hwaagent lets Azure provision your SSH key, resize the OS disk, run extensions and report VM health, so it should always be active and enabled.
Note that free -h reports 0B of swap. This is deliberate. Azure manages swap on the ephemeral resource disk through waagent rather than on the OS disk, and a swap file baked into a Marketplace image fails certification. If your workload needs swap, configure it through waagent.
Networking and open ports
The Azure Network Security Group (NSG) controls inbound and outbound traffic. It is the first place to open a port, and usually the only one.
This image is a minimal build, so firewalld is not installed. This is deliberate. With no host firewall in the way, your NSG rules take effect exactly as written, with no second layer to keep in sync. Confirm what is listening before you open anything:
ss -tlnuOn a fresh machine, SSH on port 22 is the only externally bound listener. Chrony appears on 127.0.0.1:323, which is loopback only and not reachable from the network.
rpcbind is disabled on this image. The stock Rocky cloud image enables it because nfs-utils depends on it, which leaves TCP and UDP port 111 open on every interface. NFSv4, the default in Rocky Linux 9, does not use rpcbind at all. This image therefore disables rpcbind and closes the port, while nfs-utils stays installed and fully working for NFSv4 mounts:
echo "rpcbind.socket: $(systemctl is-enabled rpcbind.socket 2>/dev/null || echo disabled)" rpm -q nfs-utilsIf you need NFSv3, which requires the portmapper, turn rpcbind back on with one command:
echo "to re-enable NFSv3 support: sudo systemctl enable --now rpcbind.socket"The service is disabled rather than masked, so this command works without further steps.
If your policy also requires a host firewall, install and enable it yourself:
sudo dnf install -y firewalld
sudo systemctl enable --now firewalld
sudo firewall-cmd --permanent --add-port=443/tcp sudo firewall-cmd --reloadOnce firewalld is running, a port must be open in both the Azure NSG and firewalld before traffic can reach your service.
Install software
AppStream carries the application packages. Search it, then install what you need:
dnf search nginxThe 9 series still ships modules for some packages. AppStream can carry several versions of the same language or database as separate streams, so you can pick a version instead of taking the default.
dnf module list nginxExpected output:
Rocky Linux 9 - AppStream Name Stream Profiles Summary nginx 1.22 common [d] nginx webserver nginx 1.24 common [d] nginx webserver nginx 1.26 common [d] nginx webserverInstall a package and enable it in the usual way, for example sudo dnf install -y nginx followed by sudo systemctl enable --now nginx.
To add another administrator, create the account with sudo adduser <name> and add it to the wheel group with sudo usermod -aG wheel <name>. Then copy your public key into /home/<name>/.ssh/authorized_keys. Set that file to mode 600 and the .ssh directory to mode 700, both owned by the new user.
The image ships with no human accounts, so azureuser is the only login until you add one. Confirm the administrator group members:
getent group wheelCommon Use Cases
- RHEL 9-compatible application hosting
- Enterprise server workloads that need a pinned point release
- A base for software certified on the 9 platform
- A migration target for CentOS 7 and CentOS Stream estates
Troubleshooting
Cannot connect via SSH
- Verify that the VM is in the Running state in the Azure Portal.
- Check that port 22 is allowed in the Network Security Group.
- Make sure you are using the correct username:
azureuser. - Verify that your SSH key matches the one you supplied at create time. Password login is disabled by design, so a wrong key cannot fall back to a password prompt.
To see which key your client is offering, run ssh -v azureuser@<vm-ip> from your workstation and look for the Offering public key lines.
Azure agent not running
Check the agent status:
systemctl is-active waagentIf the agent is not running, start it on the VM:
sudo systemctl enable --now waagentPackage manager issues
Refresh the metadata cache first:
sudo dnf clean all
sudo dnf makecacheIf repositories are unreachable, check DNS resolution. This image is minimal, so nslookup and dig are not installed. getent is always present and resolves through the same system resolver:
getent hosts download.rockylinux.orgInstall bind-utils if you want dig and nslookup.
A service is blocked and the logs mention SELinux
SELinux is enforcing on this image. Rather than disabling it, look at what was denied. On a healthy machine there are no recent denials, so the command reports none:
sudo ausearch -m AVC -ts recent 2>/dev/null || echo "no recent AVC denials"If a denial is genuine, set the correct file context with semanage fcontext and restorecon, or enable the relevant boolean with setsebool -P. Both are preferable to turning SELinux off.
Checking for failed services
A healthy machine reports running with nothing failed:
systemctl is-system-running
systemctl list-units --state=failed --no-legendImportant Notes
Rocky Linux is free and open source software, covered by a collection of licenses rather than a single one. This image carries 463 installed packages that declare 103 distinct license strings. The most common are LGPLv2+, GPLv2+, MIT, GPLv3+, BSD, GPLv2, LGPLv3+ and Public Domain. You can read each package's own terms on the machine:
rpm -qa --qf '%{LICENSE}\n' | sort | uniq -c | sort -rn | awk 'NR<=8'No subscription, license key or support contract is required for any of it.
Rocky Linux 9 is supported until May 2032. This image is pinned to the 9.8 point release. If you would rather track whichever 9 series release is current, use the SecureAnyCloud Rocky Linux 9 image instead.
Support
For help with this image, contact SecureAnyCloud support:
- Website: secureanycloud.com
- Product Catalog: secureanycloud.com/products
- User Guides: secureanycloud.com/guides
- SLA: 24 hour response guaranteed
Deploy on Azure
Launch Rocky Linux 9.8 on Azure with 24/7 support from SecureAnyCloud.
View this image
Need Help?
Our support team is available 24/7.
sales@secureanycloud.com
Overview
Rocky Linux 9 is a free, community-built enterprise Linux distribution that is binary compatible with Red Hat Enterprise Linux 9 and supported until 2032. Version 9.8, codename Blue Onyx, is a point release in that series.
This guide covers launching and verifying the SecureAnyCloud Rocky Linux 9.8 AMI on Amazon EC2. It is one version of the SecureAnyCloud Rocky Linux listing on AWS Marketplace, and you pick it as the software version when you subscribe and launch. Every release and variant in the listing is described at /guides/rocky-linux-aws/.
The image is the point release itself. The build checks the release before it changes anything and refuses to run on any other, so an instance launched from it reports Rocky Linux 9.8.
What you get:
- The exact point release, fully patched. Every Rocky Linux 9.8 update published before the build date is installed. Step 4 explains how updates behave after launch, including what happens when Rocky Linux 9.9 is released.
- CIS Level 1 Server remediation. The image is remediated with the OpenSCAP CIS Level 1 Server profile from SCAP Security Guide 0.1.82 (Rocky Linux's own signed
scap-security-guidepackage and itsssg-rl9content), then rebooted and evaluated. On this build, 255 of 256 scored rules pass (99.6%), measured again on a fresh instance launched from the finished image. Six rules are waived because they cannot work on an EC2 image, each with its reason. The HTML report, the machine-readable results, the waiver list and a summary ship in/usr/share/doc/sac/. - EC2 defaults that keep you in control. Key-only SSH as
rocky, root locked, no password on any account, SELinux enforcing, IMDSv2 required, a host firewall (firewalld) that allows SSH in and everything out, the Cockpit web console installed but switched off, the current AWS Systems Manager agent, and time from the Amazon Time Sync Service. - Automatic security updates on your instance with
dnf-automatic.
What is on the image: Rocky Linux 9.8 (the RHEL 9-compatible 5.14 kernel) with the standard Rocky Linux package set, cloud-init, OpenSSH, firewalld, chrony, SELinux (targeted policy, enforcing), the AWS Systems Manager agent, auditd, rsyslog, AIDE file integrity checking, dnf-automatic, the Cockpit web console (disabled), OpenSCAP and the pinned SCAP Security Guide content used for the evaluation.
Default user: rocky. Architecture: x86_64. Root volume: 11 GiB gp3, XFS (grows to the size you choose at launch).
These images are remediated with an OpenSCAP profile and ship their own evaluation report. They are not CIS Hardened Images, and CIS has not reviewed or certified them.
Connecting to your instance
Version SSH user Root device
Rocky Linux 9.8 rocky /dev/sda1 (11 GiB gp3)
Security posture
- No known credential. There is no default password and no baked-in SSH key. The only key that works is the EC2 key pair you choose at launch, which cloud-init installs for
rockyon first boot. - Key-only SSH.
PasswordAuthentication no,PermitRootLogin noand keyboard-interactive off. The root account has no password and is locked. - Per-instance identity. SSH host keys, the machine ID and the host name are generated fresh on every instance, so no two instances share a host key.
- IMDSv2 required. The AMI is registered with
ImdsSupport v2.0, so instances launched from it refuse token-less (IMDSv1) metadata requests by default. - SELinux enforcing with the targeted policy, as Rocky Linux ships it.
- Host firewall. The firewalld
publiczone allows only SSH and the DHCPv6 client inbound, and allows all outbound traffic. The SSM agent, metadata service, DNS, time sync and package updates keep working. - Only SSH listens on the network. The Cockpit web console (port 9090) is installed, as in a standard Rocky Linux system, but its socket is switched off and a preset keeps it off. Nothing but
sshdlistens on any address. Step 8 shows how to turn Cockpit on if you want it.
Prerequisites
- An AWS account and permission to launch EC2 instances
- An EC2 key pair in the Region you launch in
- A security group that allows TCP 22 from your own address (not from the whole internet)
Recommended instance type: m5.large. The image runs on any current x86_64 instance type.
Launch the instance
Option A: AWS Marketplace console
- Open the SecureAnyCloud Rocky Linux listing on AWS Marketplace, choose View purchase options, then choose Subscribe. One subscription covers every version in the listing.
- When the subscription is active, choose Launch your software.
- Choose One-click launch from AWS Marketplace (or Launch from EC2 Console for full control). In Version, choose Rocky Linux 9.8 - YYYY-MM-DD (the date is when the version was added), then choose your Region.
- Instance type:
m5.largeis recommended, and any current x86_64 type works. The software charge is $0.04 per vCPU per hour. - Key pair: choose your EC2 key pair. It is the only way in. RSA and ED25519 keys both work.
- Security group: allow inbound TCP 22 from your own IP address or network only.
- Storage: the root volume is 11 GiB gp3 by default. Choose a larger size if you need one. cloud-init grows the root partition and filesystem to fill it on first boot.
- Metadata: leave the defaults, because the image already requires IMDSv2. Then choose Launch.
Option B: AWS CLI
Run this command on your own workstation. Replace the AMI ID with the one shown for your Region on the Marketplace launch page, and replace the key pair, security group and subnet with your own. The root device of this AMI is /dev/sda1:
aws ec2 run-instances \
--image-id ami-0123456789abcdef0 \
--instance-type m5.large \
--key-name my-key-pair \
--security-group-ids sg-0123456789abcdef0 \
--subnet-id subnet-0123456789abcdef0 \
--block-device-mappings 'DeviceName=/dev/sda1,Ebs={VolumeSize=20,VolumeType=gp3}' \
--tag-specifications 'ResourceType=instance,Tags=[{Key=Name,Value=rocky-linux-9-8}]'You do not need --metadata-options, because the AMI already makes IMDSv2 required.
Connect via SSH
From your workstation, connect as rocky with the key pair you chose:
ssh -i ~/.ssh/my-key-pair.pem rocky@<public-ip>There is no password to enter. If SSH asks for one, or says Too many authentication failures, see Troubleshooting below.
You can also connect without opening port 22 through AWS Systems Manager Session Manager, if the instance has an instance profile that allows Systems Manager. The agent is installed and running on this image.
Confirm the release
cat /etc/rocky-release grep -E '^(NAME|VERSION|ID|VERSION_ID|PLATFORM_ID|PRETTY_NAME)=' /etc/os-release uname -srmExpected output:
Rocky Linux release 9.8 (Blue Onyx) NAME="Rocky Linux" VERSION="9.8 (Blue Onyx)" ID="rocky" VERSION_ID="9.8" PLATFORM_ID="platform:el9" PRETTY_NAME="Rocky Linux 9.8 (Blue Onyx)" Linux 5.14.0-687.58.1.el9_8.x86_64 x86_64Your kernel version may be newer if updates have installed since this image was built.
The point release and how updates behave
This version is named for, and built from, Rocky Linux 9.8. The listing also carries Rocky Linux 9 versions (for example Rocky Linux 9 Minimal) that are rebuilt from whichever Rocky Linux 9 point release is current. Choose this version when your build sheet, compliance baseline or vendor support matrix names 9.8 and the image you launch must say so.
At the time of this build, 9.8 is the newest Rocky Linux 9 point release, and the image has every 9.8 update published up to its build date. The instance uses the standard Rocky Linux 9 repositories:
rpm -q rocky-release dnf -q repolistExpected output:
rocky-release-9.8-1.2.el9.noarch repo id repo name appstream Rocky Linux 9 - AppStream baseos Rocky Linux 9 - BaseOS extras Rocky Linux 9 - ExtrasHow updates behave. Rocky Linux maintains only the newest point release of each major version, and the repositories above follow it:
- While 9.8 is current (as it is at the time of writing),
sudo dnf upgradeand the automatic security updates (Step 10) install 9.8 updates, and the instance stays on 9.8. - When Rocky Linux releases 9.9, the same repositories start serving 9.9. The next
sudo dnf upgrademoves the instance to 9.9, and the automatic security updates install 9.9 packages. This is normal Rocky Linux behavior, and it is how the instance keeps receiving security fixes. Rocky Linux does not publish further updates for 9.8 after 9.9 is out. It moves 9.8 to its archive (the vault atdl.rockylinux.org/vault/rocky/9.8/), frozen as it was on that day.
The image is therefore a fixed 9.8 starting point, and a running instance follows Rocky Linux 9 forward unless you hold it.
Holding an instance at 9.8. If your change control requires the 9.8 package set, set the releasever variable on your instance:
echo "9.8" | sudo tee /etc/dnf/vars/releaseverToday, with 9.8 still current, this resolves to the live 9.8 repositories. The command sudo dnf -q --releasever=9.8 repolist lists Rocky Linux 9.8 - BaseOS and the others. Read the following before you rely on it:
- Once 9.9 is released, a host held at 9.8 gets no more security updates, because the 9.8 content is frozen in the vault.
- At that point, the default mirror list may stop serving 9.8. To keep installing packages from the frozen 9.8 set, point each repository in
/etc/yum.repos.d/rocky.repoat the vault (baseurl=https://dl.rockylinux.org/vault/rocky/$releasever/BaseOS/$basearch/os/, and the same for AppStream and Extras). Then comment out itsmirrorlist=line. - Holding trades security fixes for version stability. Hold only when a compliance obligation requires it, review the decision on a schedule, and do not hold an internet-facing instance without compensating controls. To return to normal updates, remove
/etc/dnf/vars/releasever(and any vaultbaseurlyou added).
Read the compliance evidence
The evaluation the build ran after its reboot ships on the image:
ls -lh /usr/share/doc/sac/ python3 -c "import json; s=json.load(open('/usr/share/doc/sac/cis-l1-summary.json')); print('profile: ', s['profileLabel'], '(SCAP Security Guide', s['ssgVersion'] + ')'); print('scored rules: ', s['scored'], ' pass:', s['pass'], ' fail:', s['fail'], ' rate:', str(s['ratePct']) + '%'); print('waived: ', s['waived'], ' not applicable:', s['notapplicable']); print('evaluated at: ', s['evaluatedAt'])"Expected output:
total 39M -rw-r--r--. 1 root root 37M Oct 21 12:26 cis-l1-arf.xml -rw-r--r--. 1 root root 2.3M Oct 21 12:26 cis-l1-report.html -rw-r--r--. 1 root root 1.2K Oct 21 12:26 cis-l1-summary.json -rw-r--r--. 1 root root 1.7K Oct 21 12:26 cis-l1-tailoring.xml -rw-r--r--. 1 root root 2.3K Oct 21 12:26 cis-l1-waivers.txt -rw-r--r--. 1 root root 1.6K Oct 21 12:21 scap-security-guide-LICENSE.txt profile: CIS Level 1 Server (SCAP Security Guide 0.1.82) scored rules: 256 pass: 255 fail: 1 rate: 99.6% waived: 6 not applicable: 33 evaluated at: 2026-10-21T12:26:19Zcis-l1-report.htmlis the full OpenSCAP report, rule by rule. Copy it to your workstation and open it in a browser.cis-l1-arf.xmlis the same evaluation in the machine-readable ARF format, for compliance tooling.cis-l1-tailoring.xmlis the exact tailoring used, so you can re-run the same evaluation (Step 6).- The pass rate is pass / (pass + fail + error + unknown). Rules that are not applicable to this machine, not selected or waived are not counted.
To copy the report to your workstation, run this command on the workstation:
scp -i ~/.ssh/my-key-pair.pem rocky@<public-ip>:/usr/share/doc/sac/cis-l1-report.html .The six waived rules
grep -v '^#' /usr/share/doc/sac/cis-l1-waivers.txt | cut -f1,2Expected output:
partition_for_tmp [single-volume-partitions] grub2_password [serial-console-and-boot] ensure_root_password_configured [serial-console-and-boot] accounts_maximum_age_login_defs [key-only-account-aging] account_disable_post_pw_expiration [key-only-account-aging] sshd_limit_user_access [ssh-access-list]The full reason for each is in the third column of the same file. In short:
- Separate /tmp partition: this version boots from one EBS root volume. (The LVM versions of this listing provide separate volumes for /tmp, /var, /var/log, /var/log/audit, /var/tmp and /home.)
- Boot loader and root passwords: a GRUB or root password would have to be baked into the image, which would give every instance the same secret. Root stays locked with no password. Set your own if you need serial console access (see Step 11).
- Password aging defaults: the accounts cloud-init creates are key-only, and an aging limit would expire them and lock the SSH key out. Accounts that do have a password are still aged.
- SSH AllowUsers/AllowGroups: a list fixed at build time would refuse accounts you create later. Your security group restricts who can reach port 22.
The rule that does not pass
python3 -c "import json; [print(r) for r in json.load(open('/usr/share/doc/sac/cis-l1-summary.json'))['failingRules']]"Expected output:
ensure_journald_and_rsyslog_not_active_togetherjournald and rsyslog together. The benchmark wants one logging system, not both. Rocky Linux runs journald and rsyslog together by default. journald keeps the structured system journal (persistent, in /var/log/journal), and rsyslog writes the traditional text logs (/var/log/messages, /var/log/secure, /var/log/cron) that many log shippers and audit procedures read.
The image keeps both so that neither kind of tooling loses its logs. If you standardize on one, for example the journal only, run sudo systemctl disable --now rsyslog on your instance and re-run Step 6.
Re-run the evaluation yourself
Repeat the evaluation at any time with the same content and tailoring. It takes about a minute:
sudo oscap xccdf eval \
--tailoring-file /usr/share/doc/sac/cis-l1-tailoring.xml \
--profile xccdf_co.sac_profile_cis-l1_ec2_single \
--results /tmp/cis-check-results.xml --report /tmp/cis-check-report.html \
/usr/share/xml/scap/ssg/content/ssg-rl9-ds.xml > /tmp/cis-check.log 2>&1 echo "oscap exit code: $? (2 = at least one rule did not pass)"
sudo python3 -c "import re,collections; c=collections.Counter(re.findall(r'<result>(\w+)</result>', open('/tmp/cis-check-results.xml').read())); s=sum(c[k] for k in ('pass','fail','error','unknown')); print(dict(sorted(c.items()))); print('pass rate: %.1f%%' % (100.0*c['pass']/s))"Expected output (measured on a fresh instance launched from this image):
oscap exit code: 2 (2 = at least one rule did not pass) {'fail': 1, 'notapplicable': 33, 'notselected': 1251, 'pass': 255} pass rate: 99.6%Your own report is at /tmp/cis-check-report.html. The content file is ssg-rl9-ds.xml, the Rocky Linux 9 data stream. The RHEL 9 data stream that the same package carries reports every rule as not applicable on Rocky Linux. As you install software and change settings, re-run the evaluation to see how your changes affect the result.
Confirm IMDSv2 is required
curl -s -o /dev/null -w 'IMDSv1 request without a token: HTTP %{http_code}\n' http://169.254.169.254/latest/meta-data/instance-id
TOKEN=$(curl -s -X PUT -H 'X-aws-ec2-metadata-token-ttl-seconds: 60' http://169.254.169.254/latest/api/token)
curl -s -H "X-aws-ec2-metadata-token: $TOKEN" -w '\n' http://169.254.169.254/latest/meta-data/placement/regionExpected output (your Region may differ):
IMDSv1 request without a token: HTTP 401 us-east-1A request without a session token is refused with HTTP 401, and the same request with a token works. Scripts and SDKs on the instance must use IMDSv2. Every current AWS SDK and the AWS CLI do this automatically.
The host firewall, listening ports and Cockpit
sudo firewall-cmd --state sudo firewall-cmd --list-all sudo ss -tlnp systemctl is-enabled cockpit.socket cat /etc/systemd/system-preset/80-sac-cockpit.presetExpected output:
running public (active) target: default icmp-block-inversion: no interfaces: eth0 sources: services: dhcpv6-client ssh ports: protocols: forward: yes masquerade: no forward-ports: source-ports: icmp-blocks: rich rules: State Recv-Q Send-Q Local Address:Port Peer Address:PortProcess LISTEN 0 128 0.0.0.0:22 0.0.0.0:* users:(("sshd",pid=913,fd=7)) LISTEN 0 128 [::]:22 [::]:* users:(("sshd",pid=913,fd=8)) disabled
# sac: inbound SSH only. Enable the Cockpit web console yourself (see the user guide). disable cockpit.socket- Only
sshdlistens, on port 22. Nothing else on the image opens a TCP port. - The
publiczone allowssshanddhcpv6-client(replies to the instance's IPv6 DHCP client, which is how an instance in an IPv6-enabled subnet gets its address). The Rocky Linux defaultcockpitservice is removed from the zone. - The loopback interface sits in the firewalld
trustedzone, with rules that drop traffic claiming a loopback source from anywhere else (a CIS requirement). - The network interface is named
eth0on every instance type. The image boots with predictable interface names turned off (net.ifnames=0), as the Rocky Linux EC2 images do.
Opening a port for your own service takes two steps. Allow it in the instance's security group, and allow it in firewalld. For example, for a web server on 443, run this on the instance:
sudo firewall-cmd --permanent --add-service=https sudo firewall-cmd --reloadIf a port is open in the security group but not in firewalld (or the other way round), the traffic does not arrive.
Turning on the Cockpit web console. Cockpit (cockpit-ws, cockpit-system, cockpit-bridge) is installed as in a standard Rocky Linux system, but its socket is disabled. The preset file shown above keeps it disabled if the system presets are applied again (for example by systemctl preset-all). If you want the console, run this on the instance:
sudo systemctl enable --now cockpit.socket
sudo firewall-cmd --permanent --add-service=cockpit sudo firewall-cmd --reloadThen allow TCP 9090 from your own address in the security group and browse to https://<public-ip>:9090. Cockpit signs in with a local account's password, so give your user one first (sudo passwd rocky). SSH stays key-only.
Cockpit uses a self-signed certificate until you install your own. Prefer an SSH tunnel (ssh -L 9090:localhost:9090 ...) to opening 9090 to the internet.
Time sync and the Systems Manager agent
systemctl is-active chronyd amazon-ssm-agent chronyc -n sourcesExpected output (the pool servers and timings vary):
active active MS Name/IP address Stratum Poll Reach LastRx Last sample =============================================================================== ^- 216.144.228.179 2 6 377 4 +402us[ +379us] +/- 7392us ^- 198.137.202.32 2 6 377 5 +451us[ +428us] +/- 32ms ^- 104.131.155.175 2 6 377 2 +2338us[+2338us] +/- 65ms ^- 208.113.130.146 2 6 377 4 +186us[ +163us] +/- 10ms ^* 169.254.169.123 3 4 377 3 -7799ns[ -31us] +/- 573usThe ^* marks the source chrony is using: 169.254.169.123, the Amazon Time Sync Service. It is reachable from every instance without internet access, so time stays correct in a private subnet too. The public Rocky Linux pool servers are fallbacks.
The AWS Systems Manager agent is installed from Amazon's own package at its current release (3.3.5390.0 on this build). It is not in the Rocky Linux repositories, so dnf does not update it. Systems Manager can keep it current for you through the AWS-UpdateSSMAgent document or the Auto update SSM Agent setting in Fleet Manager.
Patch level and automatic updates
The image is fully patched at build time. Check which updates are pending now:
sudo dnf -q check-update --refresh echo "dnf check-update exit code: $? (0 = nothing to update, 100 = updates available)" grep -E '^(upgrade_type|apply_updates)' /etc/dnf/automatic.conf systemctl is-enabled dnf-automatic.timer uname -rExpected output on an instance launched soon after the image was built (later launches list the updates released since, with exit code 100):
dnf check-update exit code: 0 (0 = nothing to update, 100 = updates available) upgrade_type = security apply_updates = yes enabled 5.14.0-687.58.1.el9_8.x86_64dnf-automatic runs daily (06:00, with a random delay of up to an hour) and installs security updates automatically from the repositories described in Step 4. To update everything now, run this command:
sudo dnf -y upgradeReboot if a new kernel was installed:
sudo systemctl rebootSecurity settings on the instance
getenforce
sudo passwd -S root
sudo sshd -T | grep -E '^(permitrootlogin|passwordauthentication|pubkeyauthentication|maxauthtries|clientaliveinterval|banner) ' cat /etc/issue.netExpected output:
Enforcing root LK 2026-06-24 0 99999 7 -1 (Password locked.) maxauthtries 4 clientaliveinterval 300 permitrootlogin no pubkeyauthentication yes passwordauthentication no banner /etc/issue.net Authorized users only. All activity may be monitored and reported.Enforcingmeans SELinux is on and enforcing the targeted policy. Keep it on. If your own software is denied, checksudo ausearch -m avc -ts recentinstead of disabling SELinux.LKin the second field means the root account is locked.maxauthtries 4andclientaliveinterval 300come from the CIS profile. SSH allows four authentication attempts per connection and checks idle sessions every five minutes.- The banner text is shown before login.
EC2 Serial Console and recovery. No account on this image has a password, so the serial console cannot log in until you set one. If you want serial console access, set a password for your own user on your running instance. The password is yours and is not on the image:
sudo passwd rockyDisk size, swap and file integrity
df -hT /
sudo grep -E 'cc_growpart.*(resized|NOCHANGE)' /var/log/cloud-init.log | tail -1 swapon --noheadings --show | wc -l sudo grep -h aide /etc/crontabExpected output with the default 11 GiB root volume (on a larger volume, Size is larger and the cloud-init line says resized):
Filesystem Type Size Used Avail Use% Mounted on /dev/nvme0n1p4 xfs 9.9G 1.5G 8.4G 16% / 2026-10-21 12:56:39,247 - cc_growpart.py[DEBUG]: '/' NOCHANGE: no change necessary (/dev/nvme0n1, 4) 0 05 4 * * * root /usr/sbin/aide --check- Disk layout. The root filesystem is XFS on partition 4 of the root volume.
/boot(XFS) and/boot/efiare separate small partitions. - Disk growth. cloud-init grows the root partition and filesystem to the volume size on first boot. To grow later, increase the EBS volume size in the console or with
aws ec2 modify-volume. Then runsudo growpart /dev/nvme0n1 4 && sudo xfs_growfs /(or reboot). - Swap. The image has no swap. Add a swap file yourself if your workload needs one.
- AIDE. The file integrity database is built from the image's own files, and the CIS profile schedules
aide --checkdaily at 04:05 from/etc/crontab.
Install software and add users
The instance uses the standard Rocky Linux 9 repositories (BaseOS, AppStream and Extras):
sudo dnf -q list --available nginxExpected output (the version changes over time):
Available Packages nginx.x86_64 2:1.20.1-28.el9_8.6.rocky.0.1 appstreamInstall and start software in the usual way, for example sudo dnf -y install nginx then sudo systemctl enable --now nginx, and open its port in the security group and firewalld (Step 8). The AWS CLI is not on the image. If you need it, install the current version from AWS (see the AWS CLI install guide).
To add another administrator, create the account, add it to the wheel group and give it an SSH key:
sudo useradd -m -G wheel alice
sudo install -d -m 700 -o alice -g alice /home/alice/.ssh echo "ssh-ed25519 AAAA... alice@laptop" | sudo tee /home/alice/.ssh/authorized_keys
sudo chown alice:alice /home/alice/.ssh/authorized_keys && sudo chmod 600 /home/alice/.ssh/authorized_keys
sudo restorecon -R /home/alice/.sshBecause SSH is key-only, a new account needs its key in authorized_keys. The restorecon command gives the file the SELinux label that sshd expects.
The new account has no password, so sudo cannot authenticate it until you give it one with sudo passwd alice. SSH stays key-only, and sudo uses the password. Password-free sudo is granted only to rocky, which cloud-init creates, and to ssm-user, which the Systems Manager agent creates the first time you open a Session Manager session.
Common use cases
- Change-controlled environments whose baseline or vendor support matrix names Rocky Linux 9.8 exactly
- A base for workloads that must show CIS Level 1 alignment on an enterprise Linux 9, with the evaluation report already on the machine
- Software certified or packaged for RHEL 9-compatible systems, with SELinux enforcing from the first boot
- Build and test hosts that must verify software against a named RHEL 9-compatible point release
- A starting point for your own golden image: add your software, re-run Step 6 and keep the report with your build
Troubleshooting
SSH says "Too many authentication failures"
The SSH server allows four authentication attempts per connection. If your SSH agent holds several keys, it can use up those attempts before it offers the right key. Tell SSH to offer only the key you name:
ssh -o IdentitiesOnly=yes -i ~/.ssh/my-key-pair.pem rocky@<public-ip>Cannot connect via SSH
- Check that the instance is running and has passed its status checks.
- Check that the security group allows TCP 22 from your current public address.
- Use the user name
rocky(notec2-user) and the key pair you chose at launch. Password login is disabled, so a wrong key never falls back to a password prompt. - If you changed firewalld, make sure the
sshservice is still allowed. Session Manager (Step 2) still works if SSH is blocked, provided the instance has a Systems Manager instance profile.
The instance now reports 9.9 (or later)
dnf upgrade moved the instance to the newest Rocky Linux 9 point release, which is how it keeps receiving security fixes (Step 4). If you need to stay on 9.8, read the holding instructions and warnings in Step 4 before you change anything.
My service is running but not reachable
Allow the port in both the security group and firewalld (Step 8). sudo firewall-cmd --list-all shows the firewalld rules. sudo ss -tlnp shows whether the service listens on all addresses or only on loopback.
If the service runs on a non-standard port, SELinux may also need to allow it, for example sudo semanage port -a -t http_port_t -p tcp 8080 for a web server on 8080. The semanage tool is in policycoreutils-python-utils. If it is missing, install it with sudo dnf -y install policycoreutils-python-utils.
A tool that uses instance metadata fails
The image requires IMDSv2. Old scripts that call http://169.254.169.254/ without a token get HTTP 401. Update them to request a token first (Step 7), or use the AWS CLI or a current SDK.
Package manager issues
Refresh the metadata first:
sudo dnf -q makecache --refresh && echo "repository metadata refreshed"If the repositories are unreachable, check that the instance has outbound internet access (a public IP or a NAT gateway) and that DNS resolves:
getent hosts dl.rockylinux.orgImportant notes
Rocky Linux is free and open source software. It is a distribution of thousands of packages, each under its own license (GPL, LGPL, MIT, BSD, Apache 2.0 and others). rpm -qi <package> shows each package's license. No subscription or license key is needed to run this image. The compliance tooling is OpenSCAP (LGPL 2.1 or later) and SCAP Security Guide content (BSD 3-Clause, with the license text in /usr/share/doc/sac/scap-security-guide-LICENSE.txt).
Rocky Linux 9 is maintained by the Rocky Enterprise Software Foundation until 2032. Within that period, each point release receives updates only until the next one is released. This image starts at 9.8, and a running instance follows Rocky Linux 9 forward through dnf updates unless you hold it (Step 4).
The CIS Level 1 Server profile used here is the OpenSCAP profile published in SCAP Security Guide. These images are not CIS Hardened Images and are not certified by the Center for Internet Security. A pass rate measures this image as built. Your own changes affect it, which is why you can re-run the evaluation (Step 6).
Rocky Linux is a trademark of the Rocky Enterprise Software Foundation. Red Hat Enterprise Linux is a trademark of Red Hat, Inc. CIS is a trademark of the Center for Internet Security. These names are used only to identify the software, its compatibility and the profile. SecureAnyCloud is not affiliated with or endorsed by the Rocky Enterprise Software Foundation, Red Hat or the Center for Internet Security.
Support
For help with this image, contact SecureAnyCloud support:
- Website: secureanycloud.com
- User Guides: secureanycloud.com/guides
- Rocky Linux on AWS hub: secureanycloud.com/guides/rocky-linux-aws
Deploy on AWS
Launch Rocky Linux 9.8 on AWS with 24/7 support from SecureAnyCloud.
View on Marketplace
Need Help?
Our support team is available 24/7.
sales@secureanycloud.com