Skip to content

Support us at

Authors: fire1ce | Created: 2023-01-05 | Last update: 2026-07-14

Synology SSH Root Access

Synology DSM does not require direct SSH login as root. The supported method is to connect with a local administrator account and then open a root shell with sudo -i.

Direct root login is retired from this guide

An older version of this page changed the root password and enabled PermitRootLogin. I no longer recommend that workaround. It bypasses DSM's normal administrator flow and depends on manual changes to Synology-managed SSH configuration.

Enable SSH in DSM

  1. Sign in to DSM with an administrator account.
  2. Open Control Panel > Terminal & SNMP > Terminal.
  3. Enable SSH service.
  4. Keep the selected port behind your firewall. Do not expose DSM SSH directly to the public internet.

Open a root shell

Connect with a user that belongs to DSM's local administrators group:

ssh admin-user@nas-address

Then elevate with the same administrator password:

sudo -i

Confirm the shell before making system changes:

whoami

The result should be root.

When the work is finished, leave the root shell and then close SSH:

exit
exit

Disable the SSH service in DSM when you do not need it regularly.

Sources

Comments