[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to Create object for Channel class / using C++ wrapper


On Friday 12 October 2012 16:35:34 chandu wrote:
> Hello
> I am trying to create a object for Channel Class, to invoke constructor of
> Channel class.
> below is how I am creating the objects
> 
> *ssh::Session session;   // object of Session class
> ssh::Channel channel(session); // object of Channel class with parameter.*
> 
> it compiles with no problems, On running it giving segmentation fault.
> 
> can any one suggest me where I am doing mistake.

You should connect to a server first ...

ssh::Session session;

session.setOption(SSH_OPTIONS_HOST,"localhost");

session.connect();
session.userauthAutopubkey();

ssh::Channel channel(session);


-- 
Andreas Schneider                   GPG-ID: F33E3FC6
www.cryptomilk.org                asn@xxxxxxxxxxxxxx


References:
Re:how to Create object for Channel class / using C++ wrapperchandu <chandu73@xxxxxxxxx>
Archive administrator: postmaster@lists.cynapses.org