This script was working fine, but stopped working after the remote server was upgraded from Suse 9 to Suse9.1 . The problem should not be the ssh hosts file, because I can use ssh directly to connect without a problem, and also if I remove that file, ant throws a different exception (something along the lines of Host lookup failed). I am really stumped that why the authorization is failing when the password is included right there in the script (I know that is not very secure, this is to get it working)
SSH2 NOTE: (might not be required if using 0.9.4-22 or newer and id_dsa)
In order for SSH2 tunneling to function correctly one must ensure that the following line is uncommented in /etc/ssh/sshd_config : --------------------------CUT------------------------------- # Change to yes to enable tunnelled clear text passwords PasswordAuthentication yes --------------------------CUT-------------------------------
Otherwise the initiation of the tunnel will fail with "SSH Initialization failed, try again? com.jcraft.jsch.JSchException: Auth fail"
Thanks to whoever posted the above faq entry
After editing my remote sshd configuration, I can run the script again.
There is more to ssh authentication than simply setting a property. If the remote system uses public/private keys, then how to set that up on your system is much different than if the remote system uses a username/password scheme. So before we can help you, we need to know what kind of authentication is used by the remote system for ssh.