I’m taking the 5 task in Level 1 Jenkins, I have a problem with ssh connection is failed each time i made a connection test, I have created the credentials as the wiki docs: Nautilus (kodekloudhub.github.io)
Do you make correct credentials for storage server?
Can you connect to storage server from jenkins server via ssh from cli?
Is this error repeats even after restart the lab?
In this thread https://kodekloud.com/community/t/jenkins-install-packages-build-failed/342816/7 users fase the same problem.
But KKE team says that task is ok.
SSH plugin that you using is correct (I use the same). Try to ask kelf from KKE Team.
But if no luck, I can provide you another solutions for this task:
Install sshpass to jenkins server (via cli).
Set “Use secret text(s) of file(s)” option for freestyle job, and make variables for login/pass for ststor01 server.
Next just add shell command to job: sshpass -p "$PASSWORD" ssh -o "StrictHostKeyChecking no" -tt $USERNAME@ststor01 "echo $PASSWORD | sudo -S yum install -y $PKG"
Where $PASSWORD and $USERNAME - previous variables, and $PKG - parameter for package to install.
…
This work for me even without SSH plugin in my local lab.
…
Or make it even easier:
Generage ssh-key for jenkins server and send it to ststor01.
Next, add ‘natasha ALL=(ALL:ALL) ALL’ to /etc/sudoers file on ststor01.
Then with this should work simple command: ssh -t natasha@ststor01 sudo yum install -y $PKG