connect node with jenkins

create a new instance linux

install openjdk

sudo apt-gte update
sudo su 
sudo apt-get install openjdk-11-jre -y
mkdir jenkins-node
chmod 755 jenkins-node
cd jenkins-node
ssh-keygen
(enter) copy path fron here /root/.ssh/
(enter)
cd pastepath
cat id-rsa(privatekey)
cat id-rsa.pub(public key)
#copy public key asnd paste it in authrire key here
vim autherise-key
#paste public key here

Now go to jenkins server create credietial

ssh with username wala krna hai

username me root dalo

add private key copy private key from node paste it here