I am trying to copy resources to another location. I am using maven wagon-ssh plugin to do this. It works fine locally, I am having issues when using Hudson/Jenkins.
Wagon-ssh will do the work for you. No manual or scripted copying of fingerprints need be done.
Disable only strict host key checking in the settings.xml file.
iq
no
user
pass
The host fingerprint is automatically accepted and stored in the known_hosts file. The rest of the authentication process proceeds as normal.
This runs successfully on a Bamboo buildserver with build agents with their own local ssh configuration files.