El tiempo de espera predeterminado para la conexión ssh al servidor sshd incrustado (de Apache) es de 10 minutos, como se define en org.apache.ssh.common.FactoryManager
/**
* Default value for {@value #DISCONNECT_TIMEOUT} if none set
*/
long DEFAULT_DISCONNECT_TIMEOUT = TimeUnit.SECONDS.toMillis(10L);
Para anular que, mi entendimiento de la búsqueda en Internet e ir a través de algunos ejemplos de código era establecer IDLE_TIMEOUT al nuevo valor. Y lo hice en mi código que inicia el servidor ssh incrustado ...
long newTimeOut = 3000000L;
sshd = SshServer.setUpDefaultServer();
Map<String, Object> props = sshd.getProperties();
PropertyResolverUtils.updateProperty(sshd, FactoryManager.SOCKET_KEEPALIVE,true);
PropertyResolverUtils.updateProperty(sshd, FactoryManager.IDLE_TIMEOUT, newTimeOut);
Neither of the updateProperty() method invocations helped with keeping the connection alive beyond 10 mins. Has anyone run into a similar issue and solved it ? Thanks!