Skip to content

Commit

Permalink
Merge pull request #416 from lgoldstein/SSHD-1330
Browse files Browse the repository at this point in the history
[SSHD-1330] Using common keep-alive global request handler in client as well as server
  • Loading branch information
tomaswolf authored Sep 25, 2023
2 parents ba8f36e + d12e052 commit 1283515
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
7 changes: 7 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@

## New Features

* [SSHD-1330](https://issues.apache.org/jira/browse/SSHD-1330) Use `KeepAliveHandler` global request instance in client as well
* [GH-356](https://github.com/apache/mina-sshd/issues/356) Publish snapshot maven artifacts to the [Apache Snapshots](https://repository.apache.org/content/repositories/snapshots) maven repository.
* Bundle _sshd-contrib_ has support classes for the [HAProxy protocol V2](https://www.haproxy.org/download/2.7/doc/proxy-protocol.txt).

Expand All @@ -69,6 +70,12 @@ actual data transfer, it also completely avoids the WS_FTP bug mentioned in

## Potential compatibility issues

### `KeepAliveHandler` global request handler moved from server to common global requests package

Was previously only on server-side - now also for client (see [SSHD-1330](https://issues.apache.org/jira/browse/SSHD-1330)).
This should be fully backward compatible since most servers do not send this request. However, if users have somehow added this
handler to the client side independently, the code should be re-examined and the independent handler removed or make it replace the global one.

### Server-side SFTP file handle encoding

The aforementioned fix for the size of SFTP file handles has the potential to
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

package org.apache.sshd.client;

import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.function.Function;
Expand All @@ -39,6 +40,7 @@
import org.apache.sshd.common.compression.Compression;
import org.apache.sshd.common.compression.CompressionFactory;
import org.apache.sshd.common.config.keys.FilePasswordProvider;
import org.apache.sshd.common.global.KeepAliveHandler;
import org.apache.sshd.common.kex.DHFactory;
import org.apache.sshd.common.kex.KeyExchange;
import org.apache.sshd.common.kex.KeyExchangeFactory;
Expand Down Expand Up @@ -67,7 +69,9 @@ public class ClientBuilder extends BaseBuilder<SshClient, ClientBuilder> {
public static final List<ChannelFactory> DEFAULT_CHANNEL_FACTORIES
= Collections.unmodifiableList(Collections.singletonList(ForwardedTcpipFactory.INSTANCE));
public static final List<RequestHandler<ConnectionService>> DEFAULT_GLOBAL_REQUEST_HANDLERS
= Collections.unmodifiableList(Collections.singletonList(OpenSshHostKeysHandler.INSTANCE));
= Collections.unmodifiableList(
Arrays.<RequestHandler<ConnectionService>> asList(OpenSshHostKeysHandler.INSTANCE,
KeepAliveHandler.INSTANCE));

public static final ServerKeyVerifier DEFAULT_SERVER_KEY_VERIFIER = AcceptAllServerKeyVerifier.INSTANCE;
public static final HostConfigEntryResolver DEFAULT_HOST_CONFIG_ENTRY_RESOLVER
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.sshd.server.global;
package org.apache.sshd.common.global;

import org.apache.sshd.common.SshConstants;
import org.apache.sshd.common.session.ConnectionService;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import org.apache.sshd.common.compression.BuiltinCompressions;
import org.apache.sshd.common.compression.Compression;
import org.apache.sshd.common.compression.CompressionFactory;
import org.apache.sshd.common.global.KeepAliveHandler;
import org.apache.sshd.common.kex.DHFactory;
import org.apache.sshd.common.kex.KeyExchange;
import org.apache.sshd.common.kex.KeyExchangeFactory;
Expand All @@ -45,7 +46,6 @@
import org.apache.sshd.server.config.keys.DefaultAuthorizedKeysAuthenticator;
import org.apache.sshd.server.forward.DirectTcpipFactory;
import org.apache.sshd.server.global.CancelTcpipForwardHandler;
import org.apache.sshd.server.global.KeepAliveHandler;
import org.apache.sshd.server.global.NoMoreSessionsHandler;
import org.apache.sshd.server.global.OpenSshHostKeysHandler;
import org.apache.sshd.server.global.TcpipForwardHandler;
Expand Down

0 comments on commit 1283515

Please sign in to comment.