private void authenticate() throws IOException {
boolean success = true;
if (rProject.isUseCertificate()
&& conn.isAuthMethodAvailable(rProject.getUsername(),
"publickey")) {
final KeyInputDialog kd = new KeyInputDialog(JSimLogic
.getInstance().getFrame(), "Key File", "");
kd.setLocationRelativeTo(JSimLogic.getInstance().getFrame());
kd.setVisible(true);
if (kd.getFile() == null || kd.getFile().length() == 0)
throw new IOException("Login aborted by user");
File keyFile = new File(kd.getFile());
if (keyFile.exists()) {
final EnterInputDialog esd = new EnterInputDialog(JSimLogic
.getInstance().getFrame(), "Key Authentication",
new String[] { "Enter private key password" }, true);