Hi Guillaume,

we had similar problem when we designed the LDAP API, but we decided to change the way users should get data, depending on the mode. Asynchronous mode is not really expected to be the main mode by the average Joe user, so we made the getSession() a synchronous method, and we added a getAsyncSession() method for those who wanted to get a Future and deal with it later.

Would it be an option for SSHd ?


Le 10/30/12 9:38 AM, Guillaume Nodet a écrit :
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





--
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com

Reply via email to