thanks, i try this way . Could you please also suggest  Create an SSH key 
pair  this step should be executed on jenkins server or ssh server. till 
now i have executed on ssh server 

On Wednesday, July 29, 2020 at 2:38:02 PM UTC+2 [email protected] wrote:

>
>>    - 
>>    
>>    
>>    Create an SSH key pair (public/private) Ran the command “ssh-keygen 
>>    -t rsa -C "Jenkins agent key" -f "jenkinsAgent_rsa" “
>>    - 
>>    
>>    Create an SSH credential in the Jenkins machine and put the private 
>>    key there Created the credentials and put jenkinsAgent_rsa into it.
>>    
>> These steps are fine
>  
>
>>
>>    - 
>>    
>>    Create an SSH agent see 
>>    
>> https://github.com/jenkinsci/ssh-slaves-plugin/blob/master/doc/CONFIGURE.md#configure-launch-agents-via-ssh
>>  – 
>>    This is creating a node which I didn’t do before – so I created the node 
>>    and selected the credential with the private key. The verification 
>> strategy 
>>    slect is non-verifying.
>>    - 
>>       
>>       Select the SSH credential created before as credentials
>>       - 
>>       
>>       Chose the verification strategy that you want, see the 
>>       documentation, if you have problems start with the "Non verifying 
>>       Verification Strategy" you can change it later
>>       
>>
> This doing something completly different, you  are creating a jenkins 
> agent via ssh,  what you need is an ssh-agent. 
>
> I assume you are using pipelines, the wrap the ssh-calling sh step in an 
> sshagent wrapper (best to use the Snippet generator for the details).
>  
>
>>
>>    - 
>>    
>>    Add the public key on ~/.ssh/authorized_keys This was done
>>    
>>
> Fine again ( at least if ~ expand to the correct user (whatever jenkins is 
> running the agent as), unless you also explicitly specify the user in your 
> ssh requests.  From the log it looks like
> the agent is running as root (no a good idea, but that is another thing), 
> so you would need to add the key to /root/.ssh/authorized_keys (and 
> possibly allow remote root logins in the sshd config).
>
> but i am not able to establish the connection between jenkins and ssh 
>> server
>> my ssh and jenkins server both are hosted on same ip
>>
>

-- 
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/0c3cf48b-6545-4f98-914b-eb834e5356a0n%40googlegroups.com.

Reply via email to