Howto: Shutdown QNAP NAS via OPMONis using SSH
When a long lasting power outage happens, the abnormal shutdown of your QNAP network storage can lead to errors of the file system or even data loss. To avoid an annoying and time consuming data check on reboot, you can proactively shutdown your QNAP using SSH Secure Shell.
In the following video we show you
- how to enable SSH in your QNAP NAS and
- how to add your QNAP NAS to the OPMONis configuration so that OPMONis can shut down your NAS in case of a power failure
Shutdown QNAP NAS via SSH, step by step
Follow the following steps to shutdown your QNAP NAS via SSH
1.) Change the QNAP settings to enable SSH access to your QNAP.
Login into your QNAP NAS web interface and enable “Allow SSH connection”. This setting can be found in the control panel under “Network – Telnet/SSH”
2.) Use SSH to connect to your QNAP
You can skip this step by proceeding directly to step 3 (Transfer QNAP Shutdown to OPMONis). But testing the SSH connection with a SSH client ensures that your QNAP NAS is configured correctly.
Let’s check if the SSH access to your QNAP NAS is working as expected:
Start a SSH client of your choice and connect to the IP Address of your NAS. The password you’re asked for is the same password you need to access your QNAP web interface.
(If configured, you can also use the DNS name of your QNAP NAS.)
If you are connecting to your QNAP NAS the first time, you have to acceppt the RSA fingerprint of your NAS to allow the SSH connection.
Now your QNAP NAS will greet you with the “Console Management” main menu:
By pressing “Q”, you can quit the console menu and return to the normal shell environment:
By pressing “Y” you acknowledge qutting the console menu. Now you are in the shell environment.
To trigger the shutdown, enter the following command:
3.) Transfer QNAP shutdown to OPMONis
Now we have all the information to add your QNAP NAS to your OPMONis system configuration:
- System Type: Linux
- Titel: QNAP NAS (or whatever title you like)
- Host Name (DNS) or IP: 169.254.100.100 (or the DNS name of your QNAP NAS)
- SSH Port: 22
- Login: admin
- Password: [your QNAP Web interface password]
- SSH Command:
Q Y /sbin/poweroff
- Execution Timeout: 180
(Shutdown can take several minutes)
Comments are closed.