diff options
Diffstat (limited to 'etc/sshd')
-rwxr-xr-x | etc/sshd | 18 |
1 files changed, 10 insertions, 8 deletions
@@ -70,14 +70,16 @@ $sshConfigDir = "/etc/ssh"; - unset($config['ssh']['dsa_key']); - unset($config['ssh']['rsa_key']); - unset($config['ssh']['rsa1_key']); - unset($config['ssh']['dsa']); - unset($config['ssh']['rsa']); - unset($config['ssh']['rsa1']); - unset($config['ssh']['ak']); - write_config("Clearing SSH keys from config.xml"); + if($config['ssh']['dsa_key'] <> "") { + unset($config['ssh']['dsa_key']); + unset($config['ssh']['rsa_key']); + unset($config['ssh']['rsa1_key']); + unset($config['ssh']['dsa']); + unset($config['ssh']['rsa']); + unset($config['ssh']['rsa1']); + unset($config['ssh']['ak']); + write_config("Clearing SSH keys from config.xml"); + } //if (!file_exists("$sshConfigDir/ssh_host_key") and $config['ssh']['dsa'] == "") { if (!file_exists("$sshConfigDir/ssh_host_key")) { |