Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
syno:dsm7rescue [2026/09/02 22:29] – [Prepare DSM to get access through SSH with password login enabled] Bernard Condrausyno:dsm7rescue [2026/09/02 22:35] (current) – [Prepare DSM to get access through SSH with password login enabled] Bernard Condrau
Line 60: Line 60:
 # 2026-08-31: initial # 2026-08-31: initial
 # #
-OTPQ="https://sec.condrau.com/html/synology.php?share=merkur-otp&auth=your-safe-authentication-password-which-should-have-24-or-more-characters"+OTPQ="https://your.cloud.tld/html/synology.php?share=merkur-otp&auth=your-safe-authentication-password-which-should-have-24-or-more-characters"
 AUTH=0; AUTH=0;
 CODE="`wget -qO - $OTPQ`" CODE="`wget -qO - $OTPQ`"
Line 94: Line 94:
  $password = array(  $password = array(
  'merkur-otp' => ['your-safe-authentication-password-which-should-have-24-or-more-characters',  'merkur-otp' => ['your-safe-authentication-password-which-should-have-24-or-more-characters',
- shell_exec('/home/bco/html/merkur-otp.sh') // generate OTP+ shell_exec('/home/user/html/merkur-otp.sh') // generate OTP
  ],  ],
  );  );
Line 106: Line 106:
 echo ''; echo '';
 ?></code> ?></code>
-  - Compute the OTP in ''merkur-otp.sh'':<code>#!/bin/bash+  - Compute the OTP in ''merkur-otp.sh'', this code could also be integrated in file ''synology.php'':<code>#!/bin/bash
 source /home/bco/html/pyotp-env/bin/activate source /home/bco/html/pyotp-env/bin/activate
 python3 /home/bco/html/pyotp-env/merkur-otp.py python3 /home/bco/html/pyotp-env/merkur-otp.py
 deactivate deactivate
 exit 0</code> exit 0</code>
-  - Set up a task in //Task Scheduler// of your DSM.+  - Set up a task in //Task Scheduler// of your DSM. Choose as task ''bash /volume2/rescue/batch/enablepwd'', let it run as root every 15 minutes or in an interval which suits you. Whenever the script detects ''/volume1/homes/'' as non-accessible it will query the cloud server for the OTP and if the OTP matches synology's internal computation of the OTP it will restart the sshd daemon with password login enabled, allowing you to login even if the encrypted volume is not accessible. You can then proceed with one of the unlock actions described below.
  
 ===== How to gain access to encrypted volumes when the KMIP Server was unavailable during DSM boot ===== ===== How to gain access to encrypted volumes when the KMIP Server was unavailable during DSM boot =====