title: Jenkins unable to launch slave agent via SSH - disconnected overnight
body: <p>I have a set of Jenkins slaves that were connected via SSH. They have all been working fine for several months. This morning, I found that all slaves were disconnected, and all had the same error when I tried to launch the agent:</p>
  
  <pre><code>01/05/18 16:27:13] [SSH] Starting slave process: cd "/home/ubuntu/jenkins_slave" &amp;&amp; java  -jar slave.jar
  &lt;===[JENKINS REMOTING CAPACITY]===&gt;channel started
  
  Slave JVM has not reported exit code. Is it still running?
  [01/05/18 16:27:20] Launch failed - cleaning up connection
  
  [01/05/18 16:27:20] [SSH] Connection closed.
  ERROR: Connection terminated
  java.io.EOFException
      at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2638)
      at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:3113)
      at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:853)
      at java.io.ObjectInputStream.&lt;init&gt;(ObjectInputStream.java:349)
      at hudson.remoting.ObjectInputStreamEx.&lt;init&gt;(ObjectInputStreamEx.java:48)
      at hudson.remoting.AbstractSynchronousByteArrayCommandTransport.read(AbstractSynchronousByteArrayCommandTransport.java:34)
      at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:59)
  Caused: java.io.IOException: Unexpected termination of the channel
      at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:73)
  </code></pre>
  
  <p>One common issue I found was a mismatch between Jenkins and Java versions, but I believe mine are compatible (Jenkins server says 2.46.3 and the slaves all have Java 1.7).</p>
  
  <p>Regarding "Is it still running?", I don't see a Jenkins slave process running:</p>
  
  <pre><code>ps aux | grep java
  </code></pre>
  
  <p>returns nothing.</p>
  
  <p>I have been unable to locate any Jenkins logs on the slave side. All the logs I've found on the master side only reiterate the error pasted above.</p>