Ssh client-keepalive-interval

Does anyone know what setting or config file this command makes an adjustment to?

set service ssh client-keepalive-interval ‘200’

Thanks

It’s adjusting ClientAliveInterval in sshd.

Most of the conf-mode stuff has pretty obvious handler names. The code for this one will be in service_ssh.py.

It’s generating a couple of config files, but the template which mentions client_keepalive_interval (the config tree mangles - to _) is ssh/sshd_config.j2.

The code renders this to /run/sshd/sshd_config.

And yep:

# grep Client /run/sshd/sshd_config 
[edit]
# set service ssh client-keepalive-interval 200
[edit]
# commit
[edit]
# grep Client /run/sshd/sshd_config 
ClientAliveInterval 200
# ps aux|grep sshd
root        3776  0.0  0.4  15556  9344 ?        Ss   Jun28   0:00 sshd: /usr/sbin/sshd -f /run/sshd/sshd_config [listener] 0 of 10-100 startups

sshd is definitely using that config.

1 Like

Thanks for the info.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.