How to know if someone entered your server without permission?

Published on 2026-10-17 by frfrand

Signs that someone entered your Linux server, which logs to check, how to investigate without destroying evidence, and what to do if you confirm the intrusion.

How to know if someone entered your server without permission?

Short answer: there is no command that confirms it. It is suspected through signs —accesses no one recognizes, new users or SSH keys, unknown processes or scheduled tasks, unusual outbound connections— and investigated by comparing them with what should be happening, preserving logs before restarting or deleting anything.

Your website is still working, the domain opens and no one complained. Does that prove your server is secure? Not necessarily. Some intrusions interrupt everything; others try to go unnoticed.

Knowing if someone entered without permission consists of looking for signs, contrasting them and determining what happened. There is no single command that guarantees the system was never compromised.

What are the most common signs?

One of the first clues is unrecognized accesses. For example, an administrative session started from an unexpected location or at a time when no one on the team was working.

Another clue is new users or changed permissions. If an account appears that your team did not create, or an application obtains permissions it did not need, it deserves a review.

Unknown processes consuming CPU, unusual outbound connections, new scheduled tasks, files modified without reason, or security alerts from the provider may also appear.

But be careful: each of those signals has legitimate explanations. A CPU spike could be a backup. Access from another IP could be someone using a VPN. What matters is investigating, not assuming.

Where to start on Linux?

If you have a suspicion, the first thing is to avoid impulsive changes. Before restarting or deleting files, gather information about what happened and when.

On a system with proper permissions, you can start with questions like these:

  • Who should have administrative access?
  • Were users, SSH keys, or scheduled tasks created recently?
  • Which applications and processes should be active?
  • Are there connections or network destinations that the service does not need?
  • Do the logs show repeated authentication failures or unexpected logins?

On Ubuntu, authentication logs may appear in system files or in the journal, depending on the configuration. Tools like journalctl and last can help reconstruct activity, but they are not definitive proof. An attacker with elevated privileges could have manipulated local logs.

A simple example

Imagine a VPS running a web server and a database. Suddenly, the processor stays at 100% during the early hours of the morning, and a process with a name unknown to the team appears.

It doesn't automatically mean there is an attacker. First, compare the process with recent deployments, scheduled tasks, and installed software. If there is no valid explanation, investigate its origin and connections.

If you also find an unknown SSH key added to a privileged account, the level of suspicion increases significantly. Combined signals are usually more useful than a single anomaly.

What do I do if I think the server is compromised?

The priority is to contain the risk without destroying evidence. Depending on the impact, it may be necessary to isolate the machine from certain accesses, preserve logs, and capture useful information before removing processes.

In a company, the appropriate thing is to activate an incident response plan or seek specialized help. Changing passwords from a possibly compromised machine or restoring without investigating can leave the problem active.

Afterwards, credentials, tokens, service keys, other related systems, and possible leaks must be reviewed. A reliable recovery may require rebuilding the machine from a clean image and restoring verified data, not simply deleting a suspicious file.

How to reduce the possibility of it happening again?

Apply updates, limit privileges and access, use strong authentication, review exposed services, and maintain tested backups. It is also advisable to centralize important logs outside the machine itself so that an intrusion cannot easily delete them.

How does it relate to ArduMaker?

Managed VPSs on ArduMaker also run processes, accounts, and services that are worth supervising, and the platform adds some sources of information outside the machine. The command history keeps for 30 days the commands launched from the panel or by an MCP agent: who launched them (and, if it was an agent, which person authorized them), the exit code, and the beginning of the output. In addition, SSH access is opened with a port redirection that can expire, so it closes on its own.

That history does not include what is done in an interactive terminal or via SSH, so it does not replace system logs. The panel can facilitate operations, but it does not replace good practices for access, review, and incident response.

In one sentence: to know if someone entered your server, you need to compare actual activity with what should be happening. It is not about looking for a red screen that says "hacked," but about investigating evidence and acting in an orderly manner.

Frequently asked questions

What command shows who logged in on Linux? last lists recorded logins, and journalctl (or /var/log/auth.log on Ubuntu) shows authentication attempts. They serve as a clue, not as definitive proof.

Should I restart the server if I suspect an intrusion? Not as a first step: restarting can erase useful information, such as active processes and connections. First preserve logs and evidence.

Is it enough to delete the suspicious file or process? Almost never. If there was privileged access, the safest option is to rebuild from a clean image, restore verified data, and rotate credentials.

Reference: CISA Ransomware Response Guide.

How to know if someone entered your server without permission?
  • servidores
  • ciberseguridad
  • Linux

Keep reading

All articles · VPS plans