1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
|
#ifndef USE_SSH_H
#define USE_SSH_H
#include <libssh/libsshpp.hpp>
#include <vector>
#include <QtCore/qcontainerfwd.h>
namespace CGAL{
namespace ssh_internal{
//should be used inside a try/catch(ssh::SshException e)
//give an uninitialized session.
bool establish_ssh_session(ssh_session& session,
const char *user,
const char *server,
const char *pub_key_path,
const char *priv_key_path,
const char *priv_key_password);
bool establish_ssh_session_from_agent(ssh_session& session,
const char *user,
const char *server,
const char *pub_key_path);
void close_connection(ssh_session& session);
bool push_file(ssh_session& session,
const char* dest_path,
const char* filepath);
bool pull_file(ssh_session &session,
const char *from_path,
const char *to_path);
bool explore_the_galaxy(ssh_session &session,
QStringList &files);
}}
#endif
|