#include <libssh/libssh.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <unistd.h>
#include <iostream>
#include <sys/wait.h>
using namespace std;
int main ( int argc, char ** argv) {
ssh_session sess = NULL;
sess = ssh_new();
ssh_options_set(sess, SSH_OPTIONS_PORT_STR, "22");
ssh_options_set(sess, SSH_OPTIONS_USER, "root");
ssh_options_set(sess, SSH_OPTIONS_TIMEOUT, "20");
ssh_options_set(sess, SSH_OPTIONS_HOST, "99.112.43.11");
if(ssh_connect(sess) != SSH_OK) {
cout << ssh_get_error(sess) << "\n" << std::endl;
exit(0);
}
if(ssh_userauth_password(sess, NULL, "root") == SSH_AUTH_SUCCESS) {
cout << "Connected" << std::endl;
ssh_disconnect(sess);
exit(0);
}
}
при компиляции кода выкидываются следующие ошибки
/home/rodion/ClionProjects/lexem/main.cpp:45: undefined reference to `ssh_new'
/home/rodion/ClionProjects/lexem/main.cpp:50: undefined reference to `ssh_options_set'
/home/rodion/ClionProjects/lexem/main.cpp:51: undefined reference to `ssh_options_set'
/home/rodion/ClionProjects/lexem/main.cpp:52: undefined reference to `ssh_options_set'
/home/rodion/ClionProjects/lexem/main.cpp:59: undefined reference to `ssh_options_set'
/home/rodion/ClionProjects/lexem/main.cpp:75: undefined reference to `ssh_connect'
/home/rodion/ClionProjects/lexem/main.cpp:76: undefined reference to `ssh_get_error'
/home/rodion/ClionProjects/lexem/main.cpp:79: undefined reference to `ssh_userauth_password'
/home/rodion/ClionProjects/lexem/main.cpp:81: undefined reference to `ssh_disconnect'
/home/rodion/ClionProjects/lexem/main.cpp:85: undefined reference to `ssh_disconnect'
/home/rodion/ClionProjects/lexem/main.cpp:97: undefined reference to `ssh_free'
в чем может быть проблема ?