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:

> 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
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/0a42daa4-1072-4995-a698-33ea0968fbc4n%40googlegroups.com.

Reply via email to