Fix support for SSH deprecated option on 'Authentication' page

This commit is contained in:
Ilia Ross
2025-01-17 14:56:22 +02:00
parent 6b3457e9fd
commit bb8421c411
2 changed files with 9 additions and 4 deletions

View File

@@ -141,9 +141,13 @@ if ($version{'type'} eq 'openssh' && $version{'number'} >= 5) {
if ($version{'type'} eq 'openssh' && $version{'number'} >= 5) {
# Challenge-response support
$chal = &find_value("ChallengeResponseAuthentication", $conf);
my $chall_name = $version{'number'} >= 6.2 ?
"KbdInteractiveAuthentication" : "ChallengeResponseAuthentication";
$chal = &find_value($chall_name, $conf);
my $chall_def = $version{'number'} >= 6.2 ?
lc($chal) ne 'no' : lc($chal) eq 'yes';
print &ui_table_row($text{'users_chal'},
&ui_yesno_radio('chal', lc($chal) eq 'yes'));
&ui_yesno_radio('chal', $chall_def));
}
if ($version{'type'} eq 'openssh' && $version{'number'} < 3.7 ||

View File

@@ -115,8 +115,9 @@ if ($version{'type'} eq 'openssh' && $version{'number'} < 3.7 ||
}
if ($version{'type'} eq 'openssh' && $version{'number'} >= 5) {
&save_directive("ChallengeResponseAuthentication", $conf,
$in{'chal'} ? 'yes' : 'no');
my $chall_name = $version{'number'} >= 6.2 ?
"KbdInteractiveAuthentication" : "ChallengeResponseAuthentication";
&save_directive($chall_name, $conf, $in{'chal'} ? 'yes' : 'no');
}
&save_directive("IgnoreRhosts", $conf, $in{'rhosts'} ? 'yes' : 'no');