ssh in pipeline not working

XMLWordPrintable

    • Type: Suggestion
    • Resolution: Answered
    • None
    • Component/s: Access Keys
    • None

      I've setup in my repository a new ssh key pair and copied over the public key to 2 of my servers.

      Then i tried a pipeline with "ssh -vvv" to one of my hosts and it didn't work (permission dined). Instead I see this debug output 

       

      Deploying to $FTP_STAG_USER@myhostname into siwecos-toolsOpenSSH_6.6.1, OpenSSL 1.0.1f 6 Jan 2014
      debug1: Reading configuration data /root/.ssh/config
      debug1: Reading configuration data /etc/ssh/ssh_config
      debug1: /etc/ssh/ssh_config line 19: Applying options for *
      debug2: ssh_connect: needpriv 0
      debug1: Connecting to myhost [myip] port 22.
      debug1: Connection established.
      debug1: permanently_set_uid: 0/0
      debug3: Incorrect RSA1 identifier
      debug3: Could not load "/opt/atlassian/pipelines/agent/data/id_rsa" as a RSA1 public key
      debug1: identity file /opt/atlassian/pipelines/agent/data/id_rsa type -1
      

      You see: Could not load "/opt/atlassian/pipelines/agent/data/id_rsa" 

      I setup the pipeline to do a `cat`on that file and copy-pasted it into a local .ssh/id_rsa_bitbucket file.

      Connecting with ssh using this file works flawlessly.

      So there seems to be an issue with the default image's ssh because it seems to be unable to load  its private key files

            Assignee:
            Unassigned
            Reporter:
            Stephan Hradek
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: