mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-13 16:14:40 +00:00
(sshd) add HostKey to sshd_config to force available hostkeys. closes https://github.com/opnsense/core/issues/1200
This commit is contained in:
parent
b08d58270e
commit
4e83616c7e
@ -105,6 +105,9 @@ if (isset($sshcfg['passwordauth'])) {
|
||||
$sshconf .= "ChallengeResponseAuthentication no\n";
|
||||
$sshconf .= "PasswordAuthentication no\n";
|
||||
}
|
||||
foreach ($keys as $key) {
|
||||
$sshconf .= "HostKey {$etc_ssh}/{$key}\n";
|
||||
}
|
||||
|
||||
/* Write the new sshd config file */
|
||||
file_put_contents("{$etc_ssh}/sshd_config", $sshconf);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user