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¶
- Sign in to DSM with an administrator account.
- Open Control Panel > Terminal & SNMP > Terminal.
- Enable SSH service.
- 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.