Skip to content

Security tab shows false negatives for UFW/SSH and JSON parse error (“Bad control character…”) on Ubuntu LTS 24.04 #2478

Description

@fruggeri-fitup

To Reproduce

Steps to Reproduce

  • Add a new Remote Server (Ubuntu).

  • Run Setup Server as root from Dokploy. In Validate, everything is green (Docker/RClone/Nixpacks/Buildpacks/Swarm/Network/Main dir/Railpack).

  • Harden the server:

    • /etc/ssh/sshd_config:

      • PasswordAuthentication no
      • PubkeyAuthentication yes
      • PermitRootLogin no # (optionally) Match Address → PermitRootLogin prohibit-password

UFW installed and enabled; allow 22/tcp only on tailscale0 (or 100.64.0.0/10); default deny incoming.

Open Setup → Security and click Refresh.

Current vs. Expected behavior

Actual Result

Red banner:
Failed to parse output: Bad control character in string literal in JSON at position 176

UFW section shows Not Installed / Not Active / Default: undefined.

SSH section shows Enabled: Not Enabled, Key Auth: Not Enabled, Password Auth: Enabled, Use PAM: Enabled.

These reports are inconsistent with the real server state.

Expected Result

No JSON parse error.

Security tab reflects actual UFW/SSH state.

Image

Provide environment information

Dokploy: (version from UI footer)
Remote server OS: Ubuntu 24.04 LTS
Network: Tailscale; SSH bound to tailscale0 only
Validate shows OK: Docker 27.0.3, RClone 1.71.0, Nixpacks 1.39.0, Buildpacks 0.35.x, Swarm initialized, network created

Which area(s) are affected? (Select all that apply)

Remote server

Are you deploying the applications where Dokploy is installed or on a remote server?

Remote server

Additional context

No response

Will you send a PR to fix it?

Maybe, need help

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions