[ https://issues.apache.org/jira/browse/SSHD-1237?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17483352#comment-17483352 ]
Lyor Goldstein commented on SSHD-1237: -------------------------------------- We already have a {{KeepAliveHandler}} in place by default that answers all {{keepalive@{*}{*}}} *or {{keep-alive@}}* requests. However, it is registered only at the +server+ side. I believe one can add it as a global request handler to the client as well: {code:java} SshClient client = SshClient.setupDefaultClient(); List<RequestHandler<ConnectionService>> oldHandlers = client.getGlobalRequestHandlers( List<RequestHandler<ConnectionService>> handlers = new ArrayList<>(); if (GenericUtils.isNotEmpty(oldHandlers)) { handlers.add(oldHandlers); } handlers.add(KeepAliveHandler.INSTANCE); client.setGlobalRequestHandlers(handlers); {code} I remember vaguely that we decided not to this by default, though cannot remember why... > SftpClient logs warnings on keepalive messages > ---------------------------------------------- > > Key: SSHD-1237 > URL: https://issues.apache.org/jira/browse/SSHD-1237 > Project: MINA SSHD > Issue Type: Bug > Affects Versions: 2.8.0 > Reporter: Jens Grassel > Assignee: Lyor Goldstein > Priority: Minor > > Hi, > we just noticed that using the default SshClient we get lots of warning > messages in our logs about keep alive requests like this: > {noformat} > 08:55:32.122 [sshd-SshClient[40b05dd]-nio2-thread-2] WARN > o.a.s.s.c.i.DefaultSftpClient$SftpChannelSubsystem - > handleUnknownChannelRequest(SftpChannelSubsystem[id=0, > recipient=0]-ClientSessionImpl[XXX@XXX/XXX:22][sftp]) Unknown channel > request: keepal...@openssh.com[want-reply=true] > {noformat} > We're using the {{SshClient.setUpDefaultClient()}} function then create our > session and finally use the {{createSftpClient(session)}} function on a > SftpClientFactory. -- This message was sent by Atlassian Jira (v8.20.1#820001) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org For additional commands, e-mail: dev-h...@mina.apache.org