Problem Link to heading

I need to grant regular users SSH access to my Synology NAS, specifically for a Borg account used to back up my TrueNAS.

By default, DSM restricts SSH access to users in the administrators group, as noted at the bottom of this page.

Solution Link to heading

The workaround is to modify /etc/passwd and change the target user's shell from /sbin/nologin to a valid shell like /bin/sh.

sed -e '/^borg:/ s:/sbin/nologin:/bin/sh:' -i /etc/passwd
Important

Synology resets /etc/passwd upon reboot. You must configure a scheduled task to persist this change.

Persistence (Task Scheduler) Link to heading

To ensure the user retains access after a restart, create a Triggered Task in the Synology Task Scheduler that executes the command on boot.

Article ImageArticle Image