public void setPreferredPublicKey ( String name ) throws SshException { if ( name == null ) return ; if ( publicKeys . contains ( name ) ) { prefPublicKey = name ; setPublicKeyPreferredPosition ( name , 0 ) ; } else { throw new SshException ( name + " is not supported" , SshException . UNSUPPORTED_ALGORITHM ) ; } }
Set the preferred public key algorithm .