Commit 73518ad8 authored by Ad Schellevis's avatar Ad Schellevis

(legacy) remove ssh1 keys from generating ( when ssh1 is disabled they can't be generated )

for reference:

/usr/local/etc/rc.sshd: The command '/usr/local/bin/ssh-keygen -t rsa1 -N "" -f /usr/local/etc/ssh/ssh_host_key' returned exit code '1', the output was 'Saving key "/usr/local/etc/ssh/ssh_host_key" failed: unknown or unsupported key type Generating public/private rsa1 key pair.'
parent 1ae30f17
...@@ -44,13 +44,12 @@ if (!isset($config['system']['ssh']['enabled'])) { ...@@ -44,13 +44,12 @@ if (!isset($config['system']['ssh']['enabled'])) {
} }
/* reinstall the backup if it is available */ /* reinstall the backup if it is available */
if (file_exists('/conf/sshd/ssh_host_key') && !file_exists("{$etc_ssh}/ssh_host_key")) { if (file_exists('/conf/sshd/ssh_host_rsa_key') && !file_exists("{$etc_ssh}/ssh_host_rsa_key")) {
mwexec("/bin/cp -p /conf/sshd/* {$etc_ssh}/"); mwexec("/bin/cp -p /conf/sshd/* {$etc_ssh}/");
} }
$keys = array( $keys = array(
/* .pub files are implied */ /* .pub files are implied */
'rsa1' => 'ssh_host_key',
'rsa' => 'ssh_host_rsa_key', 'rsa' => 'ssh_host_rsa_key',
'dsa' => 'ssh_host_dsa_key', 'dsa' => 'ssh_host_dsa_key',
'ecdsa' => 'ssh_host_ecdsa_key', 'ecdsa' => 'ssh_host_ecdsa_key',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment