Project

General

Profile

« Previous | Next » 

Revision 03b42caa

Added by Scott Ullrich about 20 years ago

Make sure ak key is cleared

View differences:

etc/sshd
42 42
	/*    if any of these files are 0 bytes then they are corrupted.
43 43
	 *    remove them
44 44
	 */
45
	$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');
45
	$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');
46 46
	foreach($files_to_check as $f2c) {
47 47
		if(file_size($f2c)==0) {
48 48
			mwexec("rm /etc/ssh_host*");
......
92 92
	unset($config['ssh']['dsa']);
93 93
	unset($config['ssh']['rsa']);
94 94
	unset($config['ssh']['rsa1']);
95
	unset($config['ssh']['ak']);
95 96
	write_config("Clearing SSH keys from config.xml");
96 97

  
97 98
	if (!file_exists("$sshConfigDir/ssh_host_key") and $config['ssh']['dsa'] == "") {

Also available in: Unified diff