From 33048b933379ae48723f617588ed8aa996ca5d14 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sun, 27 Feb 2022 15:00:58 +0000 Subject: [PATCH] Filesystem API: Include the `ssh-ed25519` public key signature algorithm as an alternative to `ssh-rsa`. The `ssh-rsa` signature algorithm is disabled by default as of OpenSSH 8.8, which breaks SSH2 uploads in WordPress on modern systems. `ssh-ed25519` is one of the suggested alternatives, supported since OpenSSH 6.5. References: * [https://www.openssh.com/txt/release-8.2 OpenSSH 8.2 release notes] * [https://www.openssh.com/txt/release-8.7 OpenSSH 8.7 release notes] * [https://www.openssh.com/txt/release-8.8 OpenSSH 8.8 release notes] Follow-up to [8865]. Props richybkreckel, dd32. Fixes #52409. git-svn-id: https://develop.svn.wordpress.org/trunk@52807 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/class-wp-filesystem-ssh2.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-admin/includes/class-wp-filesystem-ssh2.php b/src/wp-admin/includes/class-wp-filesystem-ssh2.php index bd2f6ba951..7032ae63d9 100644 --- a/src/wp-admin/includes/class-wp-filesystem-ssh2.php +++ b/src/wp-admin/includes/class-wp-filesystem-ssh2.php @@ -88,7 +88,7 @@ class WP_Filesystem_SSH2 extends WP_Filesystem_Base { $this->options['public_key'] = $opt['public_key']; $this->options['private_key'] = $opt['private_key']; - $this->options['hostkey'] = array( 'hostkey' => 'ssh-rsa' ); + $this->options['hostkey'] = array( 'hostkey' => 'ssh-rsa,ssh-ed25519' ); $this->keys = true; } elseif ( empty( $opt['username'] ) ) {