Nagy András
Nagy András

Reputation: 13

Changing idle timeout in Spring Boot shell

I'm using Spring Boot 1.2.7 remote shell (CRaSH 1.3.2) and cannot seem to change the idle timeout from the default 10 minutes. In my application.properties I have

shell.ssh.port=2111

shell.ssh.idle_timeout=7200000

On startup, the properties while seems to be read successfully, the port is set to the desired value, but the timeout remains the default 10 minutes (600 000 msec):

o.s.b.a.a.CrshAutoConfiguration$CrshBootstrapBean - Configuring property ssh.port=2111 from properties

o.s.b.a.a.CrshAutoConfiguration$CrshBootstrapBean - Configuring property ssh.auth_timeout=600000 from properties

o.s.b.a.a.CrshAutoConfiguration$CrshBootstrapBean - Configuring property ssh.idle_timeout=600000 from properties

Apparently the shell.ssh.idle_timeout property (originally crash.ssh.idle_timeout in CRaSH, which I also tried along with other names) is not exposed by Spring Boot. I couldn't find any information on other ways to set it. Is there a way to set it e.g. from a configuration class?

EDIT: I was pulled off the project, so I didn't get to solve it, I only have some pointers to those with the same problem. These properties are read by org.springframework.boot.actuate.autoconfigure.ShellProperties which I was going to extend with the idle timeout property and then try and inject into CrshAutoConfiguration in the same package. There may of course be a better way.

Upvotes: 1

Views: 598

Answers (1)

Stephane Nicoll
Stephane Nicoll

Reputation: 33131

There was a request to support this and this has been fixed in Spring Boot 1.3.0.RELEASE (about to be released at the time of writing)

Upvotes: 1

Related Questions