diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2005-07-09 17:43:28 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2005-07-09 17:43:28 +0000 |
commit | c2338828631f26927ad13683470bdae8ead975fd (patch) | |
tree | 9d4e77a25401220ec86c98d049ef7d19037cee64 /etc | |
parent | 9c704188010c2efe706d32fa2bfe71115c971941 (diff) | |
download | pfsense-c2338828631f26927ad13683470bdae8ead975fd.zip pfsense-c2338828631f26927ad13683470bdae8ead975fd.tar.gz |
If keys exist and they are not stored in config.xml, remove the keys and regen and then store them in config.xml
Diffstat (limited to 'etc')
-rwxr-xr-x | etc/sshd | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -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 */ |