File: Use_ssh.h

package info (click to toggle)
cgal 6.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 144,912 kB
  • sloc: cpp: 810,858; ansic: 208,477; sh: 493; python: 411; makefile: 286; javascript: 174
file content (38 lines) | stat: -rw-r--r-- 1,174 bytes parent folder | download | duplicates (2)
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