-
-
Notifications
You must be signed in to change notification settings - Fork 78
Expand file tree
/
Copy pathPluginLibSSH.cpp
More file actions
83 lines (70 loc) · 1.93 KB
/
PluginLibSSH.cpp
File metadata and controls
83 lines (70 loc) · 1.93 KB
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
// Author: Kang Lin <kl222@126.com>
#include "OperateSSH.h"
#include "PluginLibSSH.h"
#ifdef HAVE_LIBSSH
#include "ChannelSSH.h"
#endif
#include <QLoggingCategory>
static Q_LOGGING_CATEGORY(log, "Plugin.SSH")
CPluginLibSSH::CPluginLibSSH(QObject *parent) : CPlugin(parent)
{
}
CPluginLibSSH::~CPluginLibSSH()
{
qDebug(log) << Q_FUNC_INFO;
}
const QString CPluginLibSSH::Protocol() const
{
return "SSH";
}
const QString CPluginLibSSH::Name() const
{
return "SSH";
}
const QString CPluginLibSSH::DisplayName() const
{
return tr("Secure Shell(SSH)")
#if defined(Q_OS_WIN)
+ tr("(Experimental)")
#endif
;
}
const QString CPluginLibSSH::Description() const
{
return tr("Secure Shell(SSH): is a secure protocol and the most common way of safely administering remote servers. "
"Using a number of encryption technologies, "
"SSH provides a mechanism for establishing a cryptographically secured connection between two parties, "
"authenticating each side to the other, and passing commands and output back and forth."
"You can remotely execute programs, transfer files, "
"use a secure and transparent tunnel, "
"manage public keys and much more ...") + "\n"
+ tr("It uses libssh: https://www.libssh.org .");
}
const QIcon CPluginLibSSH::Icon() const
{
return QIcon::fromTheme("ssh");
}
const CPlugin::TYPE CPluginLibSSH::Type() const
{
return TYPE::Terminal;
}
const QString CPluginLibSSH::Version() const
{
return 0;
}
const QString CPluginLibSSH::Details() const
{
QString szDetails;
szDetails = COperateTerminal::Details();
#ifdef HAVE_LIBSSH
CChannelSSH channel(nullptr, nullptr);
szDetails += channel.GetDetails();
#endif
return szDetails;
}
COperate *CPluginLibSSH::OnCreateOperate(const QString &szId)
{
if(Id() == szId)
return new COperateSSH(this);
return nullptr;
}