Due to some maintenance issues, this service has been switched in read-only mode, you can find more information about the why

and how to migrate your plugin documentation in this blogpost

Skip to end of metadata
Go to start of metadata

Plugin Information

View SSH Build Agents on the plugin site for more information.

Older versions of this plugin may not be safe to use. Please review the following warnings before using an older version:

SSH Slaves plugin

This plugin allows you to manage agents running on *nix machines over SSH.




  1. Unknown User (brucepainter64@gmail.com)

    Anyway to get this page updated with the changes between versions?

  2. Unknown User (michal huniewicz)

    I seem to be unable to upgrade to the latest (0.5.1) version.

    I have version 0.4 now and whenever I ask Hudson to update it and restart, it still says I have 0.4 and that I should update.

    Does anyone have a similiar issue?

  3. Unknown User (brucepainter64@gmail.com)

    This appears to be a known issue:


    You can manually get the updated plugin by going to:


    Then install it through the Plugin Manager -> Advanced Tab

    1. Unknown User (krystian)

  4. Unknown User (cowmix)

    Where can you post support questions for this plugin?

  5. Unknown User (gary.mann@baml.com)

    Hi everyone,

    I'm using the SSH slaves plugin (0.13) on a Windows master (Windows Server 2003, Apache Tomcat), and I'm trying to connect to a new RHEL5.0 Linux slave. I have other Linux slaves (RHEL4u5), and these all work fine with user/password authentication. However, I can't get this new slave to connect, and I simply get this error message:

    [10/14/10 18:23:55] [SSH] Opening SSH connection to hostname:22.
    [10/14/10 18:23:56] [SSH] Authenticating as username/******.
    java.io.IOException: Password authentication failed.
        at com.trilead.ssh2.auth.AuthenticationManager.authenticatePassword(AuthenticationManager.java:319)
        at com.trilead.ssh2.Connection.authenticateWithPassword(Connection.java:314)
        at hudson.plugins.sshslaves.SSHLauncher.openConnection(SSHLauncher.java:560)
        at hudson.plugins.sshslaves.SSHLauncher.launch(SSHLauncher.java:174)
        at hudson.slaves.SlaveComputer$1.call(SlaveComputer.java:184)
        at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
        at java.util.concurrent.FutureTask.run(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
    Caused by: java.io.IOException: Authentication method password not supported by the server at this stage.
        at com.trilead.ssh2.auth.AuthenticationManager.authenticatePassword(AuthenticationManager.java:289)
        ... 9 more
    [10/14/10 18:23:56] [SSH] Connection closed.

    At this point I'm completely stuck, and not sure where to go next. Google reveals many people with similar issues, but no solutions.

    A few things spring to mind. Firstly, my RHEL5 slave has a 2048 bit SSH key, whereas the RHEL4 slaves have 1024 bit keys.Could there be an issue with the embedded SSH client?

    Secondly, I'm not sure how to set up SSH properly as I'm unsure as to where the RSA keys used by the Hudson SSH client are kept (assuming they're completely unrelated to Cygwin/Putty).

    Has anyone else out there with the same issue managed to find a solution?

    Thanks in advance,


    1. Unknown User (gary.mann@baml.com)

      Hello everyone again,

      I've just found the solution to this issue - essentially it's to do with the way that sshd is configured. I'm not sure if this is a default in RHEL5, or whether this is my company's site configuration, but it all hinges on the following line in /etc/sshd_config (or /etc/ssh/sshd_config):

      # To disable tunneled clear text passwords, change to no here!
      PasswordAuthentication no

      If set to no, Hudson's SSH client won't be able to connect using password authentication. If you comment this line out (which I believe is the OpenSSH default), or set it to yes, then Hudson can connect just fine.

      Hope this helps anyone else with the same issue,


      1. Unknown User (oeuftete)

        It absolutely helped me. Thanks!

  6. Unknown User (andor_toth)

    Is there a way to have this plugin use the socket of the ssh-agent? I have set the SSH_AUTH_SOCK environment variable and ForwardAgent option, but it seems useless.

    I'm going to have many slaves, and I don't want to copy Jenkins' private key on them, just to enable git access through ssh.

    1. Unknown User (andor_toth)

      Command execution solved the problem.

  7. Unknown User (tibuserfr)

    Is it possible to configure the port from which the Master will connect to the slave? By default the port is random.


  8. Unknown User (nic_b)

    01/10/12 09:58:30] [SSH] Opening SSH connection to <server name>:22.
    hudson.AbortException: The server doesn't support the password authentication
    at hudson.plugins.sshslaves.SSHLauncher.openConnection(SSHLauncher.java:699)
    at hudson.plugins.sshslaves.SSHLauncher.launch(SSHLauncher.java:283)
    at hudson.slaves.SlaveComputer$1.call(SlaveComputer.java:200)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:619)
    [01/10/12 09:58:30] [SSH] Connection closed.

    Hi,After a recent unix server upgrade to our slaves, Hudson now fails to connect over SSH to them with the above message. I believe the issue to be that given the new servers now only support keyboard-interactive authentication, not password anymore, the connection fails. Can we add support to the plugin to either choose an authentication type or failover to keyboard-interactive if password fails? Internally, for other apps, using the same ganymed*. ssh library we've added the same fallback and its a very easy code change .Something like:

     if(connection.isAuthMethodAvailable(usr, "password")){
                            connection.authenticateWithPassword(usr, pwd);
                         } else if(connection.isAuthMethodAvailable(usr, "keyboard-interactive")){
                               connection.authenticateWithKeyboardInteractive(usr, new InteractiveCallback(){
  9. Unknown User (bostonvaulter)

    Is this not supported on the latest version of Jenkins? It isn't showing up in my "available plugins" list.

  10. Unknown User (fmerrow)

    I am trying (for the first time) to get a Windows Master to use a Linux slave.

    "Start by SSH" doesn't appear in the new node pull down, so I went looking for the SSH plugin . . . found it, it was disabled so I enabled it.

    On Jenkins restart it disabled itself again.  Upgraded to latest (.22) . . . but same result.

    Is there something I need to install on Windows?


  11. Unknown User (ara001spb)

    After upgrading our ssh slaves & ssh credentials plugin to latest, *all* slaves are unavailable. Did someone meet such behavior?

    1. Unknown User (ctron)

      Well I have the same problem here. No credentials are available anymore. The dropdown box is empty. Although multiple non-domain credentials are defined.

      1. Unknown User (ctron)

        It looks like as if the SSH plugin only finds SSH Key based credentials. Username/password are ignored. But when I specify a key credentials it fails with a different exception:26:30 SSH Opening SSH connection to xxx.intra:22.
        ERROR: Unexpected error in launching a slave. This is probably a bug in Jenkins.
        java.lang.NoSuchMethodError: com.cloudbees.jenkins.plugins.sshcredentials.SSHAuthenticator.newInstance(Ljava/lang/Object;Lcom/cloudbees/jenkins/plugins/sshcredentials/SSHUser;)Lcom/cloudbees/jenkins/plugins/sshcredentials/SSHAuthenticator;
        at hudson.plugins.sshslaves.SSHLauncher.openConnection(SSHLauncher.java:949)
        at hudson.plugins.sshslaves.SSHLauncher.launch(SSHLauncher.java:488)
        at hudson.slaves.SlaveComputer$1.call(SlaveComputer.java:230)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
        at java.util.concurrent.FutureTask.run(FutureTask.java:166)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:724)
        26:30 SSH Connection closed.

  12. Unknown User (olenz)

    I am trying to use this plugin in conjunction with the Multi slave config plugin https://wiki.jenkins-ci.org/display/JENKINS/Multi+slave+config+plugin. Unfortunately, it does not seem to be possible to generate several slaves with different host names. Or am I doing something wrong? This would be a great enhancement of the plugin!

  13. Unknown User (parxier)

    Version 1.7 seems to have introduced a bug. We're getting NullPointerException at hudson.plugins.sshslaves.SSHLauncher.openConnection(SSHLauncher.java:1198). Downgrading to version 1.6 fixes this issue.

    Our Jenkins version is 1.565.2 LTS.

    1. Unknown User (maximec)

      Same behavior on my side. Using latest Jenkins version 1.582

  14. Unknown User (hbockelmann)

    Is there any change to use different SSH credentials to launch the same slave in different jobs?

    For example you have the slave "unix1" that might be used for the job A and B, but job A should use ssh-key-A while job B should use ssh-key-B ... the choice which key to be used might be fixed for a job or might be given as a build parameter.

  15. Unknown User (fireimp)

    Where is a 'Once it has a suitable version of java' defined? I need to incorporate some very odd / old slaves.  And i want to make sure I don't run foul of need an unsupported version of java.  

  16. Unknown User (joltmans)

    To the author of this plugin. It would be appreciated if the plugin was placed under some kind of license.

    MIT License is the most common for Jenkins plugins.

  17. Unknown User (fievez)

    You should document the way to add host to known_hosts when using version >= 1.15. 

    If the user running jenkins do not have a shell, the following command can be used with openssh on linux:

    mkdir -p /var/lib/jenkins/.ssh
    chmod 700 /var/lib/jenkins/.ssh
    ssh-keyscan -H <hostname> >> /var/lib/jenkins/.ssh/known_hosts
    chown -R jenkins /var/lib/jenkins/.ssh
  18. Unknown User (shadowbob)

    is there a way to bypass java version validation?

    I need to ssh to a PowerPC Device running Linux without Java.

    The connection was initially succesful. However connection was closed due to failure to find java on the slave device.

    Below is the log file. Appreciate any help.

    [06/16/17 22:37:41] [SSH] Opening SSH connection to joker:22.
    [06/16/17 22:37:43] [SSH] WARNING: SSH Host Keys are not being verified. Man-in-the-middle attacks may be possible against this connection.
    [06/16/17 22:37:44] [SSH] Authentication successful.
    [06/16/17 22:37:45] [SSH] The remote users environment is:
    BASH_VERSINFO=([0]="4" [1]="2" [2]="37" [3]="1" [4]="release" [5]="powerpc-unknown-linux-gnu")
    IFS=$' \t\n'
    PERLLIB_PATHS=([0]="/usr/local/NSPT/WDNAS/lib" [1]="/usr/local/NSPT/WDShare/lib" [2]="/usr/local/NSPT/WDSafe/lib")
    PS1='\h:\w\$ '
    PS4='+ '
    SSH_CLIENT=' 50476 22'
    SSH_CONNECTION=' 50476 22'
    [06/16/17 22:37:45] [SSH] Checking java version of java
    Couldn't figure out the Java version of java
    bash: java: command not found
    [06/16/17 22:37:45] [SSH] Checking java version of /usr/bin/java
    Couldn't figure out the Java version of /usr/bin/java
    bash: /usr/bin/java: No such file or directory
    [06/16/17 22:37:45] [SSH] Checking java version of /usr/java/default/bin/java
    Couldn't figure out the Java version of /usr/java/default/bin/java
    bash: /usr/java/default/bin/java: No such file or directory
    [06/16/17 22:37:45] [SSH] Checking java version of /usr/java/latest/bin/java
    Couldn't figure out the Java version of /usr/java/latest/bin/java
    bash: /usr/java/latest/bin/java: No such file or directory
    [06/16/17 22:37:45] [SSH] Checking java version of /usr/local/bin/java
    Couldn't figure out the Java version of /usr/local/bin/java
    bash: /usr/local/bin/java: No such file or directory
    [06/16/17 22:37:45] [SSH] Checking java version of /usr/local/java/bin/java
    Couldn't figure out the Java version of /usr/local/java/bin/java
    bash: /usr/local/java/bin/java: No such file or directory
    [06/16/17 22:37:45] [SSH] Checking java version of /jdk/bin/java
    Couldn't figure out the Java version of /jdk/bin/java
    bash: /jdk/bin/java: No such file or directory
    Linux Joker #1 Thu May 17 13:32:51 PDT 2012 ppc GNU/Linux
    java.io.IOException: Could not find any known supported java version in [java, /usr/bin/java, /usr/java/default/bin/java, /usr/java/latest/bin/java, /usr/local/bin/java, /usr/local/java/bin/java, /jdk/bin/java], and we also failed to install JDK as a fallback
    	at hudson.plugins.sshslaves.SSHLauncher.resolveJava(SSHLauncher.java:914)
    	at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:808)
    	at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:792)
    	at java.util.concurrent.FutureTask.run(Unknown Source)
    	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    	at java.lang.Thread.run(Unknown Source)
    Caused by: java.io.IOException: Failed to detect the environment for automatic JDK installation. Please report this to jenkinsci-users@googlegroups.com: Linux Joker #1 Thu May 17 13:32:51 PDT 2012 ppc GNU/Linux
    	at hudson.plugins.sshslaves.SSHLauncher.attemptToInstallJDK(SSHLauncher.java:1025)
    	at hudson.plugins.sshslaves.SSHLauncher.resolveJava(SSHLauncher.java:912)
    	... 6 more
    [06/16/17 22:37:45] Launch failed - cleaning up connection
    [06/16/17 22:37:45] [SSH] Connection closed.
  19. Unknown User (raavi)

    Hi! I am trying to set environment variable in master as "SLAVE_IP" with an IP address as a value and use it in Slave(Both master and slave in windows) but somehow it won't recognize the environment variable though it is displayed in system configuration. While launching the agent it gives me error as:

    [10/17/17 15:11:22] [SSH] Opening SSH connection to ${SLAVE_IP}:22.
    java.io.IOException: There was a problem while connecting to ${SLAVE_IP}:22
    	at com.trilead.ssh2.Connection.connect(Connection.java:834)
    	at com.trilead.ssh2.Connection.connect(Connection.java:703)
    	at com.trilead.ssh2.Connection.connect(Connection.java:617)
    	at hudson.plugins.sshslaves.SSHLauncher.openConnection(SSHLauncher.java:1284)
    	at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:804)
    	at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:793)
    	at java.util.concurrent.FutureTask.run(Unknown Source)
    	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    	at java.lang.Thread.run(Unknown Source)
    Caused by: java.net.UnknownHostException: ${SLAVE_IP}
    	at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
    	at java.net.InetAddress$2.lookupAllHostAddr(Unknown Source)
    	at java.net.InetAddress.getAddressesFromNameService(Unknown Source)
    	at java.net.InetAddress.getAllByName0(Unknown Source)
    	at java.net.InetAddress.getAllByName(Unknown Source)
    	at java.net.InetAddress.getAllByName(Unknown Source)
    	at java.net.InetAddress.getByName(Unknown Source)
    	at com.trilead.ssh2.transport.TransportManager.createInetAddress(TransportManager.java:166)
    	at com.trilead.ssh2.transport.TransportManager.establishConnection(TransportManager.java:366)
    	at com.trilead.ssh2.transport.TransportManager.initialize(TransportManager.java:480)
    	at com.trilead.ssh2.Connection.connect(Connection.java:774)
    	... 9 more
    [10/17/17 15:11:25] Launch failed - cleaning up connection
    [10/17/17 15:11:25] [SSH] Connection closed.
  20. Unknown User (sunny3)

    Do you support openjdk ??

  21. Unknown User (cbapag)

    Trying to connect to a node which is behind a Socks proxy with JVM options but yet it's unable to connect. Any help will be appreciated.
    Reference: https://docs.oracle.com/javase/7/docs/api/java/net/doc-files/net-properties.html

    SSHLauncher{host='HOST', port=22, credentialsId='Id', jvmOptions='java -DsocksProxyHost=Socksproxy -DsocksProxyPort=1080 -DsocksProxyVersion=5 -Djava.net.socks.username=USERNAME -Djava.net.socks.password=PASSWORD -jar jenkins.war', javaPath='', prefixStartSlaveCmd='', suffixStartSlaveCmd='', launchTimeoutSeconds=210, maxNumRetries=1, retryWaitTime=15, sshHostKeyVerificationStrategy=hudson.plugins.sshslaves.verifiers.NonVerifyingKeyVerificationStrategy, tcpNoDelay=true, trackCredentials=true}
    [09/17/18 16:39:30] [SSH] Opening SSH connection to HOST:22.
    Connection timed out: connect
    SSH Connection failed with IOException: "Connection timed out: connect", retrying in 15 seconds. There are 1 more retries left.

    1. Unknown User (lck)

      Same problem. Any luck resolving it?

      1. Unknown User (jerrygb)

        Unknown User (lck)  Not sure if noticed the version fix below. Check if there is an updated version available and patch that.

        1. Unknown User (lck)

          Unknown User (jerrygb) , thank you!

          Maybe I'm doing something wrong, but I got Jenkins v2.164.2, ssh-slaves v1.29.4, openjdk version "1.8.0_161" @CentOs, pass JVM options '-DsocksProxyHost=ProxyHost -DsocksProxyPort=8080' and still can't connect with ssh via proxy.

          If I go 'manage Jenkins→manage plugins→advanced', set HTTP Proxy Configuration, put in Test URL http://my_remote_host:22 and hit 'validate proxy' it shows 'success'. But I assume it has different purpose than in SSH plugin.

          1. Unknown User (lck)

            Had to make workaround (probably not the best idea, but it works): I don't connect remote server as node (or agent), I create job at master and choose 'execute shell' where I type "ssh -o ProxyCommand="connect-proxy -H http://proxy_host:8080 %h %p" jenkins@remote_server 'cd /foo/ && python bar.py'"

            And this works for me.

  22. Unknown User (pappnase)

    The Plugin Mgmt in Jenkins LTS v2.138.1 says the latest Plugin version 1.28.1 is incompatible. Is this a real issue or false alarm?

  23. Unknown User (mike_the_biker)

    The same problem here with 2.148...

  24. Unknown User (jerrygb)

    Found an issue related to SSH Slaves plugin version 1.29.0 on Jenkins 2.152

    org.apache.commons.jelly.JellyTagException: jar:file:/var/cache/jenkins/war/WEB-INF/lib/jenkins-core-2.152.jar!/hudson/model/Run/console.jelly:65:27: <j:whitespace> com/trilead/ssh2/crypto/Base64
    at org.apache.commons.jelly.impl.TagScript.handleException(TagScript.java:745)
    at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:289)
    at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
    at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
    at org.apache.commons.jelly.tags.core.WhitespaceTag.doTag(WhitespaceTag.java:48)
    at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
    ... 126 more
    Caused by: java.lang.ClassNotFoundException: com.trilead.ssh2.crypto.Base64
    at jenkins.util.AntClassLoader.findClassInComponents(AntClassLoader.java:1374)
    at jenkins.util.AntClassLoader.findClass(AntClassLoader.java:1327)
    at jenkins.util.AntClassLoader.loadClass(AntClassLoader.java:1080)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    ... 145 more
    Caused: javax.servlet.ServletException
    at org.kohsuke.stapler.jelly.JellyFacet$1.dispatch(JellyFacet.java:111)
    at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:739)
    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:870)
    at org.kohsuke.stapler.MetaClass$10.dispatch(MetaClass.java:384)
    at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:739)
    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:870)
    at java.lang.Thread.run(Thread.java:748)

    Updating the plugin to 1.29.1 fixes the issue. Just wanted to help in case anyone else ends up having the issue.

    Code Fix