• Icon: New Feature New Feature
    • Resolution: Won't Fix
    • Icon: Minor Minor
    • ssh-slaves-plugin
    • Jenkins ver. 1.580.1
      SSH Slaves plugin 1.9

      Short: Be able to configure ssh KeepAlive in the advanced pane of the ssh slave.

      Long: We have a few connections from master to slaves using ssh-slave plugin. Some of these connections go through some network equipment that might consider the connection dead if it hasn't seen activity in the last x minutes. We have been experiencing some connectivity problems and would like to rule out ssh/tcp route issues.

          [JENKINS-25793] Set ssh KeepAlive

          Mingjiang Shi added a comment - - edited

          +1 to this improvement.

          I have found a workaround for this.
          1. Change the /etc/ssh/ssh_config by appending the following line to the end of this file. This tells the ssh client to send nop command periodically to avoid the ssh connection being disconnected. The unit of 80 is seconds. You may tune this parameter based on your network condition.

          ServerAliveInterval 80
          

          2. In the Jenkins slave configuration page, change the Launch method to "Launch slave via execution of command on the Master". See the Jenkins built-in help for more details.

          So far, I haven't see any issues in this configuration. Hope this helps.

          Mingjiang Shi added a comment - - edited +1 to this improvement. I have found a workaround for this. 1. Change the /etc/ssh/ssh_config by appending the following line to the end of this file. This tells the ssh client to send nop command periodically to avoid the ssh connection being disconnected. The unit of 80 is seconds. You may tune this parameter based on your network condition. ServerAliveInterval 80 2. In the Jenkins slave configuration page, change the Launch method to "Launch slave via execution of command on the Master". See the Jenkins built-in help for more details. So far, I haven't see any issues in this configuration. Hope this helps.

          +1 to add an option to configure keep-alive along with the other timeout configurations.

          Giovanni Toraldo (ClouDesire) added a comment - +1 to add an option to configure keep-alive along with the other timeout configurations.

          This can be configured by setting ClientAliveInterval or TCPKeepAlive on the SSH server (/etc/ssh/sshd_config), also by setting ServerAliveInterval or TCPKeepAlive options for the user connection (/etc/ssh/ssh_config or ~/.ssh/ssh_config)

          https://www.freebsd.org/cgi/man.cgi?sshd_config(5)
          https://www.freebsd.org/cgi/man.cgi?ssh_config(5)

          Ivan Fernandez Calvo added a comment - This can be configured by setting ClientAliveInterval or TCPKeepAlive on the SSH server (/etc/ssh/sshd_config), also by setting ServerAliveInterval or TCPKeepAlive options for the user connection (/etc/ssh/ssh_config or ~/.ssh/ssh_config) https://www.freebsd.org/cgi/man.cgi?sshd_config(5 ) https://www.freebsd.org/cgi/man.cgi?ssh_config(5 )

            ifernandezcalvo Ivan Fernandez Calvo
            bbva BBVA
            Votes:
            5 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: