Node no longer working

21 views
Skip to first unread message

eric....@gmail.com

unread,
Apr 12, 2021, 12:36:46 PM4/12/21
to Jenkins Users
So I had a node up to run as a user other than Jenkins.  It stopped working and I have no idea why.  My trouble-shooting ability has just reached its limit.  Anyone have any ideas for me to try?  Here are my steps to set it up (the RSA Key seems to be what is failing):

  1. Go to Credentials / System (shows up under Credentials) / Global credentials
  2. Click Add Credentials
  3. Kind:  SSH Username with private key
  4. ID:  <username>RSAKey
    Description: <username> RSA Key
    Username:  <username>
    Private Key:  Select Enter directly and paste it in from results of cat ~/.ssh/id_rsa (RSA should have been created without passphrase, but if you created a passphrase, enter it in the Passphrase text box)

  5. Go to Manage Jenkins / Manage Nodes and Clouds / New Node
  6. Name:  <username>Node
    Description: Run as <username>
    # of executors: 1
    Remote root directory: /home/<username>
    Labels: <username>Checkout
    Usage: Only build jobs with label expressions matching this node
    Launch method: Launch agents via SSH
    Host: localhost
    Credentials: <username> (username RSA Key)
    Host Key Verification Strategy: Non verifying Verification Strategy
    Availability: Keep this agent online as much as possible
So, when I try to start the node, I get:

[04/12/21 11:34:47] [SSH] Opening SSH connection to localhost:22. 
[04/12/21 11:34:47] [SSH] WARNING: SSH Host Keys are not being verified. Man-in-the-middle attacks may be possible against this connection. ERROR: Server rejected the 1 private key(s) for <usrname> (credentialId:<username>RSAKey/method:publickey)
[04/12/21 11:34:47] [SSH] Authentication failed. Authentication failed. 
[04/12/21 11:34:47] Launch failed - cleaning up connection 
[04/12/21 11:34:47] [SSH] Connection closed.

Thanks much!
Eric

eric....@gmail.com

unread,
Apr 12, 2021, 1:50:24 PM4/12/21
to Jenkins Users
Note that I have no problem ssh'ing from the jenkins user to the <username> user passwordless.  The jenkins user key is in the authorized_keys file of the <username> user.  Really kind of blown away why this all of a sudden stopped working.  It was working fine...

eric....@gmail.com

unread,
Apr 12, 2021, 2:16:15 PM4/12/21
to Jenkins Users
OK, further proof that I'm fried this week.  I needed to put the key in for the jenkins user, not the <username> user.  The jenkins user public key is in the authorized_hosts file for <username> so that he can authenticate as that user.  This is fixed...

On Monday, April 12, 2021 at 10:36:46 AM UTC-6 eric....@gmail.com wrote:
Reply all
Reply to author
Forward
0 new messages