Lokesh Kumar
Lokesh Kumar

Reputation: 51

Jenkins agent configuration issue in linux

I am facing the below issue please have a look.

Searching for lokesh in /var/lib/jenkins/.ssh/known_hosts Searching for lokesh:22 in /var/lib/jenkins/.ssh/known_hosts

[06/04/20 12:59:45] [SSH] WARNING: No entry currently exists in the Known Hosts file for this host. Connections will be denied until this new host and its associated key is added to the Known Hosts file.
Key exchange was not finished, connection is closed.
SSH Connection failed with IOException: "Key exchange was not finished, connection is closed.", retrying in 15 seconds. There are 8 more retries left.

Upvotes: 1

Views: 21165

Answers (2)

rfencl
rfencl

Reputation: 41

run this on your Jenkins server: ssh-keyscan -H ${IP-OF-AGENT} > ~/.ssh/known_hosts

Upvotes: 2

pratikvasa
pratikvasa

Reputation: 2045

You should add the ssh key (created on the slave) to your known hosts file of in the master (Jenkins user). Follow this link

Also you can try one more thing if this does not work. There is an option of Host key verification strategy in jenkins node setup.

Select Non verifying verification strategy and check.

Let me know if this helps.

Upvotes: 8

Related Questions