diff options
Diffstat (limited to 'etc/sshd')
-rwxr-xr-x | etc/sshd | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -135,7 +135,14 @@ exit; } - if (!file_exists("$sshConfigDir/ssh_host_key")) { + // Check for all needed key files. If any are missing, the keys need to be regenerated. + $generate_keys = false; + foreach ($files_to_check as $f2c) { + if (!file_exists($f2c)) { + $generate_keys = true; + } + } + if ($generate_keys) { /* remove previous keys and regen later */ file_notice("SSH", "{$g['product_name']} has started creating your SSH keys. SSH Startup will be delayed. Please note that reloading the filter rules and changes will be delayed until this operation is completed.", "SSH KeyGen", ""); mwexec("rm /etc/ssh/ssh_host_*", true); |