Is my server hacked? How to check your own server for warning signs
Nobody can prove a server is clean from the outside. What you can do is check the places attackers use and say honestly which ones you could not read. This is that checklist.
What a check can and cannot prove
If an attacker has full control, the machine can lie to you. A check that reads the server therefore proves only what it reads. The honest results are found, not found in what I read and unknown. Dante follows exactly that: before it concludes anything it proves that its connection really reached the server (it must get its own random value back), and if it cannot read a proof the verdict is unknown, never safe.
The places to look
- SSH settings (
/etc/ssh/sshd_config): password login on, root login on, or empty passwords. "Safe" only if none of the listed settings is bad. - Authorized keys: keys you do not recognise in
~/.ssh/authorized_keys(for every account). - World-writable files in web folders and
/etc: anyone on the machine, including a hacked web app, can change them. - Web shells: small scripts in the web root that run commands from a request. Look for recently changed PHP files, odd names and calls like
eval(base64_decode(...)). - Outdated PHP and software: judged by version against known vulnerabilities. A version number alone never decides it, because distributions patch silently - so Dante says so instead of guessing.
- Scheduled tasks: cron entries and systemd timers you did not create.
- Open ports: services listening on all interfaces that should only listen locally.
- A changed SSH host key: it can mean a reinstall - or someone in between. Compare the key the server shows with the one remembered in
known_hostsbefore you type any password.
Check a server with Dante
Dante connects with your own key, only to a server you named, and only reads. It shows each result with the command output it came from.
$ npx dante-watch --ssh root@your-server --key ~/.ssh/id_ed25519
channel confirmed (your-server)
STEP NEEDED SSH: PasswordAuthentication yes ← /etc/ssh/sshd_config line 63
UNKNOWN PHP: php binary not found for this userA fix is shown as a plan with the exact commands first. Nothing is changed until you say yes to that plan.
If you find something
- Do not clean in place first. Note what you found and when.
- Rotate every credential that lived on that server (SSH keys, database and API secrets).
- If a web shell or unknown key was real, rebuild the server from a clean image and restore data you have verified.
- Fix the way in (the weak setting or the outdated software), otherwise it happens again.
npx dante-watch. Step-by-step for Mac, Windows and Linux.~/.dante and it is gone.Questions people ask
How can I tell if my Linux server was hacked?
Look for unknown SSH keys and accounts, recently modified files in web folders, unexpected cron jobs, strange listening ports and weak SSH settings. No read-only check can prove a compromised machine is clean, so treat results as evidence, not a guarantee.
Is PasswordAuthentication yes dangerous?
It lets anyone on the internet try passwords on your server. Key-only login is the safer default.
Does Dante change my server?
No. It reads. A fix is shown as a plan with the commands, and runs only after your clear yes.
More
- AI agent security risks: seven ways an agent on your machine gets abusedPrompt injection, over-broad permissions, poisoned MCP tools, secrets in readable files, supply-chain malware that talks to your AI assistant.
- How to find leaked API keys and secrets on your own machineWhere keys hide (code, .env, Git history, shell history, cloud files), how to tell a normal private .env from a real leak, and how to check without ever printing the secret..
- Bait files that warn you when someone uses your secretsA fake .env, mcp.json, .npmrc or AWS credential that nobody legitimate would ever use.
- Install Dante in three minutes - and what the packs costStep-by-step install for Mac, Windows and Linux with one command, how to talk to Dante, the free and paid parts, and how updates and knowledge packs work.
- After the Hugging Face incidents: check your tokens and the models you downloadedWhat was reported about Hugging Face Spaces secrets and malicious models, what to rotate, why pickle files are risky, and how to check your own cache and agent config without sending anything anywhere..