summaryrefslogtreecommitdiffstats
path: root/etc/sshd
diff options
context:
space:
mode:
Diffstat (limited to 'etc/sshd')
-rwxr-xr-xetc/sshd5
1 files changed, 5 insertions, 0 deletions
diff --git a/etc/sshd b/etc/sshd
index 7ed4666..aeb94f5 100755
--- a/etc/sshd
+++ b/etc/sshd
@@ -53,6 +53,11 @@
pclose($fd);
$sshConfigDir = "/etc/ssh";
+
+ if (!file_exists("$sshConfigDir/ssh_host_key") and $config['ssh']['dsa'] == "") {
+ /* remove previous keys and regen later */
+ mwexec("rm /etc/ssh/ssh_host_*");
+ }
if (!file_exists("$sshConfigDir/ssh_host_key") and $config['ssh']['dsa'] == "") {
/* generate keys */
OpenPOWER on IntegriCloud