Cehpoint

Free preview lesson ยท 20 min

Connecting Linux servers

From the course Agentic SOC essentials.

Connecting Linux servers

In this lesson you will connect a Linux server with one command, understand what that command does, and know what the agent does from its first minute.

Before you start

You need:

  • an account at app.cehpoint.co.uk with the owner or responder role (viewers cannot connect devices);
  • root access on the server (you will run the command with sudo);
  • a supported Linux: one with systemd and python3 3.7 or newer. Cehpoint has tested Ubuntu 24.04, 22.04 and 20.04, and Debian 12 and 11. Rocky Linux 9, AlmaLinux 9 and Amazon Linux 2023 work with some limits (no system-package vulnerability check yet).

The server needs to reach soc.cehpoint.co.uk over HTTPS (port 443) outbound. Nothing needs to reach the server.

Step 1: get a one-time code

In the console open Connect a device, choose Linux server and press Get the command. The console shows a command containing a one-time code:

bash
curl -fsSL https://soc.cehpoint.co.uk/install | sudo bash -s -- --code CEH-XXXX-XXXX

The code is valid for 30 minutes and for one device. If it expires, get a new one. The console also offers the same command with --antivirus added, which installs an optional ClamAV malware scan that runs nightly.

The Connect a device screen with Linux server selected and a one-time install command shown
The Connect a device screen with a Linux command

Step 2: run it on the server, as root

Paste the command into a terminal on the server. Reading it from left to right:

  • curl -fsSL https://soc.cehpoint.co.uk/install downloads the installer script over HTTPS and fails cleanly if anything goes wrong;
  • | sudo bash -s -- runs it as root;
  • --code CEH-XXXX-XXXX passes your one-time code.

The installer then:

  1. downloads the agent files and checks each one against a list of SHA-256 fingerprints (a SHA-256 hash is a unique fingerprint of a file's exact contents; if one byte changes, the fingerprint changes). On any mismatch it stops;
  2. exchanges your code for a device token, which is stored on the server in a file only root can read. Cehpoint keeps only a hash of it;
  3. sets up a systemd timer that runs the agent every 60 seconds, and a deeper hygiene check that runs every 6 hours. The first security check starts straight away at the lowest priority and takes 2 to 15 minutes.

Step 3: wait for the first report

Keep the Connect a device screen open. It watches for the new device and tells you when it "is connected and reporting". For a server this is usually about a minute. The server then appears in Devices.

What the agent does from its first minute

Every minute the agent reports, among other things:

  • health: CPU, memory, disk, load, uptime and network rates;
  • SSH sign-ins (who, from which address, key or password) and failed attempts per address;
  • SSH settings such as whether password login and root login are allowed;
  • listening ports with program names, running pm2 apps and containers, and failed services;
  • programs running from temporary folders, scheduled tasks and startup entries, including SSH authorised keys;
  • waiting security updates, TLS certificates, and attack patterns in your web server access logs (nginx, Apache or Caddy).

Only new log lines that match attack patterns are sent, as counts and short masked samples, not whole logs. Command lines are masked for passwords and tokens before sending.

The first 15 minutes: learning what is normal

A newly connected server spends its first 15 minutes learning. During that time:

  • addresses that sign in are recorded as yours, so your own login does not trigger an alert;
  • the open ports and running containers it sees become the baseline, so only new ones raise alerts later.

Addresses seen in those first 15 minutes are also never blocked automatically. This is why it is best to install the agent from your usual admin location.

The default automation level

Linux servers start in Guard: everything is reported, and safe automatic responses (such as blocking password-guessing addresses and installing security updates) are switched on. You can change this per device in Devices. Module 3 explains each level.

Lab: connect a test server

Hands-on lab

Environment: Your own test VM (a Linux virtual machine you own, for example Ubuntu 24.04), connected to your own Cehpoint account. Do not use the demo account for this lab, and never install on a server you do not own or manage.

  1. Sign in to your own account at app.cehpoint.co.uk and open Connect a device. Choose Linux server and press Get the command.
  2. Note the time the code expires (shown in UK time).
  3. On the VM, run cat /etc/os-release and confirm it is a supported release.
  4. Paste and run the command from the console. Read the installer's output: it says "Downloading the agent...", then "Connecting this server with your code...", and finally "Connected as" followed by the server's name. (Had a checksum failed, it would have stopped with "Checksum mismatch; not installing.")
  5. Return to the console and wait for "is connected and reporting". Open Devices and confirm the automation level is guard.
  6. On the VM, run systemctl list-timers | grep -i cehpoint and find the two timers: cehpoint-soc-agent.timer (every minute) and cehpoint-hygiene.timer (every 6 hours).
  7. Optional: remove the device afterwards (you will learn how in module 4).

If you have no test VM, open Connect a device in the demo console, read the three steps it shows, and identify where the code's validity is stated.

Check your understanding

  • How long is a one-time code valid, and for how many devices?
  • What does the installer do if a downloaded file's SHA-256 does not match?
  • Why are addresses seen in the first 15 minutes treated differently?