diff options
author | jim-p <jimp@pfsense.org> | 2010-06-21 11:13:30 -0400 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2010-06-21 11:13:30 -0400 |
commit | 2d402f570b4925fe8c44218bdf72de1878704d17 (patch) | |
tree | b644689f845043dac9b5356f44d55b1ed7225c5b /etc/sshd | |
parent | bf02c78434cb5b3b5bec7a8c5b70ee12001641b7 (diff) | |
download | pfsense-2d402f570b4925fe8c44218bdf72de1878704d17.zip pfsense-2d402f570b4925fe8c44218bdf72de1878704d17.tar.gz |
Do a more thorough check for missing sshd key files. Should fix #673
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); |