You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Paul Spencer <pa...@apache.org> on 2014/11/21 20:48:28 UTC

The Karaf 3.0.x “Programmatically Connect” Developers Guide[1] uses some deprecated sshd APIs.

The example in the Karaf 3.0.x “Programmatically Connect” Developers Guide[1] uses some deprecated sshd APIs. I have detailed code using the deprecated APIs and suggested replacement code.  
   

*** Connect() changed
From:
  ConnectFuture future = client.connect(host, port);
To:
  ConnectFuture future = client.connect(user, host, port);

*** authPassword() changed
From:
  session.authPassword(user, password);
To:
  session.addPasswordIdentity(password);
  session.auth().verify();


Paul Spencer
[1]  http://karaf.apache.org/manual/latest/developers-guide/connect.html

Re: The Karaf 3.0.x “Programmatically Connect” Developers Guide[1] uses some deprecated sshd APIs.

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Paul,

good point.

I will create a Jira to update the documentation.

Thanks,
Regards
JB

On 11/21/2014 08:48 PM, Paul Spencer wrote:
> The example in the Karaf 3.0.x “Programmatically Connect” Developers Guide[1] uses some deprecated sshd APIs. I have detailed code using the deprecated APIs and suggested replacement code.
>
>
> *** Connect() changed
> From:
>    ConnectFuture future = client.connect(host, port);
> To:
>    ConnectFuture future = client.connect(user, host, port);
>
> *** authPassword() changed
> From:
>    session.authPassword(user, password);
> To:
>    session.addPasswordIdentity(password);
>    session.auth().verify();
>
>
> Paul Spencer
> [1]  http://karaf.apache.org/manual/latest/developers-guide/connect.html
>

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com