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...
On Monday, April 12, 2021 at 10:36:46 AM UTC-6 [email protected] 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/fd08eb85-0b55-427d-bc65-bd3ec57b4811n%40googlegroups.com.
