🔐 Save NAS Root SSH Password (Key-Based Login)
To avoid typing your NAS root password every time, use SSH key-based authentication. It’s secure and easy to set up.
Step 1: Generate SSH Key
Open the terminal on your LMDE PC and run:
ssh-keygen -t rsa -b 4096
Press Enter through the prompts to use the default settings.
Step 2: Copy the Key to Your NAS
Use the following command (replace the IP with your NAS IP):
ssh-copy-id root@192.168.0.100
Step 3: Test It
Login to the NAS:
ssh root@192.168.0.100
If it logs in without asking for a password, you're done!
⚙️ Enable Wake-on-LAN on Your NAS
Wake-on-LAN lets you turn on your NAS remotely via a magic packet.
Step 1: Enable in BIOS
Reboot your NAS and enable options like Wake on LAN or Power on by PCI-E in BIOS/UEFI.
Step 2: Enable in Linux
sudo ethtool -s enp37s0 wol g
Step 3: Make It Persistent
Create a systemd service:
sudo nano /etc/systemd/system/wol@.service
Paste this content:
[Unit]
Description=Enable Wake-on-LAN on %i
After=network.target
[Service]
Type=oneshot
ExecStart=/sbin/ethtool -s %i wol g
[Install]
WantedBy=multi-user.target
Enable it:
sudo systemctl enable wol@enp37s0.service
⚙️ Enable Wake-on-LAN on LMDE PC
Follow the same steps to enable WoL on your LMDE PC. Make sure it's supported in BIOS, and the same systemd method can be used for persistence.
📡 Send a Wake-on-LAN Packet
From any device, use the MAC address of your NAS or LMDE PC:
wakeonlan XX:XX:XX:XX:XX:XX
Replace the MAC with the actual hardware address of the device’s network interface.
✅ Done!
You can now connect to your NAS securely and power it on remotely!