Ubuntu 24.04 GNOME desktop
Overview
This image is Ubuntu Server 24.04 LTS with Ubuntu's own GNOME 46 desktop added (the ubuntu-desktop-minimal package set from the Ubuntu main archive). It also includes GNOME's own remote desktop server, gnome-remote-desktop, set up for remote login. You connect with any RDP client, see the GNOME login screen, and sign in to a full desktop session running on the instance.
It is one software version of the SecureAnyCloud Hardened Debian & Linux Desktops AMIs listing on AWS Marketplace. Every desktop in the listing is described at /guides/linux-desktop-aws/.
Remote desktop ships switched off, and no account has a password. A desktop login always needs a password, so the image never ships one. You set your own over SSH, then turn remote desktop on with one command. The recommended route is an SSH tunnel, so port 3389 never has to be open to the internet.
What you get:
- A curated GNOME desktop. The GDM login screen, GNOME Shell, Files, Terminal, Text Editor, System Monitor and Settings come from the Ubuntu main archive. The image is installed without the extras that open network listeners or carry identity (no NetworkManager, Avahi, printing, Bluetooth, first-login wizard or snap packages).
- GNOME Remote Desktop in system mode, off until you enable it. At first boot, each instance generates its own RDP credential and its own self-signed TLS certificate, readable by root only. Nothing is shared between two instances, and nothing is baked into the image.
sac-remote-desktop enablerefuses to start until an administrator account has a password, so the login screen is never exposed with nothing behind it. - Remediation with the OpenSCAP CIS Level 1 Server profile. After the desktop is installed, the build applies the SCAP Security Guide 0.1.82 profile
cis_level1_serverwithoscap --remediate, so its GNOME login screen rules (login banner, no user list, screen lock, no automount) apply to this desktop. The build then reboots and runs a scored evaluation, and it fails if fewer than 95% of the scored rules pass. The report ships in the image at/usr/share/doc/sac/cis-l1-report.html. This is a measurement made by open-source tooling. It is not a certification or accreditation by the benchmark's publisher or any other body, and these images are not CIS Hardened Images. - Fully patched at build time, with automatic security updates left on (unattended-upgrades).
- Key-only SSH as
ubuntu. Password login over SSH is off, and it stays off when you set a desktop password. Root login is refused, and the root account is locked. - IMDSv2 only, the ufw host firewall (inbound SSH only), AppArmor enforcing, chrony on the Amazon Time Sync Service, and the AWS Systems Manager agent.
Connecting to your instance
Connect over SSH as the default login user for the operating system variant you launched.
Operating system variant SSH login user
Ubuntu 24.04 LTS GNOME Desktop ubuntu
Launch from AWS Marketplace
- Open the listing on AWS Marketplace, choose View purchase options, and then choose Subscribe. One subscription covers every version in the listing.
- Once the subscription is active, choose Launch your software.
- Choose Launch from EC2 Console (or One-click launch). In Version, choose Ubuntu 24.04 LTS GNOME Desktop - YYYY-MM-DD and your Region.
- Set the instance type.
m5.large(2 vCPU, 8 GiB) is recommended, because the GNOME desktop needs the 8 GiB. For smooth everyday use, pickm5.xlargeor larger. There is no GPU requirement, because the desktop renders in software. - Choose your EC2 key pair. It is the only way in.
- Set the security group to allow inbound TCP 22 from your own IP address only. The listing's default security group also offers TCP 3389 for a direct RDP connection. Restrict that rule to your own address too, or remove it and use the SSH tunnel (Step 5).
- Set the storage. The root volume is 12 GiB gp3 by default. Choose a larger size if you will install applications. cloud-init grows the root filesystem to fill the volume on first boot.
- Leave the metadata settings at their defaults (the image requires IMDSv2), and then choose Launch.
Connect over SSH and check the desktop
ssh -i ~/.ssh/my-key.pem ubuntu@<public-ip>The ubuntu account has passwordless sudo, and no account has a password. Confirm the release, confirm that the instance booted to the graphical target with the GNOME login screen (GDM) running, and list the installed desktop packages.
grep -E '^(PRETTY_NAME|VERSION_ID)=' /etc/os-release systemctl get-default systemctl is-active gdm dpkg-query -W -f='${Package} ${Version}\n' ubuntu-desktop-minimal gnome-shell gdm3 gnome-remote-desktopPRETTY_NAME="Ubuntu 24.04.5 LTS" VERSION_ID="24.04" graphical.target active gdm3 46.2-1ubuntu1~24.04.9 gnome-remote-desktop 46.3-0ubuntu1.2 gnome-shell 46.0-0ubuntu6~24.04.16 ubuntu-desktop-minimal 1.539.2Check that remote desktop is off
A new instance has remote desktop switched off. The helper shows the full status.
sudo sac-remote-desktop status
sudo ss -tlnH | awk '{print $4}' | sortThe certificate fingerprint in the expected output is unique to your instance.
remote desktop service: disabled / inactive RDP backend: disabled listening on 3389: no per-instance RDP credential: generated (/root/sac-remote-desktop-credentials.txt) TLS certificate SHA-256: 8E:92:C1:63:AF:5C:2D:5F:89:C8:88:98:3A:56:2B:BA:D6:9D:71:ED:25:EF:EE:EA:2C:FD:F7:36:7D:E1:EA:EE accounts able to log in at the GNOME login screen: none (set one with:
sudo passwd <user>) 0.0.0.0:22 127.0.0.1:25 127.0.0.53%lo:53 127.0.0.54:53 [::1]:25 [::]:22The only listener reachable from outside the instance is SSH on port 22. The other entries are the local DNS resolver and the local mail transfer agent (port 25, for system mail). Both are bound to loopback addresses only.
Set your password
The GNOME login screen asks for your account password, and a new instance has none. Choose your own. Run the following command yourself on the instance, and enter the new password twice when prompted.
sudo passwd ubuntuThe image's password policy (part of the CIS Level 1 remediation) requires at least 14 characters with upper case, lower case, a digit and a symbol. It allows no more than 3 identical or sequential characters in a row, and no dictionary words. SSH stays key-only, so the password works at the GNOME login screen and for nothing else over the network.
Turn remote desktop on
sudo sac-remote-desktop enableExpected output:
remote desktop enabled: listening on port 3389 TLS certificate SHA-256: <your instance's fingerprint> RDP credential: sudo sac-remote-desktop credentials recommended route: ssh -N -L 3389:localhost:3389 <user>@<instance-ip>, then point your RDP client at localhost:3389If no administrator account has a password yet, the helper refuses and tells you which command to run first. The setting survives reboots.
Print your instance's RDP credential. You need it in the next step.
sudo sac-remote-desktop credentialsThe output lists RDP_USERNAME (ubuntu), RDP_PASSWORD (24 random characters generated at first boot), RDP_PORT and the certificate fingerprints. Only your RDP client uses this credential. It is not an operating system password, and it does not work for SSH.
Connect with your RDP client
The recommended route keeps port 3389 closed and carries RDP inside your SSH connection. The host firewall already admits the tunnel, because it arrives on the loopback interface. On your workstation, open a tunnel and leave it running.
ssh -i ~/.ssh/my-key.pem -N -L 3389:localhost:3389 ubuntu@<public-ip>Then point your RDP client at localhost:3389.
- Windows: Use Remote Desktop Connection (
mstsc) or Windows App, with computerlocalhost:3389. - macOS: Use Windows App, and add a PC with the name
localhost:3389. - Linux: Use Remmina (RDP) with server
localhost:3389, or FreeRDP 3:xfreerdp3 /v:localhost:3389 /u:ubuntu /gfx /bpp:32
When the client asks for credentials, enter RDP_USERNAME and RDP_PASSWORD from Step 4. On first connection, the client shows the server's certificate. The certificate is self-signed and unique to your instance, so compare its fingerprint with RDP_TLS_SHA256 (or RDP_TLS_SHA1, which Windows shows as the thumbprint) before you accept it.
The GNOME login screen appears with the login banner. It does not list accounts. Type ubuntu, press Enter, and then enter the password you set in Step 3. The session is handed over to your own desktop. The orange indicator in the top bar shows that the session is viewed remotely. Disconnecting your RDP client leaves the session running, and connecting again returns to it.
Direct connection instead of the tunnel. Allow TCP 3389 in the instance's security group from your own public address only, never from the whole internet. Admit the same address in the host firewall on the instance.
sudo ufw allow from <your-public-ip> to any port 3389 proto tcpUse the desktop
Open Show Apps (at the bottom of the dock, or press Super and A) to see the installed applications. A terminal is one shortcut away (Ctrl, Alt and T). The ubuntu account keeps its passwordless sudo, so sudo works in the desktop exactly as it does over SSH.
To add software, use apt in the terminal as on any Ubuntu machine, for example sudo apt install libreoffice. Ubuntu's firefox package installs a snap, and this image ships without snapd. Install snapd with sudo apt install snapd and then run sudo snap install firefox, or use Mozilla's own APT repository.
Security posture
Confirm that SSH is key-only, root is locked, no account has a password until you set one, and the host firewall admits SSH only.
sudo sshd -T | grep -E '^(passwordauthentication|permitrootlogin|pubkeyauthentication) '
sudo passwd -S root
sudo awk -F: '$2 !~ /^[!*]/ && $2 != "" {n++} END {print "accounts with a password: " n+0}' /etc/shadow
sudo ufw status | grep -E '^(Status|22/tcp |3389)' || truepermitrootlogin no pubkeyauthentication yes passwordauthentication no root L 2024-04-23 0 99999 7 -1 accounts with a password: 0 Status: active 22/tcp ALLOW Anywhere 22/tcp (v6) ALLOW Anywhere (v6)After Step 3, the third line reads 1 (your own account). root L means the root password is locked.
View the compliance report
The evaluation the build ran is in /usr/share/doc/sac/cis-l1-report.html (HTML), cis-l1-arf.xml (machine-readable ARF) and cis-l1-summary.json (counts, pass rate, threshold, SSG version and checksums) in the same directory. The build host's name and addresses are replaced in the shipped copy.
python3 -c "import json; d=json.load(open('/usr/share/doc/sac/cis-l1-summary.json')); print(d['profileLabel'], d['ssgVersion'], '-', d['pass'], 'of', d['scored'], 'scored rules pass', '(' + str(d['ratePct']) + '%)', '- waived', d['waived'])"
python3 -c "import json; [print(r) for r in json.load(open('/usr/share/doc/sac/cis-l1-summary.json'))['failingRules']]"CIS Level 1 Server 0.1.82 - 358 of 362 scored rules pass (98.9%) - waived 6 all_apparmor_profiles_in_enforce_complain_mode set_nftables_loopback_traffic set_nftables_table set_ufw_default_ruleThe 4 scored rules that do not pass are listed in the summary's failingRules.
- The two nftables rules belong to the profile's nftables firewall option, which this image does not use (ufw is the host firewall).
set_ufw_default_rulefails because outbound traffic is allowed on purpose. A default-deny outbound policy would cut the SSM agent, cloud-init and the instance metadata service off, and it would stop DNS, NTP and package updates.all_apparmor_profiles_in_enforce_complain_modefails because Ubuntu 24.04 loads about 90 of its own AppArmor profiles inunconfinedmode. They exist to grant applications user-namespace access, not to confine them, and the rule counts them as neither enforce nor complain. AppArmor itself is enabled and enforcing its other profiles (sudo aa-status).
Copy the HTML report to your workstation and open it in a browser.
scp -i ~/.ssh/my-key.pem ubuntu@<public-ip>:/usr/share/doc/sac/cis-l1-report.html .You can re-run the same evaluation on your instance at any time. It takes about 5 to 10 minutes and changes nothing. oscap exits with status 2 when any rule fails, and the report is still written.
sudo oscap xccdf eval --tailoring-file /usr/share/sac/openscap/tailoring.xml \
--profile xccdf_co.sac_profile_cis-l1_ec2_single \
--report ~/cis-l1-rescan.html /usr/share/xml/scap/ssg/content/ssg-ubuntu2404-ds.xmlWaived rules
These rules of the profile are deselected through the tailoring file /usr/share/sac/openscap/tailoring.xml and are not scored. The reasons are in /usr/share/doc/sac/cis-l1-waivers.txt. Everything else the profile selects is remediated and scored. The tailoring also selects ufw as the profile's firewall option and chrony as its time service.
Rule Category Why it is waived on EC2
partition_for_tmp single-volume-partitions The image boots from one EBS root volume, so /tmp, /var, /var/log, /var/log/audit, /var/tmp and /home live on the root filesystem.
grub2_password serial-console-and-boot A boot-loader or root password would have to be baked into the image, giving every instance the same credential. Root stays locked and no password exists.
grub2_uefi_password serial-console-and-boot As above, for the UEFI boot loader.
accounts_maximum_age_login_defs key-only-account-aging Password-age defaults apply to every account cloud-init creates at launch. Those accounts are key-only and have no password, so an age limit would expire them and lock the SSH key out. Accounts that do have a password (yours, after Step 3) are still aged.
account_disable_post_pw_expiration key-only-account-aging As above, for the inactivity default.
sshd_limit_user_access ssh-access-list An AllowUsers/AllowGroups list fixed at build time would refuse SSH to accounts you create with cloud-init user-data. SSH is key-only, root login is refused, and your security group restricts the source addresses.
Networking
cloud-init and systemd-networkd configure the EC2 network interface, exactly as on Ubuntu Server.
sudo netplan get network.renderer networkctl list --no-legendnetworkd 1 lo loopback carrier unmanaged 2 ens5 ether routable configuredUbuntu's desktop settings package would normally hand every interface to NetworkManager, which this image does not install. The image keeps systemd-networkd in charge with /etc/netplan/00-network-manager-all.yaml. Do not delete that file unless you have installed NetworkManager and tested the change from the EC2 serial console. Without the file, the instance loses its network connection at the next boot. For the same reason, the network panel in GNOME Settings is empty, which is expected.
Turn remote desktop off, or replace the RDP credential
To switch remote desktop off again, run the following command. The setting survives reboots.
sudo sac-remote-desktop disableTo replace the generated RDP password with a new random one, run the following command, which then prints it. The password is handed to the remote desktop server on standard input, so it never appears in a log or a process list.
sudo sac-remote-desktop rotate
sudo sac-remote-desktop credentialsPatching
unattended-upgrades installs security updates automatically. To see how many updates are waiting, run the following command.
echo "pending upgrades: $(apt-get -s -o APT::Get::Always-Include-Phased-Updates=true dist-upgrade 2>/dev/null | grep -c '^Inst ' || true)"pending upgrades: 0To install every pending update now, run sudo apt-get update && sudo apt-get -y dist-upgrade. Reboot if /var/run/reboot-required exists.
Troubleshooting
The RDP client connects, then the screen stays black or disconnects
GNOME Remote Desktop requires the RDP graphics pipeline. Current Windows and macOS clients support it. With FreeRDP, pass /gfx /bpp:32. Without them, the server logs "Client did not advertise support for the Graphics Pipeline" and closes the connection. Check the server side with the following command.
sudo journalctl -u gnome-remote-desktop --no-pager -n 20The RDP client says the credentials are wrong
The client needs the RDP credential from sudo sac-remote-desktop credentials, not your account password. The account password is only for the GNOME login screen that appears afterwards.
The login screen does not accept my password
The login screen does not list accounts. Type ubuntu (or your account name), and then your password. If the account has no password yet, set it with sudo passwd ubuntu over SSH. After 4 failed attempts, the account is locked for 15 minutes (part of the CIS Level 1 remediation). Unlock it early with sudo faillock --user ubuntu --reset.
Software Updater offers Ubuntu 26.04 LTS
Ubuntu's Software Updater tells desktop users when a newer LTS release is available. This image is Ubuntu 24.04 LTS, which keeps receiving security updates, so you can close the notice. To stop it appearing, set Prompt=never in /etc/update-manager/release-upgrades.
The session locked while I was away
The screen locks after 15 minutes of inactivity (CIS Level 1). Unlock it with your account password.
Cannot connect via SSH
- Check that the security group allows port 22 from your address.
- Use the user
ubuntuand the key pair you chose at launch. Password login over SSH is disabled by design. - If you removed or edited
/etc/netplan/00-network-manager-all.yaml, the instance may have booted without networking. Use the EC2 serial console or Session Manager to restore the file.
Emergency access
No account has a password until you set one. EC2 Serial Console and single-user recovery need a local password, and the one you set in Step 3 works for the serial console. Session Manager (SSM) is the other way in if SSH is unavailable.
Support
SecureAnyCloud provides 24/7 technical support for this image by email and live chat: sales@secureanycloud.com.
Ubuntu is free and open source, assembled from thousands of independently packaged components, each under its own license (see /usr/share/doc/<package>/copyright). No subscription or license key is required, and Ubuntu Pro is neither included nor required. Ubuntu is a registered trademark of Canonical Ltd. GNOME is a trademark of the GNOME Foundation. CIS and CIS Benchmarks are trademarks of the Center for Internet Security, Inc. The names are used only to identify the software this image contains; SecureAnyCloud is not affiliated with or endorsed by Canonical, the GNOME Foundation or CIS.
Deploy on AWS
Launch Ubuntu 24.04 LTS GNOME Desktop on AWS with 24/7 support from SecureAnyCloud.
View on Marketplace
Need Help?
Our support team is available 24/7.
sales@secureanycloud.com