Anyone here have experienced libssh C++ wrapper yet? You can get here I'm using 0.6.3 version . I follow INSTALL instruction in downloaded file to build libraries.
Then I try to compile the example in examples directory libsshpp.cpp
#include <iostream>
#include <string>
#include <libssh/libsshpp.hpp>
int main(int argc, const char **argv){
ssh::Session session;
try {
if(argc>1)
session.setOption(SSH_OPTIONS_HOST,argv[1]);
else
session.setOption(SSH_OPTIONS_HOST,"localhost");
session.connect();
session.userauthAutopubkey();
session.disconnect();
} catch (ssh::SshException e){
std::cout << "Error during connection : ";
std::cout << e.getError() << std::endl;
}
return 0;
}
by command g++ -o sh libsshpp.cpp -lssh
successed but when execute it take error : ./sh: symbol lookup error: ./sh: undefined symbol: ssh_userauth_publickey_auto
. Hope who worked with libssh can help!