Skip to content
Snippets Groups Projects
Commit 466e60e1 authored by tjc's avatar tjc
Browse files

ignore host verification

git-svn-id: svn+ssh://svn.internal.sanger.ac.uk/repos/svn/pathsoft/artemis/trunk@3579 ee4ac58c-ac51-4696-9907-e4b3aa274f04
parent 12dee4ef
No related branches found
No related tags found
No related merge requests found
......@@ -45,6 +45,7 @@ import java.util.logging.SimpleFormatter;
import com.sshtools.j2ssh.SshClient;
import com.sshtools.j2ssh.authentication.AuthenticationProtocolState;
import com.sshtools.j2ssh.authentication.PasswordAuthenticationClient;
import com.sshtools.j2ssh.transport.IgnoreHostKeyVerification;
/**
......@@ -161,9 +162,9 @@ public class SshLogin
port = Integer.parseInt(portfield.getText().trim());
if(port < 0)
ssh.connect(hostname);
ssh.connect(hostname, new IgnoreHostKeyVerification());
else
ssh.connect(hostname,port);
ssh.connect(hostname,port, new IgnoreHostKeyVerification());
// Try the authentication
result = ssh.authenticate(pwd);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment