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

SSH Key authentication fails when RFC4716 format Keys used

    XMLWordPrintable

Details

    Description

      Issue Summary

      When using SSH key authentication, a confusing error can appear in the UI or logs if the incorrect SSH key format is used.

      Example Steps to Reproduce

      1. Create an RSA SSH Key Pair using ssh-keygen
        ssh-keygen -t rsa
        
      2. Add the Public Key to your Bitbucket Cloud account
      3. Upload the Private Key to a Linked Repository configuration
      4. Test the repository connection

      Expected Results

      The connection test is successful

      Actual Results

      The connection test fails, and the following exception is thrown in the UI:

      Cannot decode connection params.
      

      Notes

      This occurs when the version of OpenSSH has RFC4716 as the default key format.
      The SSHJ Library that Bamboo uses does not support the SSH2/RFC4716 keys.

      Workaround

      Create the key using PEM format, which RFC4716 replaced. For example:

      ssh-keygen -m PEM -t rsa
      

      Attachments

        Issue Links

          Activity

            People

              pskierczynski Pawel Skierczynski
              ezeidan Elias Zeidan (they/them)
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: