0

i have disable the host key checking ssh but it logs illegal key size warning

SSHClient ssh = new SSHClient();
    ssh.addHostKeyVerifier(new HostKeyVerifier() {
    @Override
    public boolean verify(String arg0, int arg1, PublicKey arg2) {

      return true;
    }});

    ssh.connect(hostIP, CommonProperties.SSH_PORT);
    ssh.authPassword(serverUserName, serverPassword);

1 Answers1

1

The 'Illegal Key Size' warnings typically are displayed when either:

  1. You are not running with the Unlimited Strength Java Cryptography Extensions
  2. BouncyCastle could not be loaded.

These are just warnings that SSHJ will only use limited strength cryptography, which is of course less secure.

Hiery Nomus
  • 17,429
  • 2
  • 41
  • 37