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

Adding an SSH Key on a SCP Task fails with an IOException

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Low
    • 8.1.1
    • 6.9.0, 7.2.4
    • SCP and SSH tasks
    • None

    Description

      Issue Summary

      Adding SSH key to a SCP/SSH task fails on a specific type of SSH key.

      Steps to Reproduce

      1. Create an SSH Key Pair
      ssh-keygen
      1. Inspect the private key and confirm that the header contains the following
      -----BEGIN OPENSSH PRIVATE KEY-----
      1. Create an SCP/SSH Task in a Bamboo build plan
      2. Upload the SSH Key and save the task

      Expected Results

      The private key file is uploaded and the SCP/SSH task saves successfully.

      Actual Results

      The below exception is thrown in the atlassian-bamboo.log file (Must increase com.atlassian.bamboo.ww2.interceptors.BambooWorkflowInterceptor to DEBUG logging):

      2021-05-20 18:46:55,733 DEBUG [http-nio-8085-exec-9] [NavigationAwareInterceptor] Finding Navigation Objects for com.atlassian.bamboo.ww2.actions.build.admin.config.task.EditTask
      2021-05-20 18:46:55,870 DEBUG [http-nio-8085-exec-9] [BambooWorkflowInterceptor] 1 field errors found...
      2021-05-20 18:46:55,870 DEBUG [http-nio-8085-exec-9] [BambooWorkflowInterceptor] * private_key: [There is something wrong with your private key: java.io.IOException: unrecognised object: OPENSSH PRIVATE KEY]
      2021-05-20 18:46:55,870 DEBUG [http-nio-8085-exec-9] [BambooWorkflowInterceptor] 0 action errors found...
      

      Workaround

      • To upload the key in the SCP/SSH Task create an RSA key using the PEM format:
      ssh-keygen -m PEM -t rsa
      

      Attachments

        Issue Links

          Activity

            People

              mgardias Marcin Gardias
              fe7fd6f6c69e James Williams
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: