Uploaded image for project: 'Bamboo Data Center'
  1. Bamboo Data Center
  2. BAM-18442

SSH / SCP tasks no longer working in Bamboo 6.0.2

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • High
    • 6.0.3
    • 6.0.2
    • SCP and SSH tasks
    • None

    Description

      Summary

      SCP and SSH tasks are not working in Bamboo 6.0.2.

      Steps to Reproduce

      1. Setup a plan with SCP task to copy some files from a local path to a remote path
      2. Run the plan

      Expected Results

      The SCP and SSH tasks are able to establish a connection, build succeeds.

      Actual Results

      The below exception is thrown in the build log with private key authentication:

      simple	06-Jun-2017 20:29:50	Starting task 'SCP' of type 'com.atlassian.bamboo.plugins.bamboo-scp-plugin:scptask'
      simple	06-Jun-2017 20:29:50	Connecting to host on port: 2222
      error	06-Jun-2017 20:29:50	Failed to connect to host
      error	06-Jun-2017 20:29:51	net.schmizz.sshj.transport.TransportException: BouncyCastle is required to read a key of type ecdsa-sha2-nistp256
      error	06-Jun-2017 20:29:51		at net.schmizz.sshj.transport.TransportException$1.chain(TransportException.java:33)
      error	06-Jun-2017 20:29:51		at net.schmizz.sshj.transport.TransportException$1.chain(TransportException.java:27)
      error	06-Jun-2017 20:29:51		at net.schmizz.concurrent.Promise.deliverError(Promise.java:96)
      error	06-Jun-2017 20:29:51		at net.schmizz.concurrent.Event.deliverError(Event.java:74)
      

      With password authentication:

      simple	07-Jun-2017 13:33:00	Connecting to localhost on port: 22
      error	07-Jun-2017 13:33:00	Failed to connect to host
      error	07-Jun-2017 13:33:00	net.schmizz.sshj.transport.TransportException: Unable to reach a settlement: [diffie-hellman-group1-sha1, diffie-hellman-group-exchange-sha1] and [curve25519-sha256@libssh.org, ecdh-sha2-nistp256, ecdh-sha2-nistp384, ecdh-sha2-nistp521, diffie-hellman-group-exchange-sha256, diffie-hellman-group14-sha1]
      error	07-Jun-2017 13:33:00		at net.schmizz.sshj.transport.Proposal.firstMatch(Proposal.java:145)
      error	07-Jun-2017 13:33:00		at net.schmizz.sshj.transport.Proposal.negotiate(Proposal.java:128)
      error	07-Jun-2017 13:33:00		at net.schmizz.sshj.transport.KeyExchanger.gotKexInit(KeyExchanger.java:218)
      error	07-Jun-2017 13:33:00		at net.schmizz.sshj.transport.KeyExchanger.handle(KeyExchanger.java:350)
      error	07-Jun-2017 13:33:00		at net.schmizz.sshj.transport.TransportImpl.handle(TransportImpl.java:503)
      error	07-Jun-2017 13:33:00		at net.schmizz.sshj.transport.Decoder.decode(Decoder.java:102)
      error	07-Jun-2017 13:33:00		at net.schmizz.sshj.transport.Decoder.received(Decoder.java:170)
      error	07-Jun-2017 13:33:00		at net.schmizz.sshj.transport.Reader.run(Reader.java:59)
      

      Notes

      • Affects both password and private key authentication

      Workaround

      1. Stop Bamboo
      2. Download bamboo-scp-plugin-6.0.1.jar
      3. Go to <bamboo_install>/atlassian-bamboo/WEB-INF/atlassian-bundled-plugins/
      4. Move the old plugin, bamboo-scp-plugin-6.0.0.jar out of that directory into a non-Bamboo location (for simple backup purposes)
      5. Place the fixed plugin, bamboo-scp-plugin-6.0.1.jar, into that directory.
      6. Start Bamboo

      Alternate workaround:

      1. Disable the SCP / SSH task
      2. Add a script task the performs the equivalent functions on command-line. Example below which uses password authentication to recursively copy a local path to a remote path (password in the below example is substituted from a Bamboo Plan variable):
        sshpass -p ${bamboo.scp_password} scp -r local/path/ user@host:/remote/path
        

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              jowen@atlassian.com Jeremy Owen
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: