Rabbit Remote Control 0.0.30
Loading...
Searching...
No Matches
ConnectSSH.h
1#ifndef CCONNECTSSH_H
2#define CCONNECTSSH_H
3
4#include "Connect.h"
5#include "ConnecterSSH.h"
6#include "libssh/callbacks.h"
7#include "libssh/libssh.h"
8
9class CConnectSSH : public CConnect
10{
11 Q_OBJECT
12public:
13 explicit CConnectSSH(CConnecterSSH* pConnecter, QObject *parent = nullptr);
14
15 // CConnect interface
16protected:
17 virtual int SetParameter(void *pPara);
18
19public slots:
20 virtual int Initialize();
21 virtual int OnClean() override;
22 virtual OnInitReturnValue OnInit() override;
23 virtual int OnProcess() override;
24 virtual void slotClipBoardChanged() override;
25 void slotSendData(const char *,int);
26 void slotReceivedData(const QString &text);
27
28private:
29 CConnecterSSH* m_pConnecter;
30 CParameterSSH* m_pPara;
31
32 ssh_session m_pSession;
33 ssh_channel m_pChannel;
34 ssh_event m_pEvent;
35 ssh_connector connector_in, connector_out, connector_err;
36 ssh_pcap_file m_pPcapFile;
37
38 struct ssh_callbacks_struct *m_pCb;
39
40 static int cbAuthCallback(const char *prompt,
41 char *buf,
42 size_t len,
43 int echo,
44 int verify,
45 void *userdata);
46 int GetPassword(const char *prompt,
47 char *buf,
48 size_t len,
49 int echo,
50 int verify);
51 int VerifyKnownhost(ssh_session session);
52 int Authenticate(ssh_session session);
53 void error(ssh_session session);
54};
55
56#endif // CCONNECTSSH_H
Connect interface.
Definition Connect.h:45