Home / Blog Center / Tips & Tutorials /

How to Connect to a NAS via SSH with Root Access

How to Connect to a NAS via SSH with Root Access

02/12/2025

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.

UGREEN NAS storage

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 -i if 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

  1. Log in to the UGOS Pro system and go to [Control Panel] > [Terminal].
  2. Check the option Enable SSH Service.
  3. 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.

enable ssh service

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

  1. Ensure your NAS and Windows PC are connected to the same local network.
  2. Open the terminal on Windows:
    • Press Win + R to open the Run dialog.
    • Type PowerShell and click OK to launch Windows PowerShell.
  3. Connect via SSH:
    • Enter the following command, replacing:
      • username with your administrator account.
      • NAS_IP with your NAS’s IP address.
      • port with 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).
  4. Enter your UGOS Pro administrator password when prompted and press Enter to log in.
  5. Switch to root privileges (if needed):
    • After logging in, enter the command sudo -i and 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.

SSH Connection Guide for macOS to UGREEN NAS

  1. Network Preparation
    Ensure both your NAS and macOS device are connected to the same local network.
  2. Launch Terminal
    Open the Terminal application (Go to: Applications > Utilities > Terminal).
  3. Establish SSH Connection
    Enter this command, then press Return:
    ssh username@NAS_IP -p port
    
    Replace:
    • username with your administrator account
    • NAS_IP with your NAS’s IP address
    • port with your SSH port number (default is 22)
  4. Authentication
    When prompted:
    • Enter your administrator password
    • Press Return to complete login
  5. Enable Root Access
    After successful login:
    sudo -i
    
    Press Return, then:
    • Re-enter your administrator password when prompted
    • Press Return again
  6. 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.

Quick Navigation
Top Picks for You
UGREEN NASync DH2300
UGREEN NASync DH2300

$188.99 $209.99

Learn More
10% OFF
flag
Related Reads
How to Configure Your NAS Firewall for Speed and Security (November 2025 Update)
How to Configure Your NAS Firewall for Speed and Security (November 2025 Update)
23/06/2025
How to Protect Your NAS from Ransomware Attacks
How to Protect Your NAS from Ransomware Attacks
23/12/2024