The solution to overcome this problem is
Goto slave node switch to the root user
Add a user to jenkins home using
useradd -d /var/lib/jenkins jenkins
Here /var/lib/jenkins is having my home directory
Now, from jenkins master copy the id inside id_rsa.pub from jenkins user
Now, create an authorized_keys file for jenkins user form slave node
And create an authorized_keys file
Paste the id that you have copied from id_rsa.pub here and save the file with “:wq!”.
This will help you to resolve the issue.
For more information please go through the following tutorial to get more info about jenkins: