AFAIU, Maven will call the external SSH command as same as when it connects to the SCM ,e.g. the SVN. To get rid of the prompt for connecting, we may need to use the SSH to connect to that host at lease once.
#--I'm using CentOS release 5.4.
[my_user]$ ssh MY_USER@MY_HOST
The authenticity of host 'MY_HOST (MY_HOST_IP)' can't be established.
RSA key fingerprint is MY_FINGER_PRINT.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'MY_HOST,MY_HOST_IP' (RSA) to the list of known hosts.
The ~/.ssh/known_hosts
will contain the RSA information as the following example: -
MY_HOST,MY_HOST_IP ssh-rsa .....
Then next time, when we connect to that host there is no any prompt. The rest at settings.xml
should be as mentioning at Settings Reference:Servers.
I hope this may help.
EDITED: Regarding to the Windows, please try to use the PuTTY. There are the executable file which is ready to run without any installation. The step for connecting is as the following: -
PuTTY
- Open the
PUTTY.exe
- Make a connection to our host.
- The system will prompt to whether to save the remote RSA key or not. Please save it.
- After that the remote RSA key will store at windows registry
HKEY_CURRENT_USER\SoftWare\SimonTatham\PuTTY\SshHostKeys