Introd	public static void main (String[] args) throws IOException {				SSHClient ssh = new SSHClient();		ssh.loadKnownHosts();				ssh.connect("192.168.89.129", 22);				try {			ssh.authPublickey(System.getProperty("administrator"));			Session session = ssh.startSession();			try {				Command cmd = session.exec("ping -c 1 google.com");				System.out.println(IOUtils.readFully(cmd.getInputStream()).toString());				cmd.join(5, TimeUnit.SECONDS);				System.out.println("\n** exit status: " + cmd.getExitStatus());			} finally {				session.close();			}		} finally {			ssh.disconnect();			ssh.close();		}	}uceţi aici codul...Introduceţi aici codul...[main] INFO net.schmizz.sshj.common.SecurityUtils - BouncyCastle already registered as a JCE providerHello again, so i tried without loading known host but it disconnects with the following error.
--
You received this message because you are subscribed to the Google Groups "sshj-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sshj-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Can you check the github issue tracker and open a ticket there describing your setup, what you tried and what you're getting?
2018-01-16 16:52 GMT+01:00 Eder F. Freitas <jederf...@gmail.com>:
How did you solved this? I've the same problem.
Em terça-feira, 28 de abril de 2015 17:35:56 UTC-3, Catalin Bararu escreveu:Hello again, so i tried without loading known host but it disconnects with the following error.
--
You received this message because you are subscribed to the Google Groups "sshj-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sshj-users+...@googlegroups.com.
Maybe you can try out something like this:
public static void main(String[] args) throws IOException {
    final SSHClient client = new SSHClient();
    client.addHostKeyVerifier(new PromiscuousVerifier()); //Adds a fake host verifier that treats every host as a known one (i.e., its part of the ~/.ssh/known_hosts file )
    client.connect("hostname");
    try {
        client.authPassword("username", "password");
        final Session session = client.startSession();
        try {
            final Session.Command cmd = session.exec("true");
            cmd.join(1, TimeUnit.SECONDS);
        } finally {
            session.close();
        }
    } finally {
        client.disconnect();
    }
}
Thanks & Regards
Krishnan Mahadevan
"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/