summaryrefslogtreecommitdiffstats
path: root/etc/sshd
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-07-17 19:45:23 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-07-17 19:45:23 +0000
commit03b42caaf5885e55489d8831467d0bfebdc60286 (patch)
treeb972fb0b50721743abaeca945e4137cb75da9ba4 /etc/sshd
parent8d72c64e1ce75f2a8281db20e3ceeb5fba1181ab (diff)
downloadpfsense-03b42caaf5885e55489d8831467d0bfebdc60286.zip
pfsense-03b42caaf5885e55489d8831467d0bfebdc60286.tar.gz
Make sure ak key is cleared
Diffstat (limited to 'etc/sshd')
-rwxr-xr-xetc/sshd3
1 files changed, 2 insertions, 1 deletions
diff --git a/etc/sshd b/etc/sshd
index af3e9e4..1ffb843 100755
--- a/etc/sshd
+++ b/etc/sshd
@@ -42,7 +42,7 @@
/* if any of these files are 0 bytes then they are corrupted.
* remove them
*/
- $files_to_check = array('ssh_host_dsa_key','ssh_host_dsa_key.pub','ssh_host_key','ssh_host_key.pub','ssh_host_rsa_key','ssh_host_rsa_key.pub');
+ $files_to_check = array('ssh_host_dsa_key','ssh_host_dsa_key.pub','ssh_host_key','ssh_host_key.pub','ssh_host_rsa_key','ssh_host_rsa_key.pub','/root/.authorized_keys');
foreach($files_to_check as $f2c) {
if(file_size($f2c)==0) {
mwexec("rm /etc/ssh_host*");
@@ -92,6 +92,7 @@
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'] == "") {
OpenPOWER on IntegriCloud