SSH Access¶
Many SynoCommunity packages require SSH access for configuration, troubleshooting, or advanced usage. This guide explains how to enable and use SSH on your Synology NAS.
Enabling SSH¶
- Open Control Panel > Terminal & SNMP
- Check Enable SSH service
- Optionally change the port (default: 22)
- Click Apply
Connecting via SSH¶
From macOS/Linux¶
Open Terminal and run:
Replace your-username with your DSM admin username and your-nas-ip with your NAS IP address or hostname.
From Windows¶
Use an SSH client like:
- Windows Terminal (built-in on Windows 10/11):
ssh your-username@your-nas-ip - PuTTY: Enter hostname and port, click "Open"
- MobaXterm: Create new SSH session
Example¶
You'll be prompted for your DSM password.
Running Commands as Root¶
Most administrative commands require root privileges. Use sudo:
Enter your password when prompted.
For an interactive root shell:
Warning
Be careful when running commands as root. Incorrect commands can damage your system.
Common Tasks¶
View Package Logs¶
# Package-specific logs
cat /var/packages/<package-name>/var/*.log
# System package log
sudo cat /var/log/synopkg.log | grep <package-name>
Restart a Package¶
Check Package Status¶
Alternatives to SSH¶
If you prefer a graphical interface for file management and log viewing:
File Browser¶
File Browser is available from SynoCommunity and provides a web-based file manager. It's useful for:
- Browsing and downloading log files
- Editing configuration files
- Managing files without command-line access
DSM File Station¶
For basic file access, DSM's built-in File Station can browse most directories, though some system paths may be restricted.
Security Recommendations¶
- Use strong passwords or SSH keys
- Change the default port from 22 to reduce automated attacks
- Disable SSH when not in use if you rarely need it
- Enable auto-block in Control Panel > Security to block repeated failed login attempts
- Use a firewall to restrict SSH access to trusted networks
Troubleshooting¶
Connection Refused¶
- Verify SSH is enabled in Control Panel
- Check you're using the correct port
- Ensure your firewall allows SSH connections
Permission Denied¶
- Verify your username and password
- Ensure your account has admin privileges
- Check if auto-block has blocked your IP
Command Not Found¶
Some commands require full paths. SynoCommunity packages install to /var/packages/<package>/target/bin/.
See Also¶
- Troubleshooting - Common issues and solutions
- Synology KB: SSH Access