From: Viktor Szakats Date: Fri, 21 Mar 2025 13:36:46 +0000 (+0100) Subject: sshserver: fix excluding obsolete client config lines X-Git-Tag: curl-8_13_0~100 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b214acbb0c58a1ad1097058c22fb3b5509b98a85;p=thirdparty%2Fcurl.git sshserver: fix excluding obsolete client config lines It was already excluded for OpenSSH-Windows. Extend it to all OpenSSH above v7.3. Syncing up this logic with the sshd server config. Fixing, in `sftp_server.log`: ``` log/server/curl_sftp_config line 33: Unsupported option "rhostsrsaauthentication" log/server/curl_sftp_config line 34: Unsupported option "rsaauthentication" ``` `no` has been the default for these since OpenSSH 3.3 (2002-06-21). Closes #16784 --- diff --git a/tests/sshserver.pl b/tests/sshserver.pl index 3914ad888a..063e37973a 100755 --- a/tests/sshserver.pl +++ b/tests/sshserver.pl @@ -1016,8 +1016,8 @@ push @cfgarr, 'PasswordAuthentication no'; push @cfgarr, 'PreferredAuthentications publickey'; push @cfgarr, 'PubkeyAuthentication yes'; -# RSA authentication options are not supported by OpenSSH for Windows -if (!($sshdid =~ /OpenSSH-Windows/ || pathhelp::os_is_win())) { +# RSA authentication options are deprecated by newer OpenSSH +if (!($sshid =~ /OpenSSH/) || ($sshvernum <= 730)) { push @cfgarr, 'RhostsRSAAuthentication no'; push @cfgarr, 'RSAAuthentication no'; }