Jenkins Publish over ssh authentification failed with private key

前端 未结 10 1020
小鲜肉
小鲜肉 2021-01-13 07:39

I can authenticate successfully with putty on the server with my private key and passphrase. But when I try to do it with jenkins publish o

相关标签:
10条回答
  • 2021-01-13 08:13

    I ran into the same issue today and it turned out i was accidentally supplying the path to the public key instead of the private one.

    So the "path to key" should be something like

    .ssh/id_rsa
    

    instead of

    .ssh/id_rsa.pub
    
    0 讨论(0)
  • 2021-01-13 08:18

    I think as it says this is a authentication issue:

    Use password authentication, or use a different key Selecting this option will produce 3 more configuration boxes that mirror the options available for the Jenkins SSH Key.

    Passphrase / Password If either Path to key or Key are configured then this is the passphrase to use with the encrypted key. If no key is configured then this is the password that will be used for password authentication.

    Path to key See description above.

    Key See description above.

    Disable exec This option will remove the ability to execute commands using this configuration.

    LINK HERE

    0 讨论(0)
  • 2021-01-13 08:19

    Just copy jenkins-user's id_rsa.pub to the end of ~/.ssh/authorized_keys on remote host.

    0 讨论(0)
  • 2021-01-13 08:20

    Check that the public key is in the .ssh/authorized_keys file on the target server, even if the target server is the same as the jenkins server. I had what is probably the same problem, and it turned out that I needed this, even though ssh localhost worked fine.

    (Addendum: also check that the jenkins server has the target server in its .ssh/known_hosts file, as that can affect this as well.)

    0 讨论(0)
提交回复
热议问题