Skip to main content
edited title
Link
peterph
  • 31.5k
  • 3
  • 74
  • 76

Setting up ClientAliveCountMax and ClientAliveInterval is not working as expected How to terminate an interactive ssh session after certain amount of time

corrected spelling, improved formatting
Source Link
Anthon
  • 81.4k
  • 42
  • 174
  • 228

In my /etc/ssh/sshd_config file I have set the below parameters  :

ClientAliveInterval 10
ClientAliveCountMax 3

Now from host machine I did ssh to the my server (where I made changes to /etc/ssh/sshd_config) file. After that I restarted the ssh sevices by running  :

/etc/init.d/sshd reload

I am expecting the ssh connection should be disconnected after 30 seconds but it keeps on than there for almost an hour now.

Can anybody let me know what is going wrong here  ?

I am using OpenSSH version 6.1.

In my /etc/ssh/sshd_config file I have set the below parameters  :

ClientAliveInterval 10
ClientAliveCountMax 3

Now from host machine I did ssh to the my server (where I made changes to /etc/ssh/sshd_config) file. After that I restarted the ssh sevices by running  :

/etc/init.d/sshd reload

I am expecting the ssh connection should be disconnected after 30 seconds but it keeps on than there for almost an hour now.

Can anybody let me know what is going wrong here  ?

I am using OpenSSH version 6.1.

In my /etc/ssh/sshd_config file I have set the below parameters:

ClientAliveInterval 10
ClientAliveCountMax 3

Now from host machine I did ssh to the my server (where I made changes to /etc/ssh/sshd_config) file. After that I restarted the ssh sevices by running:

/etc/init.d/sshd reload

I am expecting the ssh connection should be disconnected after 30 seconds but it keeps on than there for almost an hour now.

Can anybody let me know what is going wrong here?

I am using OpenSSH version 6.1.

In my /etc/ssh/sshd_config/etc/ssh/sshd_config file I have set the below parameter.parameters :

ClientAliveInterval 10 ClientAliveCountMax 3

ClientAliveInterval 10
ClientAliveCountMax 3

Now from host machine I did sshssh to the my serevrserver (where I made changes to /etc/ssh/sshd_config/etc/ssh/sshd_config) file.After After that I restarted the sshssh sevices by running :

/etc/init.d/sshd reload

/etc/init.d/sshd reload

I am expecting the sshssh connection should be disconnected after 30 seconds but it keepkeeps on than there for almost an hour now.

Can any bodyanybody let me know what is going wrong here. ?

I am using opensshOpenSSH version 6.1.

In my /etc/ssh/sshd_config file I have set the below parameter.

ClientAliveInterval 10 ClientAliveCountMax 3

Now from host machine I did ssh to the my serevr(where I made changes to /etc/ssh/sshd_config) file.After that I restarted the ssh sevices by running

/etc/init.d/sshd reload

I am expecting the ssh connection should be disconnected after 30 seconds but it keep on than there for almost an hour now.

Can any body let me know what is going wrong here.

I am using openssh version 6.1.

In my /etc/ssh/sshd_config file I have set the below parameters :

ClientAliveInterval 10
ClientAliveCountMax 3

Now from host machine I did ssh to the my server (where I made changes to /etc/ssh/sshd_config) file. After that I restarted the ssh sevices by running :

/etc/init.d/sshd reload

I am expecting the ssh connection should be disconnected after 30 seconds but it keeps on than there for almost an hour now.

Can anybody let me know what is going wrong here ?

I am using OpenSSH version 6.1.

Source Link
Rajan Pathak
  • 157
  • 2
  • 3
  • 7
Loading