How to Connect to a NAS via SSH with Root Access
Secure Shell, better known as SSH, is the backbone of secure remote communication with networked devices, especially NAS storage. If you anage a NAS, chances are you’ve run into tasks that require more than just basic user access. Enter root privileges.
Root access allows full control of the NAS system, letting you run advanced commands, scripts, and configurations not available to standard users. But while powerful, this kind of access also comes with responsibility.
What is SSH (Secure Shell)?
SSH is a cryptographic network protocol used to securely log into the local NAS. It’s widely used for system administration and automated scripts.
What are Root Privileges?
Root privileges refer to the highest level of access on a Unix-based system, including Linux (which UGREEN NAS devices are built on). This allows unrestricted control over the system, including configuration, user management, and installations.

Key Takeaways
- Enable SSH safely: turn on the SSH service, change the default port, avoid exposing it to the public internet, and prefer key-based login.
-
Connect from Windows/macOS via terminal (or tools like PuTTY/WinSCP); elevate with
sudo -iif admin rights are required. - Fix common errors quickly: bad credentials → recheck user/password or keys; connection refused → enable SSH/port; timeouts → allow traffic in firewall.
How to Enable SSH Service
- Log in to the UGOS Pro system and go to [Control Panel] > [Terminal].
- Check the option Enable SSH Service.
- Specify the SSH port number (default is 22) and click “Apply” to activate the settings.
UGREEN Tip: To enhance SSH connection security, it’s recommended to change the default port number and avoid exposing it directly to the public network, reducing the risk of attacks.

Why Use SSH to Connect to a NAS from Desktop computer?
SSH access from a desktop computer to a NAS offers powerful control, enhanced security, and greater flexibility. It allows direct command-line management of files and system settings, eliminating the restrictions of graphical interfaces. Advanced users can perform troubleshooting, automate tasks (via scripts or cron jobs), and enjoy securely encrypted data transfers. Developers benefit from deploying services (like Docker or web apps) and integrating DevOps tools (such as Ansible or rsync). On Windows PCs, tools like PuTTY, WinSCP, and WSL provide seamless access.
How to connect to a NAS via SSH on Windows
Step-by-Step Guide: Connecting to UGREEN NAS via SSH from Windows
- Ensure your NAS and Windows PC are connected to the same local network.
-
Open the terminal on Windows:
- Press
Win + Rto open the Run dialog. - Type
PowerShelland click OK to launch Windows PowerShell.
- Press
-
Connect via SSH:
- Enter the following command, replacing:
-
usernamewith your administrator account. -
NAS_IPwith your NAS’s IP address. -
portwith your SSH port number (if customized).
-
- Example:
-
Note: To find your UGREEN NAS IP address, go to:
[Control Panel] > [Network] > [Network Connection] (e.g., LAN1, LAN2).
- Enter the following command, replacing:
-
Enter your UGOS Pro administrator password when prompted and press
Enterto log in. -
Switch to root privileges (if needed):
- After logging in, enter the command
sudo -iand press Enter to gain root privileges. - Enter the administrator password again when prompted.
- You will now have root access to the UGREEN UGOS Pro system.
- After logging in, enter the command
SSH Connection Guide for macOS to UGREEN NAS
-
Network Preparation
Ensure both your NAS and macOS device are connected to the same local network. -
Launch Terminal
Open the Terminal application (Go to: Applications > Utilities > Terminal). -
Establish SSH Connection
Enter this command, then press Return:Replace:ssh username@NAS_IP -p port-
usernamewith your administrator account -
NAS_IPwith your NAS’s IP address -
portwith your SSH port number (default is 22)
-
-
Authentication
When prompted:- Enter your administrator password
- Press Return to complete login
-
Enable Root Access
After successful login:Press Return, then:sudo -i- Re-enter your administrator password when prompted
- Press Return again
-
Confirmation
You now have root privileges in the UGOS Pro system.
Common Issues and Troubleshooting
| Issue | Cause | Solution |
|---|---|---|
| Permission denied | Wrong credentials | Check username/password or SSH keys |
| Connection refused | SSH disabled or port blocked | Make sure the SSH service is enabled. |
| Timeout | Firewall issues | Ensure NAS IP is reachable and firewall allows traffic |
FAQs: How to Connect to NAS via SSH with Root Privileges?
1. Do all NAS devices support SSH root access?
Not all. Some restrict root access for security. Check your model’s documentation.
2. Is it safe to enable root login via SSH?
It’s generally discouraged unless temporarily used for specific tasks. Always secure it with SSH keys.
3. How do I know my NAS supports sudo?
Try running sudo -i after logging in. If it fails, your user might lack administrative rights.
4. How do I use SSH keys for NAS access?
Generate a key pair using ssh-keygen, then copy the public key to the NAS user’s ~/.ssh/authorized_keys file.
5. Can I use root SSH to modify NAS firmware?
Technically yes, but it’s risky and often voids warranties. Proceed only if you know what you’re doing.
Conclusion
Learning how to connect to NAS via SSH with root privileges opens a world of customization and control. From scripting backups to tweaking system settings, root access empowers IT professionals and enthusiasts alike. But with great power comes the need for caution. Always secure your SSH sessions, limit access, and follow best practices to keep your NAS safe and reliable.