[
https://issues.apache.org/jira/browse/SSHD-891?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16771320#comment-16771320
]
Goldstein Lyor commented on SSHD-891:
-------------------------------------
{quote}
Can you please let us know if there is a way to change the configuration of
maxKeyInterval ,i mean can we do it via any configuration file.
{quote}
The answer is in the code you attached
{code:java}
maxKeyInterval = getLongProperty(ServerFactoryManager.REKEY_TIME_LIMIT,
maxKeyInterval);
{code}
The code tries to access a property ({{REKEY_TIME_LIMIT="rekey-time-limit"}})
providing a default value (1 hour) in case the user did not provide an
overriding value for it. There are several ways to override the default value -
one of them (at least in version 2.x) is via a system property that you can
provide when you start the Java application via
{{-D...some-naming-convention=your value}}. Unfortunately, 0.13.0 does not have
this option - the only way to do this is via code:
{code:java}
SshServer server = ...
server.getProperties().put(ServerFactoryManager.REKEY_TIME_LIMIT, "....some
value in millis...");
// also recommended
server.getProperties().put(ServerFactoryManager.REKEY_BYTES_LIMIT, "...some
very large long value..." /* e.g. Long.toString(Long.MAX_VALUE / 2L) */);
{code}
> SSh connections gets closed for every one hour with 0.13.0 version
> ------------------------------------------------------------------
>
> Key: SSHD-891
> URL: https://issues.apache.org/jira/browse/SSHD-891
> Project: MINA SSHD
> Issue Type: Bug
> Reporter: Anudeep
> Assignee: Goldstein Lyor
> Priority: Blocker
>
> SSH connections are getting closed for every one hours after 10 mins of idle
> time even though there are incoming pacets data is not being wriiten to
> client for every one hour and is being idle(10 mins which is default timeout
> of ssh session).
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)