by rozanalitasy » Mon Sep 08, 2008 3:58 pm
I already tried doing that as you have asked me to use either
addKnownHost(ftpMachine,"~/.ssh/id_rsa.pub") or loadKnownHosts().
I did it again by removing the loadKnownHosts() from my apps but it returns me the error saying
The host signature is invalid or the host key was not accepted!
Where am i going wrong???
sshftp = new SSHFTPClient( );
sshftp.setRemoteHost(ftpMachine);
sshftp.setRemotePort(22);
sshftp.getValidator().setHostValidationEnabled(true);
sshftpvalidator.addKnownHost(ftpMachine,"~/.ssh/id_rsa.pub");
sshftp.setAuthentication(ftpUsername,ftpPassword);
sshftp.connect();
Its not able to invoke the connect().
HELP ME!!!!!!!!!!!!!!