Shutdown NAS in PowerPanel
7
su root
A prompt ask you to provide the root password to complete the authentication.
Password:
2. Generate a new RSA key pair.
ssh-keygen –t rsa
This command will ask you to provide a location to save the keys and a passphrase. (Press Enter if you
change nothing.)
The prompt message shows as below example:
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
And then ssh-keygen command also asks you to provide a passphrase. Press ENTER to accept the default
(no passphrase).
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
After you confirm the passphrase, the key pair will be generated.
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
3. Copy public key to SSH server of NAS.
ssh-copy-id –i /root/.ssh/id_ras.pub AdminAccount@IpAddress
AdminAccount is the administrator account of NAS. IpAddress is the IP address of NAS. This command
requires entering yes and the NAS administrator password to continue connection.
The message shows as below example:
The authenticity of host '192.168.20.10 (192.168.20.10)' can't be established.
RSA key fingerprint is b1:99:1e:25:a5:f9:c9:86:15:5e:5a:4b:53:4f:a8:c9.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.20.10' (RSA) to the list of known hosts.
root@192.168.20.10's password:
Edit External Command of PowerPanel for Linux
Use vi command to edit /etc/pwrstatd-powerfail.sh and /etc/pwrstatd-lowbatt.sh. Append below shell
command to allow the shutdown of the NAS.
ssh AdminAccount@IpAddress poweroff
AdminAccount is the administrator account of NAS. IpAddress is the IP address or domain name of NAS.