Jenkins: connect to slave via SSH with a different user name -


i have master running user xxx on machine m1. want run slave on machine m2 user yyy.

i have private-public key in place between 2 machines can

[xxx@m1]$ ssh yyy@m2 

and connected.

in jenkins, created credentials username m2 , selected option from jenkins master ~/.ssh. when try connect fails :

[04/18/13 14:58:11] [ssh] opening ssh connection m2:22. error: failed authenticate yyy credential=c2cdc4dd-cb39-4f15-8329-033933ad5621 java.io.ioexception: publickey authentication failed.  [04/18/13 14:58:11] [ssh] authentication failed. hudson.abortexception: authentication failed.     

surprisingly, if use option enter directly , copy paste private key ~/.ssh/id_dsa , works.

what doing wrong ?

the order of preference is: id_rsa, id_dsa, identity

so take ~/.ssh/id_rsa if present , fall ~/.ssh/id_dsa if id_rsa missing.

where have multiple keys , need specify explicitly 1 key, recommendation either specify path file or use copy & paste


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -