-
Bug
-
Resolution: Fixed
-
High
-
6.0.2
-
None
-
Severity 1 - Critical
-
Summary
SCP and SSH tasks are not working in Bamboo 6.0.2.
Steps to Reproduce
- Setup a plan with SCP task to copy some files from a local path to a remote path
- 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
- Stop Bamboo
- Download bamboo-scp-plugin-6.0.1.jar
- Go to <bamboo_install>/atlassian-bamboo/WEB-INF/atlassian-bundled-plugins/
- Move the old plugin, bamboo-scp-plugin-6.0.0.jar out of that directory into a non-Bamboo location (for simple backup purposes)
- Place the fixed plugin, bamboo-scp-plugin-6.0.1.jar, into that directory.
- Start Bamboo
Alternate workaround:
- Disable the SCP / SSH task
- 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
- has action
-
BDEV-13473 Loading...
- is related to
-
BDEV-13377 Loading...
- relates to
-
POSTSEFCON-12 Loading...