Reject HostKey: when deploying JAR using gradle ssh plugin

I am trying to download a jar from Gradle and use the Gradle SSH plugin: https://gradle-ssh-plugin.imtqy.com/

Sorry, the goal completed with an error

 * What went wrong: Execution failed for task ':deploy'. > reject HostKey: SERVERIPADDRESS 

How to fix?

I found that there is a similar error with the Ant SSH task, and it can be fixed using the rule trust = true. Unfortunately, I cannot find a suitable option here.

those. apparently i need to configure the SSH client so that it accepts the host id.

+5
source share
2 answers

Try the following:

  ssh.settings { knownHosts = allowAnyHosts } 

PS: Sorry to fix bugs new to SOF

+10
source

You need to add the SSH server key information to your ~/.ssh/known_hosts .

To get the command to run ssh-info ssh-keyscan -t rsa server.com and add its output to ~/.ssh/known_hosts

Or use ssh-keyscan -t rsa server.com >> ~/.ssh/known_hosts

0
source

Source: https://habr.com/ru/post/1246303/


All Articles