This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| syno:dsm7rescue [2026/09/02 22:22] – [Prepare DSM to get access through SSH with password login enabled] Bernard Condrau | syno: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=" | + | OTPQ=" |
| AUTH=0; | AUTH=0; | ||
| CODE=" | CODE=" | ||
| Line 79: | Line 79: | ||
| exit 1 | exit 1 | ||
| </ | </ | ||
| - | - Serving the OTP with '' | + | - Serving the OTP through wget to '' |
| - | - Set up a task in //Task Scheduler// of your DSM. | + | /* |
| + | * php to deliver encryption key to remote NAS | ||
| + | * | ||
| + | * (c) 2026, Bernard Condrau | ||
| + | * | ||
| + | */ | ||
| + | |||
| + | // Build an array of trusted IP addresses... | ||
| + | $trusted=array(' | ||
| + | |||
| + | // check if request is made from valid ip address | ||
| + | if (in_array($_SERVER[' | ||
| + | $password = array( | ||
| + | ' | ||
| + | shell_exec('/ | ||
| + | ], | ||
| + | ); | ||
| + | // get the share name from the request | ||
| + | $share = $_GET[' | ||
| + | if (isset($password[$share]) && ($password[$share][0] == $_GET[' | ||
| + | echo $password[$share][1]; | ||
| + | exit(0); | ||
| + | } | ||
| + | } | ||
| + | echo ''; | ||
| + | ?></ | ||
| + | - Compute the OTP in '' | ||
| + | source / | ||
| + | python3 / | ||
| + | deactivate | ||
| + | exit 0</ | ||
| + | - Set up a task in //Task Scheduler// of your DSM. Choose as task '' | ||
| ===== 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 ===== | ||