Hi. A fix, but very strange things going on for me. JM=jenkins master, BS=linux bld slave, somehost=ssh to this host BldUser=jenkins build user SshUser=ssh user
I think I fixed or found a way passed this problem. with SshUser private key I did: openssl rsa -in id_rsa -check > id_rsa.stan
my guess is while this checks my private key it spits out a different version/type of the key?? If I use that private key for my ssh job my error goes away and it works. I added a new private key credential for SshUser with passphrase, leaving other one still there.
But here is the weirdness or what I do not understand. BS node connects JM with old version SshUser key. on JM I have another ssh key for BldUser for the buildjob. In BuildJob i changed ssh-agent from BldUser to SshUser new priv key. This made it work! Job does ssh -q somehost "hostname; pwd; id" id is for SshUser as I expect.
but if I change the buildjob ssh-agent back to BldUser - it still works and the ssh user it uses is from the BS ssh-agent setup (SshUser)!
17:51:15 [ssh-agent] Looking for ssh-agent implementation... 17:51:15 [ssh-agent] Java/JNR ssh-agent 17:51:17 [ssh-agent] Started. 17:51:17 [ssh-agent] Using credentials BldUser <- from buildjob 17:51:17 [my-box] $ /bin/sh -x /tmp/hudson2794482700022152346.sh 17:51:18 ++ hostname 17:51:18 + ssh -q somehost 'hostname; pwd; id' 17:51:18 somehost 17:51:18 /home/SshUser <- why from BS config (SshUser) and not from buildjob(BldUser)?? 17:51:18 uid=910(SshUser) gid=25(xxx) groups=25(xxx) 17:51:18 + rc=0
Is there some jenkins key caching and using going on here? If I take out using ssh-agent key from build job it will not work, so it does need something in the buildjob.
jenkins 1.625.3 ssh agent plugin 1.8 ssh credentials plugin 1.11
|