From c2338828631f26927ad13683470bdae8ead975fd Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Sat, 9 Jul 2005 17:43:28 +0000 Subject: If keys exist and they are not stored in config.xml, remove the keys and regen and then store them in config.xml --- etc/sshd | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'etc/sshd') 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 */ -- cgit v1.1