Repository navigation
What's New
LegacyAlgorithmspackage trait - Servers that are too old for the default methods (for example OpenSSH 5.x) can be reached again. Since 3.21.0 the bundled libssh2 no longer builds SHA-1 key exchange,ssh-rsaandssh-dsshost keys, SHA-1, MD5 and RIPEMD-160 MACs, MD5-encrypted PEM keys, or the 3DES, Blowfish, RC4 and CAST ciphers, so the handshake failed withUnable to exchange encryption keys. Enabling the trait builds libssh2 with them again.
dependencies: [
.package(url: "https://github.com/RuiNelson/SwiftSFTP.git", from: "3.23.0", traits: ["LegacyAlgorithms"])
]These methods are weak, so the trait is disabled by default and default builds are unchanged. When you enable it, use SessionMethodPreference to restrict what a session offers wherever the server does not need them. libssh2 plans to remove these methods in a later release, and the trait will stop having an effect then.
Thanks to @BrooklynBanana for the request and the implementation.