CyberPower AN1302 user manual Edit External Command of PowerPanel for Linux

Page 8

Shutdown NAS in PowerPanel

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.

7

Image 8
Contents Application Note AN1302 Content Set-up Configuration on WindowsIntroduction Configuration on Mac OS Configure Proper Delay Time to Turn Off UPSShutdown Hibernate Off Delay600/delay Generate an SSH KeyPassword Click the Open Directory Utility... buttonLaunch the Terminal from the Applications Utilities Su rootEdit External Command of PowerPanel for Mac Oo.oClick the Shutdown Options... button Configuration on LinuxConfigure Shutdown Options of Energy Saver Edit External Command of PowerPanel for Linux Ssh-copy-id -i /root/.ssh/idras.pub AdminAccount@IpAddressSuggestion Etc/init.d/pwrstatd stopUse vi to open /etc/pwrstatd.conf Etc/init.d/pwrstatd start