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
This commit is contained in:
Viktor Szakats 2025-03-21 14:36:46 +01:00
parent fd6e6e8c7a
commit b214acbb0c
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201

View file

@ -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';
}