The API is asynchronous.
You need to use

   ClientSession session = client.connect(host, port).await().getSession();

On Mon, Oct 29, 2012 at 6:38 PM, Jonathan Welzel <[email protected]> wrote:

> I have been trying to set up a SSH Client using SSHD, but I'm unable to
> obtain a session from the client. It's always null.
>
> SshClient client = SshClient.setUpDefaultClient();
> client.start();
> ClientSession session = client.connect("10.47.10.57", 22).getSession(); //
> session is always null
>
> I'm able to connect using Putty, so what's wrong?
>
> --
> Jonathan Welzel
>



-- 
------------------------
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/
------------------------
FuseSource, Integration everywhere
http://fusesource.com

Reply via email to