The loadknownhosts() returns me with this error :
Bad Base64 input character at 3: 64(decimal)
My application goes like this:-
sshftp = new SSHFTPClient( );
sshftp.setRemoteHost(ftpMachine);
sshftp.setRemotePort(22);
sshftp.getValidator().setHostValidationEnabled(true);
sshftpvalidator.addKnownHost(ftpMachine,"~/.ssh/id_rsa.pub");
sshftp.setAlgorithmEnabled(SSHFTPAlgorithm.KEY_RSA, true);
sshftpvalidator.loadKnownHosts("~/.ssh/id_rsa.pub");
sshftp.setAuthentication(ftpUsername,ftpPassword);
sshftp.connect();
My code stops after sshftp.setAlgorithmEnabled(SSHFTPAlgorithm.KEY_RSA, true); and throws the above error.
Kindly help me in resolving the issue as am unsure of the cause for the error.