slachiewicz opened a new pull request, #819:
URL: https://github.com/apache/maven-wagon/pull/819

   ## Overview
   
   This PR upgrades Apache SSHD from version 0.8.0 (released in 2012) to 2.13.2 
(latest stable in the 2.x series) to address API incompatibilities and leverage 
modern, well-maintained SSH server implementation for testing.
   
   ## Changes
   
   ### Dependency Updates
   
   Updated `wagon-providers/wagon-ssh-common-test/pom.xml`:
   - `sshd-core`: 0.8.0 → 2.13.2
   - Added `sshd-scp`: 2.13.2 (SCP support split into separate module)
   - Added `sshd-sftp`: 2.13.2 (SFTP support split into separate module)
   
   ### Code Migrations
   
   **SshServerEmbedded.java** - Updated to use SSHD 2.x API:
   - Replaced deprecated `PEMGeneratorHostKeyProvider` with 
`SimpleGeneratorHostKeyProvider`
   - Switched to built-in `ScpCommandFactory` from `org.apache.sshd.scp.server`
   - Simplified to use standard `NativeFileSystemFactory` instead of custom 
implementation
   - Updated `stop()` method signature to throw `IOException` per SSHD 2.x API
   
   **TestPublickeyAuthenticator.java**:
   - Migrated from Apache Mina's `org.apache.mina.util.Base64` to Java's 
built-in `java.util.Base64`
   - Updated imports to match SSHD 2.x package structure 
(`org.apache.sshd.server.auth.pubkey`)
   
   **TestPasswordAuthenticator.java**:
   - Updated imports to match SSHD 2.x package structure 
(`org.apache.sshd.server.auth.password`)
   
   **ShellCommand.java**:
   - Updated `Command` interface implementation to accept `ChannelSession` 
parameter in `start()` and `destroy()` methods as required by SSHD 2.x
   
   ### Removed Obsolete Code
   
   Deleted custom implementations that are now provided by SSHD 2.x:
   - `ScpCommand.java` (458 lines) - Replaced by SSHD 2.x built-in SCP 
implementation
   - `ScpCommandFactory.java` (93 lines) - Replaced by 
`org.apache.sshd.scp.server.ScpCommandFactory`
   
   ## Impact
   
   This is a **net reduction of 604 lines** while upgrading to a modern, 
actively maintained version of Apache SSHD. The upgrade improves security, 
reliability, and maintainability of the SSH test infrastructure.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to