throw new NullPointerException("getHost() returns null");
}
if (getKeyPair() == null) {
throw new NullPointerException("privateKey is required");
}
SshConnectionInfo connectionInfo = new SshConnectionInfo(getHost(), getPort(), getUser(), getKeyPair());
if (sshConnection != null) {
throw new IllegalStateException("Attempt to get SSH connection when connection not previously closed");
}