Тёмный
No video :(

How to Setup Linux Master Slave Agent in Jenkins with SSH-KEY ?| EP 05 | Common Mistakes by Engineer 

DevOps Vijay
Подписаться 1,3 тыс.
Просмотров 38 тыс.
50% 1

Install Java on #master node.
Install #jenkins on master node.
Install #java on slave node.
Create a user and ssh keys on #slave node.
Copy #keys on master node.
Join slave node to master.
Test the setup.
Steps to Configure Jenkins #master and #slave Nodes :
Click on Manage Jenkins in the left corner on the Jenkins #dashboard
Click on Manage Nodes
Select New #node and enter the name of the node in the Node Name field.
Select Permanent Agent and click the OK button. Initially, you will get only one option, "Permanent Agent." Once you have one or more slaves you will get the "Copy Existing Node" option
Enter the Hostname in the Host field.
Select the Add button to add credentials. and click Jenkins.
Do ssh key setup as shown in video
Select the dropdown menu to add credentials in the #credentials field.
Select the next dropdown to add the Host Key #verification Strategy under Non verifying Verification Strategy.
Select Keep this agent online as much as possible in the #availability field.
Click the Save button.
jenkins master slave setup
jenkins agent
jenkins tutorial
jenkins ci cd tutorials
jenkins ci cd
jenkins ci cd pipeline
jenkins tutorial for beginners
*************************************************************
Jenkins tutorial complete step by step guide :
How to install jenkins in windows: • How to Install Jenkin...
How to create first sample job in jenkins: • How to Create First Fr...
Poll scm jenkins : • Jenkins Poll SCM GitHu...
How to install plugin in jenkins: • Jenkins Plugins instal...
SSH-KEYS setup : • SSH Key Based Password...
Maven installation: • Maven Installation on ...
*************************************************************
Ubuntu on Virtualbox: • Need UBUNTU on Windows...
Devops interview questions: • Test your DevOps skill...
Devops java project sample: • Create Java Project in...
*****************************************************
devops tutorial for beginners
devops full course
devops interview questions
what is devops
aws devops
devops roadmap
devops engineer
#technology #tutorial #devops #jenkins #jenkinstutorial #jenkinspipeline #deployment #learning #tech #career #interview #question #career #jenkins #cicd #linux #devopsvijay #devopsproject #devopstraining #devopstrainingvideos #cicd #sitereliability #devopsengineer #bashscripting #shellscripting

Опубликовано:

 

29 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 127   
@martinb3523
@martinb3523 7 месяцев назад
You really helped me when you found the hostname and the correct username, I should've come to this video 12 hours earlier! Thank's man
@devopsvijay
@devopsvijay 7 месяцев назад
Glad it helped, stay connected and keep learning
@satendrakumar-ue4ze
@satendrakumar-ue4ze 6 дней назад
Thanks brother... explained in very simple way... I really apricated Thanks.
@devopsvijay
@devopsvijay 5 дней назад
Thanks, Glad it was helpful..
@thefamily512
@thefamily512 7 месяцев назад
Jenkins is one of the most counter intuitive things out there when it comes to simple things like adding nodes or upgrading. It should not be this cumbersome.
@devopsvijay
@devopsvijay 7 месяцев назад
yes, Very True. but mostly it will be like one time setup/pain.
@akhileshreddy3222
@akhileshreddy3222 7 месяцев назад
I have gone through many videos and wasted lot of my time. But this video helped me a lot in understanding the concept. A huge thanks.......!!!!!!!
@devopsvijay
@devopsvijay 7 месяцев назад
Glad it helped,
@humza277
@humza277 9 месяцев назад
Spent ages trying to get this to work, this tutorial has everything needed +1
@devopsvijay
@devopsvijay 9 месяцев назад
Thank you
@joshua_hc_cr
@joshua_hc_cr 6 месяцев назад
Thank you! For those who are having trouble connecting, please ensure that you are creating the files and folders under the correct user (root) and not the default 'home' user."
@devopsvijay
@devopsvijay 6 месяцев назад
Thanks for the suggestion. This will help the viewers.
@Pankaj-zw9wi
@Pankaj-zw9wi Год назад
found this solution after 2 months, thank you
@devopsvijay
@devopsvijay Год назад
Glad it helped.
@workwithmayuresh
@workwithmayuresh Год назад
Thanks a ton bro ! Finally after wasting so many hours on youtube... this worked for me ! ❤
@devopsvijay
@devopsvijay Год назад
Glad it helped. Stay connected and keep learning
@tinkertin
@tinkertin Год назад
After going through alot of video for agent setup, finally this one helped. Noone shows the authentication failed issue. Finally got to know how this is resolved. Thank you! Can you also make a video for setting up agent in windows?
@devopsvijay
@devopsvijay Год назад
Glad i could help @aishwarya!!!.. i have created video for slave agent setup in windows also. ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-VwliiaOI5po.html Keep learning with me .Stay connected with my channel :) . Do subscribe the channel for more updates : ) #devopsvijay
@509swetha6
@509swetha6 2 месяца назад
Thank you so much. My issue got resolved.🎉
@devopsvijay
@devopsvijay 2 месяца назад
Glad , it was helpful
@satheeshbabu9310
@satheeshbabu9310 Год назад
Nice and grisp, and much needed one. Many skip this part
@devopsvijay
@devopsvijay Год назад
Glad it helped
@SandeepSingh-hn6it
@SandeepSingh-hn6it 9 месяцев назад
Vijay, this is really helpful, but I noticed only you are replying who said good, but I didn't seen any reply who are asking any doubts of error as commented
@devopsvijay
@devopsvijay 9 месяцев назад
Thanks sandeep for feedback. For errors, mostly i see the error code. Without background scenario i can't answer exactly. I try answering for some generic errors and question, Thanks.
@AnamikaKumari-vf6js
@AnamikaKumari-vf6js 3 месяца назад
Thank you you are amazing. It worked
@devopsvijay
@devopsvijay 3 месяца назад
Glad it helped.
@rupachandu1211
@rupachandu1211 Год назад
Thank you for the detailed information. The issue got resolved. Thank you
@devopsvijay
@devopsvijay Год назад
Glad it helped Please Like share & subscribe . Stay connected and keep learning
@GayanendraShakya
@GayanendraShakya Год назад
Really nice and easy steps you describes thanks
@devopsvijay
@devopsvijay Год назад
Glad it helped. Like subscribe and share for much videos. Thanks
@ppankaj58
@ppankaj58 7 месяцев назад
Thanks Vijay you save job🙏
@nehaslittleworld
@nehaslittleworld Год назад
Thanks for the info. Very helpful
@devopsvijay
@devopsvijay Год назад
Glad it was helpful!
@sai-yq8pw
@sai-yq8pw Год назад
Great explaination
@devopsvijay
@devopsvijay Год назад
Thanks.
@mandlik1996
@mandlik1996 11 месяцев назад
Thank you Vijay.
@devopsvijay
@devopsvijay 11 месяцев назад
please Like and subscribe for more devops related videos
@marcocallisaya5678
@marcocallisaya5678 Год назад
excelent guide. Thanks
@devopsvijay
@devopsvijay Год назад
Haapy to help
@kranthichamp3002
@kranthichamp3002 Год назад
good information broo..very helpful keep going
@devopsvijay
@devopsvijay Год назад
Thank you so much 🙂
@prasadgaming7574
@prasadgaming7574 Месяц назад
Thank you
@devopsvijay
@devopsvijay 27 дней назад
Happy to help
@alexanderlazarogomezvaldiv4336
Thanks for sharing
@devopsvijay
@devopsvijay Год назад
Thanks for watching! Please like and subscribe and stay connected for more such videos.
@sivashankarreddy9858
@sivashankarreddy9858 Год назад
Very helpful bro thanks
@devopsvijay
@devopsvijay Год назад
Happy to help
@shaikkurshid1711
@shaikkurshid1711 6 месяцев назад
Hello Viay.Thanks for your vidoe .Can you please help me to fix this issue i am getting this issue SSH Connection failed with IOException Key exchange was not finished connection is closed retrying in 15 seconds There are 5 more retries left
@devopsvijay
@devopsvijay 6 месяцев назад
Please go over the previous comments, I had mentioned couple of resolution to solve this issue. Might be helpful for u. Thanks
@sumitraii4566
@sumitraii4566 8 дней назад
how to deploy war file from jenkins on windows to linux agent on tomcat conatiner?
@devopsvijay
@devopsvijay 8 дней назад
Once linux agent is connected as slave. The deploying war file in tomcat process is same for windows and linux. Take a look at this video, might be helpful ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-fuelx5j1HA8.html
@varunbc
@varunbc 6 месяцев назад
hi vijay, please make a video of connecting ssh to linux server for command execution from windows jenkins server as a domain user
@varunbc
@varunbc 6 месяцев назад
please check this
@devopsvijay
@devopsvijay 6 месяцев назад
Thanks @varunbc for suggestion. Noted it .
@SandeepSingh-hn6it
@SandeepSingh-hn6it 9 месяцев назад
Thanks ! my jenkins are running Centos and I am connecting agent as Ubuntu22.4. 1.Creating SSH key on agent Ubuntu machine. 2. using id_rsa as private during node creation 3. copy id_rsa_pub into authorized key file in same machine ERROR: Server rejected the 1 private key(s) for ubuntu (credentialId:devopstest/method:publickey)
@devopsvijay
@devopsvijay 9 месяцев назад
Couple of things might go wrong in this rejection Extra space while pasting private key in jenkins creds Private key file and authorized key file permission Make sure these 2 files are kept under correct user and correct location. And i see file name which u pastes is id_rsa_pub i believe dot should be there like id_rsa.pub
@SandeepSingh-hn6it
@SandeepSingh-hn6it 8 месяцев назад
May you can increase the font size.. not sure if okay my feedback :)
@devopsvijay
@devopsvijay 8 месяцев назад
Yes, Thanks alot for your feedback, i have noted it down.
@nagaedu1524
@nagaedu1524 Год назад
Thanks bro
@Belief-tv6rl
@Belief-tv6rl 2 месяца назад
ERROR: Server rejected the 1 private key(s) for ec2-user (credentialId:jenkins-slave/method:publickey) authentication failed what should i have to do ? bro
@devopsvijay
@devopsvijay 2 месяца назад
Thanks for pasting the error. Check the comments history, you will find the solution i had pasted sometime back.
@ObulReddyM-gn8wh
@ObulReddyM-gn8wh 7 месяцев назад
How you are taking root remote directory and why your taking it?
@devopsvijay
@devopsvijay 7 месяцев назад
Remote root directory is nothing but working directory for an agent. You can select any directory. Which has access to jenkins agent
@user-dv3nd8qg7w
@user-dv3nd8qg7w 7 месяцев назад
😢not working .... In authorized key folder I already have public key but not private key so I copied private key into that directory still not working and before it I tried many times still not working
@devopsvijay
@devopsvijay 7 месяцев назад
You can create new private and public key using ssh-keygen command. You should always use it in pair.
@user-dv3nd8qg7w
@user-dv3nd8qg7w 7 месяцев назад
@@devopsvijay ok thank you
@Harsh_TruthYT
@Harsh_TruthYT Год назад
Nice and simple.. great work. Can you plan some session on ssh also!!
@devopsvijay
@devopsvijay Год назад
Yes for sure
@devopsvijay
@devopsvijay Год назад
@sadanand Created video on ssh ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-1_v7NXaDYkw.html Take a look. Feedback would be appreciated
@Its_shubhamaws
@Its_shubhamaws 4 месяца назад
Awesome Vijay. can we connect for a quick question?
@devopsvijay
@devopsvijay 3 месяца назад
Thanks
@devopsvijay
@devopsvijay 3 месяца назад
you can put your question in comments
@sravanigundepalli3513
@sravanigundepalli3513 5 месяцев назад
Is it possible to run build on same server or system when we create slave naming other systems My target is to build 6 jobs parallelly containing same code but with different parameter change. how can i achieve this?
@anandhakumarg6032
@anandhakumarg6032 9 месяцев назад
In Windows, jenkins has private key of linux copied. But it doesnt have the public key of linux. How does the communication established between. I was just wondering about it. Thanks if you could help me out.
@devopsvijay
@devopsvijay 9 месяцев назад
In windows you can use jnlp method to connect windows agent.
@RM-xu3dv
@RM-xu3dv Год назад
When i install Jenkins on ec2, im getting only 2 options in launch method. Only first and third option, middle one is not coming, whats the reason
@venkatprasad2205
@venkatprasad2205 Год назад
Thanks for the video bro. The logs says agent is missing java installation? is it mentioned in the video?
@devopsvijay
@devopsvijay 11 месяцев назад
java is must for jenkins and it's agent to work. that is mandatory requirement for jenkins. i have covered that part in jenkins introduction video.
@user-xk6pl7ts5n
@user-xk6pl7ts5n Год назад
In my screen, there is NO Authorized keys, icant copy paste public key.. please clear
@ravikumarb3895
@ravikumarb3895 3 месяца назад
Hi vijay .... I do same in all steps in practical session the error will occurs authentication failed . i do same all steps by in your video same process
@devopsvijay
@devopsvijay 3 месяца назад
you might be missing some steps like: Couple of things might go wrong in this rejection Extra space while pasting private key in jenkins creds Private key file and authorized key file permission Make sure these 2 files are kept under correct user and correct location.
@alfrieghtsnalam7507
@alfrieghtsnalam7507 10 месяцев назад
i follow what you done still i have error my slave cannot connect becoz of the private key i put in there in credential is not recognize hahiast
@devopsvijay
@devopsvijay 9 месяцев назад
Might be there is some extra line at the end.
@user-rv1rr2on5s
@user-rv1rr2on5s 10 месяцев назад
Great demo but after going through the exact steps I still have this error (i'm on rhel 8)......[10/06/23 12:12:26] [SSH] Opening SSH connection to 10.xx.xxx.163:22. [10/06/23 12:12:26] [SSH] SSH host key matched the key required for this connection. Connection will be allowed. ERROR: Server rejected the 1 private key(s) for jenkins (credentialId:SSH_CONNECT_AGENT/method:publickey) [10/06/23 12:12:26] [SSH] Authentication failed. Authentication failed. [10/06/23 12:12:26] Launch failed - cleaning up connection [10/06/23 12:12:26] [SSH] Connection closed.
@devopsvijay
@devopsvijay 10 месяцев назад
There could be couple of reason of authentication failed. 1 . Make sure chmod permission of authorized_keys is correct. Where you have pasted public key. 2. Private key present in jenkins. There should be no extra line while pasting.
@austinaisosa2401
@austinaisosa2401 3 месяца назад
mine is always showing offline how do i sort it out
@devopsvijay
@devopsvijay 3 месяца назад
paste the error in comment, which you might be getting
@yashwanththati1001
@yashwanththati1001 10 месяцев назад
hi , i am using mac os and in terminal in created ssh keys using ssh-keygen i am getting only 2 files , i am not getting authorized_keys file idk why any. one help ?
@devopsvijay
@devopsvijay 9 месяцев назад
Authorized_keys will not get generated automatically. You have to create manually.
@user-uh8jj4wl6c
@user-uh8jj4wl6c 26 дней назад
hello , my doubt is , generated ssh keys in agent server and add private key in jenkins , but where to add public ? in master server or agent server? anyone please give reponse
@devopsvijay
@devopsvijay 25 дней назад
Agent server.
@veeraiahmadamanchi4723
@veeraiahmadamanchi4723 2 месяца назад
Host name didn't worked for me i tried using the public ip it connected
@devopsvijay
@devopsvijay Месяц назад
Please paste the error. I will try to check
@mr_zeeshu110
@mr_zeeshu110 9 месяцев назад
jenkins node connection error : Agent JVM has terminated. Exit code=1 Launch failed - cleaning up connection [SSH] Connection closed
@dileeppulabala1896
@dileeppulabala1896 Год назад
Hi bro getting error after following the same steps can you please help me out
@devopsvijay
@devopsvijay 11 месяцев назад
can you please paste the error, i will try to check. Sorry for the late reply
@crazy_life05
@crazy_life05 Год назад
It showing 'ssh connection failed with Ioexception;' why bro?
@tusharanand4059
@tusharanand4059 8 месяцев назад
Mate, why are you using private IP as hostname ?
@devopsvijay
@devopsvijay 8 месяцев назад
Because i have complete setup inside same vpc. You can use any ip. Only thing that's needed connectivity on port 22
@KuldeepSingh-uo9yf
@KuldeepSingh-uo9yf 10 месяцев назад
not connected with my jenkins and followd your said steps
@devopsvijay
@devopsvijay 8 месяцев назад
Can you please provide the complete error for analysis, so that i can go through and try answering it. If you are still facing issue, sorry for the delay in reply
@maheshnarayantripathi4868
@maheshnarayantripathi4868 Год назад
Hi Sir How to solve mulitiple SSH private key to Jenkins? If i have multiple server.?
@devopsvijay
@devopsvijay Год назад
You can do it using manage jenkins and then credentials
@hariomdoorwar5693
@hariomdoorwar5693 8 месяцев назад
getting this error No Known Hosts file was found at /var/lib/jenkins/.ssh/known_hosts. Please ensure one is created at this path and that Jenkins can read it.
@devopsvijay
@devopsvijay 8 месяцев назад
There might be a permission issue on your server due to which it is not able to create those files automatically. You can create manually and give proper permission to file and folder and see if that works.
@user-tj6ji7ri1c
@user-tj6ji7ri1c 5 месяцев назад
Authentication failed
@yoganandatc3906
@yoganandatc3906 Год назад
Bro, connection failed ....after trying many times...
@devopsvijay
@devopsvijay Год назад
Please paste the error in comment i will try to help
@devopsvijay
@devopsvijay Год назад
There could be couple of reason of authentication failed. 1 . Make sure chmod permission of authorized_keys is correct. Where you have pasted public key. 2. Private key present in jenkins. There should be no extra line while pasting.
@jaybhalani5431
@jaybhalani5431 4 месяца назад
bhai in ~/.ssh/ i am not getting authorized_key file
@kishoregowrish1373
@kishoregowrish1373 Год назад
Authentication failed after trying many times
@devopsvijay
@devopsvijay Год назад
Please paste the error in comment . I will look into that and try to help. There could be couple of reason of authentication failed. 1 . Make sure chmod permission of authorized_keys is correct. Where you have pasted public key. 2. Private key present in jenkins. There should be no extra line while pasting.
@DeviL-yw6ud
@DeviL-yw6ud Год назад
My side not any authorisation key file
@DeviL-yw6ud
@DeviL-yw6ud Год назад
@@devopsvijay how to make authorisation key file
@devopsvijay
@devopsvijay Год назад
@@DeviL-yw6ud use ssh-keygen command in linux to create authorisation private and public key file. and for authorized_keys file Fire command touch authorized_keys inside .ssh folder make sure to follow these permission to files: .ssh directory: 700 (drwx------) public key (.pub file): 644 (-rw-r--r--) private key (id_rsa): 600 (-rw-------)
@devopsvijay
@devopsvijay Год назад
chmod 644 /home/$USER/.ssh/authorized_keys
@parasrajput3538
@parasrajput3538 Год назад
is it on gcp ?
@devopsvijay
@devopsvijay Год назад
No, aws
@qwee8383
@qwee8383 Год назад
dosent work
Далее
Reforged | Update 0.30.0 Trailer | Standoff 2
02:05
Просмотров 789 тыс.
How to Create an Agent Node in Jenkins
23:57
Просмотров 94 тыс.
how did I NOT know about this?
23:06
Просмотров 912 тыс.
Using docker in unusual ways
12:58
Просмотров 442 тыс.
Password Hacking in Kali Linux
24:22
Просмотров 786 тыс.
How to Install Jenkins Agent on Windows
21:20
Просмотров 38 тыс.