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):
- Go to Credentials / System
(shows up under Credentials) / Global credentials
- Click Add Credentials
- Kind: SSH Username with private key
- 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)
- Go to Manage Jenkins / Manage
Nodes and Clouds / New Node
- 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