]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
sshserver: fix excluding obsolete client config lines
authorViktor Szakats <commit@vsz.me>
Fri, 21 Mar 2025 13:36:46 +0000 (14:36 +0100)
committerViktor Szakats <commit@vsz.me>
Sun, 23 Mar 2025 19:26:35 +0000 (20:26 +0100)
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

tests/sshserver.pl

index 3914ad888a5ba8dbe6b9955750f902dd2b71c551..063e37973aef27bd81b87728992d38456068a9fa 100755 (executable)
@@ -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';
 }