Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-17678

Connect to slave via SSH with key in a file fails whereas it works if pasted

      I have a master running with user XXX on a machine M1. I want to run a slave on machine M2 with user YYY. I have a private-public key in place between the two machines so that I can do
      [XXX@M1]$ ssh YYY@M2
      and I am connected.

      In Jenkins, I created credentials for username M2 and selected the option From the Jenkins master ~/.ssh. But when I try to connect it fails :

      [04/18/13 14:58:11] [SSH] Opening SSH connection to M2:22.
      ERROR: Failed to authenticate as YYY with credential=c2cdc4dd-cb39-4f15-8329-033933ad5621
      java.io.IOException: Publickey authentication failed.

      [04/18/13 14:58:11] [SSH] Authentication failed.
      hudson.AbortException: Authentication failed.

      Surprisingly, if I use the option Enter directly and copy paste the private key from ~/.ssh/id_dsa , then it works.

      What am I doing wrong ? is it that it takes ~/.ssh/id_rsa instead of id_dsa ?

          [JENKINS-17678] Connect to slave via SSH with key in a file fails whereas it works if pasted

          Barthélémy von Haller created issue -
          Stephen Connolly made changes -
          Resolution New: Not A Defect [ 7 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]
          Stephen Connolly made changes -
          Status Original: Resolved [ 5 ] New: Closed [ 6 ]
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 148858 ] New: JNJira + In-Review [ 206593 ]

            stephenconnolly Stephen Connolly
            barthelemy Barthélémy von Haller
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: