uploadArchives prompts for remote server acceptance

Continuing the discussion from Gradle prompts for password on uploadArchives via SCP using mavenDeployer:

I experienced a similar problem on a new build slave.
It is not the password it seems to be related to ssh client accepting the server and once it has been accepted it is happy. I actually had to run a commandline build on the slave and type yes to the prompt before subsequent builds would be happy.