CN116980180A - Data transmission method, device and system - Google Patents
Data transmission method, device and system Download PDFInfo
- Publication number
- CN116980180A CN116980180A CN202310731083.0A CN202310731083A CN116980180A CN 116980180 A CN116980180 A CN 116980180A CN 202310731083 A CN202310731083 A CN 202310731083A CN 116980180 A CN116980180 A CN 116980180A
- Authority
- CN
- China
- Prior art keywords
- ssh
- message
- computing device
- control unit
- client
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 86
- 230000005540 biological transmission Effects 0.000 title claims abstract description 64
- 238000004891 communication Methods 0.000 claims description 46
- 230000015654 memory Effects 0.000 claims description 25
- 238000004590 computer program Methods 0.000 claims description 7
- 238000012986 modification Methods 0.000 abstract description 6
- 230000004048 modification Effects 0.000 abstract description 6
- 238000006243 chemical reaction Methods 0.000 description 43
- 238000010586 diagram Methods 0.000 description 9
- 230000008569 process Effects 0.000 description 9
- 206010047289 Ventricular extrasystoles Diseases 0.000 description 8
- 230000006870 function Effects 0.000 description 8
- 238000013515 script Methods 0.000 description 8
- 238000005129 volume perturbation calorimetry Methods 0.000 description 8
- 230000007246 mechanism Effects 0.000 description 4
- 238000012545 processing Methods 0.000 description 4
- 238000012546 transfer Methods 0.000 description 4
- 238000012423 maintenance Methods 0.000 description 3
- 239000007787 solid Substances 0.000 description 3
- 238000013459 approach Methods 0.000 description 2
- 238000012795 verification Methods 0.000 description 2
- 230000006978 adaptation Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000000802 evaporation-induced self-assembly Methods 0.000 description 1
- 238000001914 filtration Methods 0.000 description 1
- 230000000977 initiatory effect Effects 0.000 description 1
- 238000009434 installation Methods 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 238000013508 migration Methods 0.000 description 1
- 230000005012 migration Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/18—Network architectures or network communication protocols for network security using different networks or channels, e.g. using out of band channels
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/16—Implementing security features at a particular protocol layer
- H04L63/166—Implementing security features at a particular protocol layer at the transport layer
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/22—Parsing or analysis of headers
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/30—Definitions, standards or architectural aspects of layered protocol stacks
- H04L69/32—Architecture of open systems interconnection [OSI] 7-layer type protocol stacks, e.g. the interfaces between the data link level and the physical level
- H04L69/322—Intralayer communication protocols among peer entities or protocol data unit [PDU] definitions
- H04L69/326—Intralayer communication protocols among peer entities or protocol data unit [PDU] definitions in the transport layer [OSI layer 4]
Landscapes
- Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Hardware Design (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- Computer And Data Communications (AREA)
Abstract
A data transmission method, device and system. The method comprises the following steps: the server acquires a first SSH message sent by the control unit to the second computing equipment; under the condition that the server side confirms that the first SSH message is the first SSH message sent to the second computing equipment by the control unit, a trusted data channel between the server side and the client side is established; the server receives a second SSH message sent by the control unit to the second computing device through an SSH data channel between the control unit and the server, wherein the second SSH message comprises a control instruction for controlling the second computing device; the server side converts the second SSH message into a first message of a non-SSH protocol, and sends the first message to the client side through a trusted data channel. The method can release the dependence of the SSH tool on man-machine passwords under the condition that the SSH tool does not need to be subjected to invasive modification.
Description
Technical Field
The present application relates to the field of communications technologies, and in particular, to a data transmission method, apparatus, and system.
Background
The Secure Shell (SSH) protocol is a standard protocol for computing devices such as telnet servers. The SSH protocol is an encryption protocol, and by performing encryption transmission verification on a password, a secure transmission environment can be provided for network services in an unsafe network. When there are large batches of servers to be managed, it is often necessary to develop a series of automation scripts or tools based on the SSH protocol, and these automation scripts or tools send SSH messages to the managed servers to implement the automation management of the servers.
An automation script or tool developed based on the SSH protocol needs to log in to the server first to realize the server. While according to the SSH protocol, a password is required to log on to the server. Thus, an automation script or tool, when managing multiple servers, requires a password for each server to log on to the server. The password of the server is often modified periodically for information security. The automatic script or tool can acquire the passwords of each server again, so that the password management cost is high, and the automatic script or tool is complicated to use. One approach is to reconstruct the SSH tool such that the SSH tool does not rely on the man-machine password of the computing device. The reconstruction is an invasive modification, is cumbersome to operate, and requires the source code of the SSH tool, which is not available to some third party SSH tools.
Disclosure of Invention
The embodiment of the application provides a data transmission method, a data transmission device and a data transmission system, which can release the dependence of an SSH tool on man-machine passwords under the condition that the SSH tool does not need to be subjected to invasive modification.
In a first aspect, a data transmission method is provided, applied to a server in a data transmission system, where the data transmission system further includes a client, the server is configured on a first computing device having a control unit, the client is configured on a second computing device, and the control unit is configured to send an SSH message to the second computing device; the method comprises the following steps: the server acquires a first SSH message sent by the control unit to the second computing equipment; under the condition that the server side confirms that the first SSH message is the first SSH message sent to the second computing equipment by the control unit, a trusted data channel between the server side and the client side is established; the server receives a second SSH message sent by the control unit to the second computing device through an SSH data channel between the control unit and the server, wherein the second SSH message comprises a control instruction for controlling the second computing device; the server side converts the second SSH message into a first message of a non-SSH protocol, and sends the first message to the client side through a trusted data channel, wherein the first message comprises a control instruction; the control instructions are for the client to control the second computing device.
The control unit may be a control unit based on an SSH protocol, such as an SSH tool. The second SSH message is an SSH message that is not first sent from the control unit and has a target address of the second computing device.
The established trusted data path between the server and the client may be established through a protocol of a transport layer security protocol (transport layer security, TLS). The trusted data channel may prevent theft and tampering of the transmitted data.
The non-SSH protocol message refers to a non-SSH message, i.e., a message based on a protocol other than the SSH protocol. In one example, the non-SSH protocol messages may be transmission control protocol (transmission control protocol, TCP) messages.
In the method, the server may convert the SSH message into a message of a non-SSH protocol, and send the message to the second computing device. The client on the second computing device may control the second computing device based on the control instructions in the message. Thus, the man-machine password dependence of the control unit based on the SSH protocol when managing the managed devices can be relieved, so that a large number of man-machine passwords of the managed devices do not need to be maintained. Moreover, the method can be realized without carrying out invasive modification (such as reconstruction) on the existing control unit depending on the SSH protocol, and can be compatible with the existing control unit depending on the SSH protocol and the SSH message.
In one possible implementation, the trusted data channel is established with the server confirming that the client is trusted and the client is confident that the server is trusted.
In the implementation mode, under the condition that the server side and the client side confirm that the opposite party can be trusted, a data channel between the server side and the client side is established, and information security between the server side and the client side is guaranteed.
In one possible implementation, the trusted data channel is established through a trusted control channel established with the server at the time of client start-up on the second computing device.
In one possible implementation, the data transmission system further includes an intercept forwarding module configured on the first computing device; the interception and forwarding module is used for intercepting the message sent by the control unit, and forwarding the first SSH message to the server when intercepting the first SSH message, so that the server can acquire the first SSH message.
In the implementation mode, an interception and forwarding module is further arranged, and the SSH message sent by the control unit can be intercepted through the interception and forwarding module, so that the SSH message is forwarded to the server, and protocol conversion is further carried out on the server.
In one possible implementation manner, the intercepting and forwarding the first SSH packet intercepted by the intercepting and forwarding module is a network address of the second computing device, where forwarding the first SSH packet to the server includes: and the interception forwarding module carries the network address of the second computing device in the first SSH message under the condition that the first SSH message is confirmed to be the first SSH message sent to the second computing device by the control unit, and updates the destination address of the first SSH message to the network address of the server so as to forward the updated first SSH message to the server.
In one possible implementation, the method further includes: the server receives a second message sent by the client through the trusted data channel, wherein the second message comprises a result that the client controls the second computing device based on the control instruction; the server side converts the second message into a third SSH message, and sends the third SSH message to the control unit through the SSH data channel, wherein the third SSH message comprises a result that the client side controls the second computing device based on the control instruction.
In the implementation mode, the server side can also convert the message sent by the client side into an SSH message and send the SSH message to the control unit, so that the control unit can process the related message according to the SSH protocol, and the compatibility of the control unit based on the SSH protocol is realized.
In one possible implementation, the results of the client controlling the second computing device based on the control instructions include: the client executes the execution result of the control instruction at the second computing device.
In one possible implementation, the method further includes: when the user corresponding to the second SSH message is inconsistent with the user connected with the client in the earlier stage, executing user switching operation, and receiving a switching result from the client, wherein the switching result is used for indicating that the user connected with the second computing device is switched to the user corresponding to the second SSH message; and sending a switching result to the control unit.
In the implementation manner, when the user corresponding to the second SSH message is inconsistent with the user connected with the client in the early stage, the user connected with the client can be switched, so that the client can execute the command in the message conveniently in the second computing device.
In one possible implementation, the user switching operation includes: the instruction control unit provides a password input instruction; the sending the switching result to the control unit includes sending the switching result to the control unit when the password is received from the control unit.
In this implementation, the password input may be simulated, avoiding modifications to the control unit, to be compatible with existing SSH protocol-based control units.
In one possible implementation, the method further includes: and when the user connected with the second computing equipment changes, indicating the environment variable corresponding to the user after the client configuration changes. Therefore, the environment variable can be timely adjusted, and the command is convenient to execute.
In a second aspect, a data transmission method is provided and applied to a data transmission system, where the data transmission system further includes a server and a client, the server is configured on a first computing device with a control unit, the client is configured on a second computing device, and the control unit is configured to send an SSH message to the second computing device; the method comprises the following steps: the server acquires a first SSH message sent by the control unit to the second computing equipment; under the condition that the server side confirms that the first SSH message is the first SSH message sent to the second computing equipment by the control unit, a trusted data channel between the server side and the client side is established; the server receives a second SSH message sent by the control unit to the second computing device through an SSH data channel between the control unit and the server; the second SSH message includes control instructions for controlling the second computing device; the server side converts the second SSH message into a first message of a non-SSH protocol, and sends the first message to the client side through a trusted data channel, wherein the first message comprises a control instruction; the client controls the second computing device based on the control instructions.
In one possible implementation, the data transmission system further includes an intercept forwarding module configured on the first computing device; the method further comprises the steps of: the interception and forwarding module intercepts the message sent by the control unit, and forwards the first SSH message to the server when intercepting the first SSH message, so that the server obtains the first SSH message.
In one possible implementation, the method further includes: the client sends a second message to the server through the trusted data channel, wherein the second message comprises a result of controlling the second computing device by the client based on the control instruction; the server side is used for converting the second message into a third SSH message, and sending the third SSH message to the control unit through the SSH data channel, wherein the third SSH message comprises a result that the client side controls the second computing device based on the control instruction.
In a third aspect, a data transmission apparatus is provided, configured at a server in a data transmission system, where the data transmission system further includes a client, the server is configured at a first computing device having a control unit, the client is configured at a second computing device, and the control unit is configured to send an SSH packet to the second computing device; the device comprises: the device comprises an acquisition module, an establishment module and a communication module; the acquisition module is used for acquiring a first SSH message sent by the control unit to the second computing equipment; the establishing module is used for establishing a trusted data channel between the server and the client under the condition that the server confirms that the first SSH message is the first SSH message sent to the second computing device by the control unit; the communication module is used for receiving a second SSH message sent to the second computing device by the control unit through an SSH data channel between the control unit and the server, wherein the second SSH message comprises a control instruction for controlling the second computing device; the communication module is also used for converting the second SSH message into a first message of a non-SSH protocol, and sending the first message to the client through a trusted data channel, wherein the first message comprises a control instruction; the control instructions are for the client to control the second computing device.
In one possible implementation, the communication module is further configured to receive, through the trusted data channel, a second message sent by the client, where the second message includes a result of the client controlling the second computing device based on the control instruction; the communication module is further configured to convert the second message into a third SSH message, and send the third SSH message to the control unit through the SSH data channel, where the third SSH message includes a result that the client controls the second computing device based on the control instruction.
In one possible implementation, the apparatus further includes: a switching module; the switching module is used for executing user switching operation when the user corresponding to the second SSH message is inconsistent with the user connected with the client in the earlier stage, and receiving a switching result from the client, wherein the switching result is used for indicating that the user connected with the second computing equipment is switched to the user corresponding to the second SSH message; the communication module is also used for sending a switching result to the control unit.
In one possible implementation, the communication module is further configured to instruct, when a user connected to the second computing device changes, an environment variable corresponding to the user after the client configuration changes.
A fourth aspect provides a data transmission system, which is characterized by comprising a server and a client, wherein the server is configured on a first computing device with a control unit, the client is configured on a second computing device, and the control unit is used for sending an SSH message to the second computing device; the server side is used for acquiring a first SSH message sent by the control unit to the second computing equipment; the method comprises the steps that a trusted data channel between a server and a client is established under the condition that the server confirms that a first SSH message is a first SSH message sent to second computing equipment by a control unit; the server side is used for receiving a second SSH message sent to the second computing device by the control unit through an SSH data channel between the control unit and the server side, wherein the second SSH message comprises a control instruction for controlling the second computing device; the server side converts the second SSH message into a first message of a non-SSH protocol, and sends the first message to the client side through a trusted data channel, wherein the first message comprises a control instruction; the client is to control the second computing device based on the control instructions.
In a fifth aspect, a cluster of computing devices is provided, comprising at least one computing device, each computing device comprising a processor and a memory; the processor of the at least one computing device is configured to execute instructions stored in the memory of the at least one computing device to cause the cluster of computing devices to perform the method provided in the first aspect.
In a sixth aspect, there is provided a computer readable storage medium comprising computer program instructions which, when executed by a cluster of computing devices, perform the method provided by the first aspect.
In a seventh aspect, there is provided a computer program product comprising instructions which, when executed by a cluster of computer devices, cause the cluster of computer devices to perform the method provided by the first aspect.
The advantages of the second to seventh aspects are described above with reference to the first aspect, and are not described here.
Drawings
FIG. 1 is a schematic diagram of a system architecture according to an embodiment of the present application;
fig. 2 is a flowchart of a data transmission method according to an embodiment of the present application;
FIG. 3 is a schematic diagram of trusted verification between a managed device and a management device according to an embodiment of the present application;
Fig. 4 is a schematic diagram of a data transmission method according to an embodiment of the present application;
fig. 5 is a schematic diagram of an operation performed by an intercept forwarding module according to an embodiment of the present application;
FIG. 6 is a schematic diagram illustrating operations performed by a protocol conversion module according to an embodiment of the present application;
fig. 7 is a flowchart of a data transmission method according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of a data transmission device according to an embodiment of the present application;
FIG. 9 is a schematic diagram of a computing device according to an embodiment of the present application;
FIG. 10 is a schematic diagram of a computing device cluster according to an embodiment of the present application;
fig. 11 is a schematic structural diagram of a computing device cluster according to an embodiment of the present application.
Detailed Description
The technical scheme of the application is further described in detail through the drawings and the embodiments. Wherein, in embodiments of the present application, "a plurality" means two or more.
An automation script or tool developed by the SSH protocol for managing multiple computing devices may be referred to simply as an SSH tool. The SSH tool may establish and manage SSH connection sessions with managed computing devices through a built-in implemented SSH protocol. The SSH tool automatically performs tasks on the managed computing device based on command lines or scripts, such as creating and managing user accounts, transmitting files, executing commands, etc., on the managed computing device through SSH connection sessions with the managed computing device.
In order to secure information, passwords for logging into computing devices such as servers often need to be modified. And the password may have a validity period, if the password expires, a new password needs to be set. All the above results in that the SSH tool continuously updates the man-machine passwords of each computing device in the use process, and the management process of the computing device is complicated. While the reconstruction of SSH tools is cumbersome and requires source code, resulting in large implementation difficulties.
The embodiment of the application provides a data transmission method, which can release the dependence of an SSH tool on the man-machine password of computing equipment under the condition that the SSH tool is not required to be reconstructed, so that the SSH tool can realize the management of the computing equipment without the man-machine password of the computing equipment.
Next, a data transmission method provided by the embodiment of the present application is described.
Fig. 1 illustrates a system architecture 100, and the system architecture 100 may be used to implement a data transmission method according to an embodiment of the present application. As shown in fig. 1, the system architecture 100 includes a management device 100 and a plurality of managed devices, such as a managed device 200A, a managed device 200B. The management apparatus 100 is also referred to as a control center, and is used for managing a managed apparatus, for example, viewing a directory file of the managed apparatus, instructing the managed apparatus to execute a command, instructing the managed apparatus to receive a file or transmitting a control instruction of the file, and the like. The managed device is also called service device, and is used for running service program and executing related service. The managed device receives management of the management device to perform the related task.
In some embodiments, in the system architecture 100, there is one management device 100, and a plurality of managed devices.
Where the management device and the managed device are not particularly distinguished, they may be simply referred to as computing devices.
In some embodiments, the computing device may be implemented in hardware, e.g., the computing device may be a server. In some embodiments, the computing device may be implemented in software, e.g., the computing device may be a Virtual Machine (VM), a container, or the like.
As shown in fig. 1, the management device 100 is configured with a server 110, a control unit 120, and an intercept forwarding module 130, and the managed device is configured with a client 210. The control unit 120 may be an SSH tool, and is configured to manage the managed device through an SSH message. The server 110, the client 210, and the data transmission system where the interception forwarding module 130 is located, where the interception forwarding module 130 is configured to intercept an SSH packet sent by the control unit 120 to the managed device 200, and forward the intercepted SSH packet to the server 110. The server 110 is configured to convert the SSH message into a message of a non-SSH protocol, and send the message to the client 210. The client 210 is configured to perform related operations on the message, such as managing or controlling the managed device.
Wherein, the non-SSH protocol message is a data message generated and transmitted based on a communication protocol (such as TCP protocol) other than the SSH protocol. The non-SSH protocol message refers to a message which can be received and analyzed by the managed device without logging in the managed device through a man-machine password, as opposed to the SSH message which is based on the SSH protocol.
Wherein the control unit 120 on the management device 100 is the only entry for sending SSH messages to the managed device. That is, only the control unit 120 disposed at the management apparatus 100 can transmit an SSH message whose destination address (destination) is the managed apparatus. The SSH message is a data message generated and transmitted based on an SSH protocol. The SSH message may carry control instructions for managing the managed device, for example, control instructions for viewing a directory file of the managed device, control instructions for instructing the managed device to receive a file or send a file, and the like.
In some embodiments, as shown in FIG. 1, the management device 100 is also configured with a rights management module 140. The rights management module 140 is used to manage or restrict the user who sends SSH messages to the managed device using the management device 100. The rights management module 140 provides a user rights authentication mechanism for the management device 100, and only authenticated users can send SSH messages to the managed device through the control unit 120 on the management device 100.
In some embodiments, the user rights authentication mechanism may be an account, password authentication mechanism, that is, authentication may only be possible if the user enters the correct account, and a password that matches the account. In some embodiments, the rights management module 140 may be one or more processes or threads (threads) configured on the management device 100.
As shown in fig. 1, the server 110 includes a protocol conversion module 111 and a channel management module 112. The protocol conversion module 111 is configured to convert an SSH packet from the control unit 120 into a non-SSH protocol packet.
In some embodiments, the server 110 may be a process configured on the management device 100, and the protocol conversion module 111 and the channel management module 112 may be different threads in the process, respectively.
In some embodiments, the intercept forwarding module 130 may be implemented based on an extended berkeley packet filter (extended berkeley packet filter, eBPF). In one example, the intercept forwarding module 130 may be implemented based on bare socket (socket) programming. In one example, intercept forwarding module 130 may be implemented based on a Linux kernel module approach. Etc., and are not listed here.
In some embodiments, intercept forwarding module 130 may be one or more processes or threads configured on management device 100.
The channel management module 112 is used to establish a trusted data channel between the server 110 and the client 210 of the managed device. The trusted data channel is established through a trusted control channel established between the client 210 of the managed device and the server 110 at startup. In addition, an SSH channel is provided between the server 110 and the control unit 120. The SSH channel is a data channel which is established according to an SSH protocol and is used for transmitting SSH messages.
The channel management module 112 may receive a message of a non-SSH protocol from the protocol conversion module 111 and transmit the message to the managed device through a trusted data channel.
The channel management module 112 may also receive messages of non-SSH protocols sent by the managed devices over the trusted data channel. The channel management module 112 sends the message received from the non-SSH protocol to the protocol conversion module 111. The protocol conversion module 111 may convert a message of a non-SSH protocol into an SSH message, and send the converted SSH message to the control unit 120. Thereby, information interaction between the control unit 120 and the managed device can be completed, and management of the managed device by the control unit 120 can be realized.
The client 210 on the managed device is configured to receive the message from the management device 100 in the non-SSH protocol through the trusted data channel, and parse the message. If the message carries a control instruction, the client 210 may control the managed device based on the control instruction, for example, run the control instruction on the managed device, so as to implement an operation or function corresponding to the control instruction, for example, view a control instruction of a directory file, receive a file, send a file, or the like.
In some embodiments, client 210 may be one or more processes or threads configured on a managed device.
When the client 210 runs on the managed device, the client 210 runs with the highest operation authority by default, that is, the client 210 or the managed device is logged in by the user with the highest authority. Specifically, the managed device may be operated by users of different operation authorities, some (e.g., root users) users having high operation authorities and some users (e.g., general users) having low operation authorities. Wherein the operating range of low operating rights is a subset of the operating range of high operating rights. That is, the user of the high operation authority can operate within the operation range of the low operation authority.
The above examples introduce a system architecture 100 provided by embodiments of the present application. Next, a flow of the data transmission method according to the embodiment of the present application is described with reference to the system architecture 100.
Referring to fig. 2, taking an example in which the management device 100 manages the managed device 200A, the control unit 120 located on the management device 100 may perform step 301 to send the SSH message A1 to the managed device 200A. I.e. the control unit 120 sends an SSH message A1 destined for the managed device 200A.
The server 110 obtains the SSH message A1. In some embodiments, the management device 100 is configured with an intercept forwarding module 130. The server 110 may obtain the SSH packet A1 through the intercept forwarding module 130. Specifically, the interception forwarding module 130 may intercept the SSH message sent by the control unit 110. When the intercepted SSH message A1, the interception forwarding module 130 may determine whether the SSH message A1 is the first SSH message sent by the control unit 120 to the managed device 200A. For example, it may be determined whether the SSH message A1 is the first SSH message sent by the control unit 120 to the managed device 200A by checking whether the identifier of the SSH message A1 is ssh_msg_kexinit. If the identifier of the SSH message A1 is ssh_msg_kexinit, it may be determined that the SSH message A1 is the first SSH message sent by the control unit 120 to the managed device 200A.
If the SSH message A1 is the first SSH message sent by the control unit 120 to the managed device 200A, in step 302, the SSH message A1 is confirmed to be the first SSH message sent to the managed device 200A, and then, in step 303, the SSH message A1 may be sent to the communication address monitored locally by the server 110 at the management device 110 as an SSH connection request for the managed device 200A. The communication address may be an internet protocol (internet protocol, I P) address, or a You Nake socket (unix socket), for example. After the SSH message A1 is sent to the communication address, the server 110 may obtain the SSH message A1. Illustratively, the communication address has a communication address that is listened to by the protocol conversion module 111 in the server 110, which may be referred to as the protocol conversion module 111.
The protocol conversion module 111, upon receiving the SSH connection request for the managed device 200A, can transmit a channel establishment request for the managed device 200A to the channel management module 112 through step 304. The channel setup request for the managed device 200A is for requesting the channel management module 112 to establish a data channel between the server 110 and the managed device 200A.
The channel management module 112, upon receiving a channel establishment request for the managed device 200A, may negotiate with the client 210 on the managed device 200A through a trusted control channel established with the server 110 at the time of startup of the client 210 on the managed device 200A to establish a trusted data channel. In the negotiation process, as shown in fig. 2, the channel management module 112 may send a channel establishment request to the client 210 on the managed device 200A through step 305. After receiving the channel establishment request, the client 210 may send a channel establishment response to the channel management module 112 through step 306 to complete establishment of the trusted data channel.
In some embodiments, to prevent man-in-the-middle attacks, the channel management module 112 may send a channel setup application to the client 210 on the managed device 200A in case the managed device 200A is confirmed to be trusted, to ensure that the data channel between the client 210 of the managed device 200A and the channel management module 112 is trusted. The client 210 may send a channel setup correspondence to the channel management module 112 on the management device 100 in case that the management device 100 is confirmed to be trusted, to ensure that the data channel between the client 210 of the managed device 200A and the channel management module 112 is trusted.
In some embodiments, referring to FIG. 3, a user, such as an operation and maintenance person, may configure rights management module 140 at management device 100. Then, step 401a may be performed to send the pre-generated digital certificate to the managed device. Specifically, the digital certificate may be acquired in advance by a certificate authority (certificate authority, CA). When the managed device installs the client 210, the digital certificate may be issued to the managed device along with an installation package for the client 210.
Alternatively, step 401b may be performed to configure a communication whitelist at the server 110. The devices in the communication whitelist are trusted devices.
After the client 210 is installed on the managed device 200A, the client 210 on the managed device 200A may be started in step 402.
Before the trusted data channel is established between the client 210 on the management device 200A and the channel management module 112, the channel management module 112 may verify whether the managed device 200A is trusted through step 403. Specifically, the following is described.
Wherein, when step 401a is performed, the channel management module 112 may perform step 305 to send a channel setup application to the client 210 on the managed device 200A after verifying that the digital certificate is legal and verifying through a secure transport layer protocol (transport layer security, TLS) authentication mechanism before sending the channel setup application to the client 210 on the managed device 200A.
When step 401b is performed, the channel management module 112 may determine whether the managed device 200A is in the communication whitelist before sending the channel establishment request to the client 210 on the managed device 200A, and if the managed device 200A is in the communication whitelist, step 305 may be performed to send the channel establishment request to the client 210 on the managed device 200A.
In some embodiments, the digital certificate may be obtained in advance by a certificate authority. The client 210 may verify whether the digital certificate is valid before performing step 306, and if so, perform step 306.
In addition, after step 401a or step 401b, the user may install the intercept forwarding module 130 or the like at the management apparatus 100. The user may then log on to the rights management module 140 to manage the managed devices through the control unit 120.
In some embodiments, the trusted data channel may also be implemented by the client 210 listening to ports, and the server 110 connecting as needed.
Returning to fig. 2, in some embodiments, after the channel management module 112 has successfully established a trusted data channel between the channel management module 112 and the managed device 200A, the channel management module 112 may send channel establishment success information to the protocol conversion module 111 through step 307. The channel setup success information indicates that a trusted data channel between the channel management module 112 and the managed device 200A has been established.
In some embodiments, the channel management module 112 may send channel setup failure information to the protocol conversion module 111 after a trusted data channel setup failure between the channel management module 112 and the managed device 200A. The protocol conversion module 111 may transmit the channel setup failure information to the control unit 120. The control unit 120, upon receiving the channel setup failure information, may provide a hint information indicating that the trusted data channel setup between the channel management module 112 and the managed device 200A failed.
In step 308, the control unit 120 and the protocol conversion module 111 may negotiate to establish an SSH channel based on the SSH protocol.
The control unit 120 may perform step 309, sending an SSH message A2 destined for the managed device 200A via the SSH channel. Wherein, the SSH message A2 and the SSH message A1 are not the same message, and the SSH message A2 is a message that is sent only after the SSH message A1 is sent.
After receiving the SSH message A2, the protocol conversion module 111 may perform protocol conversion on the SSH message A2 in step 310 to convert the SSH message A2 into a message B1 with a non-SSH protocol.
In some embodiments, the protocol conversion module 111 may obtain the destination address of the SSH packet A2, that is, the address of the managed device 200, by parsing the SSH packet A2, and obtain the control instruction carried by the SSH packet A2. The protocol conversion module 111 may encapsulate the packet based on a protocol other than the SSH protocol (for example, TCP protocol) with the address of the managed device 200 as a destination address and the control instruction as a data payload (payload), to obtain a packet B1.
In some embodiments, the protocol conversion module 111 may classify the received SSH message. The SSH messages are divided into command class messages and file transmission class messages. The data load of the command class message is a control instruction, and the data load of the file transmission class message is a transmitted file. For command-like messages, to achieve a privacy-free user switch, a corresponding adaptation of the part of the user switch may be required. This is because the clients on the managed devices in this scheme run with root user rights by default. If the user initiating the connection is a normal user (i.e. not the root user), then the command execution needs to be switched.
In one example, it may be set that the regular matching of the SSH message is to switch to the root user, and the client 210 on the pre-connection managed device 200A is a normal user, then the user switching operation performed by the protocol conversion module 111 is an exit (exit) command, and the send () function and the recv () function required for inputting the password in the next round are vacated, so as to obtain the echo string corresponding to the user switching to the root user. For example, SSH message: sudo su-root, then the resulting echo string for return to the control unit 120 is: sudo su-root\n\r [ sudo ] password for root.
In one example, it may be set that the regular match of the SSH message is to switch to a non-root user, and the user connected to the client 210 on the managed device 200A in advance is the root user switched from the normal user, and the echo string returned to the control unit 120 is: su-s/bin/bash is the previous normal user.
In some embodiments, if the user corresponding to the SSH message received by the protocol conversion module 111 is inconsistent with the user connected to the client 210 in advance, the protocol conversion module 111 may perform a user switching operation and receive a switching result from the managed device 200A. The switching result is used to indicate that the user of the pre-connection managed device 200A has switched to the user corresponding to the message. The protocol conversion module 111 may transmit the switching result to the control unit 120 to inform the control unit 120 that the user managing the managed device 200A has switched to the user corresponding to the message.
In one example of this embodiment, the user switching operation further includes: the instruction control unit 120 provides a password input instruction, and when a password is received from the control unit 120, the above-described switching result may be transmitted to the control unit 120.
In some embodiments, if the user corresponding to the SSH packet received by the protocol conversion module 111 is inconsistent with the user connected to the client 210 in advance, the protocol conversion module 111 instructs the client 210 on the managed device 200A to configure the environment variable corresponding to the user corresponding to the SSH packet. The environment variables may include path environment variables, global variables, etc. In one example, the user connected to the client 210 in advance is set as su-socket, and if the user corresponding to the SSH message received by the protocol conversion module 111 is socket, a source/etc/profile needs to be added before the command of the SSH message; cd to n. If the user corresponding to the SSH message received by the protocol conversion module 111 is a sopuser, no additional processing is needed.
After the received SSH message is processed by the protocol conversion module 111, the converted non-SSH message may be sent to the channel management module 112. Taking the message B1 converted from the SSH message A2 as an example, the protocol conversion module 111 may send the message B1 to the channel management module 112 through step 311.
Upon receiving the message B1, the channel management module 112 may send the message B1 to the managed device 200A through the trusted data channel between the server 110 and the managed device 200A in step 312. The client 210 on the managed device 200A may receive the packet B1, parse the packet B1, extract a control instruction in the packet B1, and then may control the managed device 200A based on the control instruction in step 313. Illustratively, based on the control instruction, the client 210 controlling the managed device 200A may instruct the managed device 200A to execute the control instruction for the client 210, or the client 210 executes the control instruction at the managed device 200A.
The client 210 may encapsulate the result of the client 210 controlling the managed device 200A based on the control instruction into a packet B2 based on a communication protocol other than the SSH protocol (e.g., TCP). Illustratively, the result of the client 210 controlling the managed device 200A based on the control instruction is specifically an execution result of the control instruction by the client 210 at the managed device 200A.
The client 210 may send the message B2 to the server 110 in step 314 via a trusted data path between the server 110 and the managed device 200A. The channel management module 112 of the server 110 receives the message B2, and sends the message B2 to the protocol conversion module 111 in step 315.
After receiving the message B2, the protocol conversion module 111 may execute step 316 to perform protocol conversion on the message B2 to obtain an SSH message A3. The protocol conversion module 111 may parse the packet B2 to obtain a data load of the packet B2, that is, a result that the client 210 controls the managed device 200A based on the control instruction. Then, the protocol conversion module 111 uses the data load as the data load of the SSH message according to the SSH protocol, to obtain the SSH message A3.
The protocol conversion module 111 may send an SSH message A3 to the control unit 120 via the SSH channel between the protocol conversion module 111 and the control unit 120 in step 317.
The data transmission method provided by the embodiment of the application can convert the SSH message into the message of the non-SSH protocol, so that the management equipment does not depend on a password under the condition that the control unit based on the SSH protocol is not required to be reconstructed, and the management of the managed equipment is realized.
The above examples introduce the general flow of the data transmission method provided by the embodiment of the present application. Next, with reference to fig. 4, one possible implementation of the data transmission method provided by the embodiment of the present application is described.
Referring to fig. 4, the control unit 120 may send a message, such as an SSH message A1, with a destination address being an address of the managed device 200A and a source address being an address of the control unit 120. The intercept forwarding module 130 intercepts the SSH message A1, and can modify the destination address of the SSH message A1 into the address of the server 110 (i.e. the address monitored by the server 110), and load the address of the managed device 200A in the data load of the message. The SSH message A1 whose destination address is repaired as the address of the server 110 is forwarded to the server 110. The server 110 may establish a trusted data channel between the server 110 and the managed device 200A based on the address in the data payload of the SSH message A1, i.e., the address of the managed device 200A.
After the trusted data channel between the server 110 and the managed device 200A is established successfully, the server 110 may send an SSH message with a source address being the address of the managed device 200A, a destination address being the address of the control unit 111, and a data load being a channel establishment success message to the control unit 120 through the interception and forwarding module 130.
Next, operations performed by the intercept forwarding module 130 in the data transmission method provided in the embodiment of the present application will be described by way of example.
Referring to fig. 5, when the intercept forwarding module 130 intercepts a message in step 501, a message C1 is obtained. Step 502 may then be performed to determine whether message C1 is a message from control unit 111.
The intercepting and forwarding module 130 may be implemented in various ways to intercept the message, for example, in the way of eBPF, to convert the SSH message into the TCP message, which is specifically as follows.
(1) filter and forward ssh: the eBPF program intercepts the message conforming to the filtering rule on the one hand, and forwards the modified message to the protocol conversion module 111 or the control unit 120 on the other hand;
(2) load_ebpf: the eBF program is loaded, so that binding and calling of the eBPF program and mounting points are realized, the types of the mounting points are many, the mounting points can be network cards which send SSH requests, and the network cards are similar to network card # xdp object # program file names of sudo ip link set dev # SSH requests;
there are many ways to compile a program, here exemplified by clang-O2-target bpf-c# program file name. C# # program file name. O#.
If the message C1 is a message from the control unit 111, the intercept forwarding module 130 executes step 503 to modify the destination address of the message C1 to the address of the server 110 (e.g. the address monitored by the server 110), and modify the destination port to the port of the server 110. And, in step 504, it is determined whether the message C1 is the first message to be sent to the managed device.
If the message C1 is the first message sent to the managed device, in step 505, the original destination address of the message C1 (i.e. the address of the managed device sent) is added to the data load of the message C1, for example, a certain reserved field in the header of the message C1 is put into the data load of the message C1. Then, the message C1 is forwarded to the server 110, via step 506.
If the message C1 is not the first message sent to the managed device, the message C1 is forwarded to the server 110 directly through step 506.
If the determination result in step 502 indicates that the message C1 is not from the control unit 111, step 507 is executed to determine whether the message C1 is from the server 110.
If the determination result in step 507 indicates that the message C1 is from the server 110, step 508 may be executed to modify the destination address of the message C1 to the address of the control unit 120 (i.e. the address monitored by the control unit 120), and modify the destination port to the port of the control unit 120. Message C1 is then forwarded to the control unit 120, via step 509.
If the determination result in step 507 indicates that the message C1 is not from the server 110, step 510 is executed to forward the message C1 normally. I.e. forwarding according to the destination address of the message C1.
The above example describes the workflow of intercept forwarding module 130. Next, the operations performed by the protocol conversion module 111 in the data transmission method provided in the embodiment of the present application will be described by way of example.
Referring to fig. 6, in step 601, the protocol conversion module 111 receives the message C2. Then, the protocol conversion module 111 determines whether the message C2 is from the intercept forwarding module 130 in step 602.
If the determination result in step 602 indicates that the message C2 is from the intercept forwarding module 130, step 603 is executed to parse the message C2, and step 604 is executed to determine whether the message C2 is the first message sent by the control unit 120 to the managed device.
If the judgment result in step 604 indicates that the message C2 is the first message sent by the control unit 120 to the managed device, the message C2 is parsed, and the address D1 is obtained from the data load of the message C2. The address D1 is the address of the managed device. Then, step 606 is performed to send a channel setup request to the channel management module 112 based on the address D1, and step 607 is performed to send a message to the channel management module 112.
If the determination result in step 604 indicates that the message C2 is not the first message sent by the control unit 120 to the managed device, step 608 is executed to determine whether the message C2 is a command type message.
If the determination result in step 608 indicates that the message C2 is a command type message, in step 609, a user switching operation is performed, the client 210 is instructed to configure an environment variable, and so on.
If the determination result in step 608 indicates that the message C2 is not a command type message, in step 610, it is determined whether the message C2 is a file transfer type message.
If the determination result in step 610 indicates that the message C2 is a file transfer type message, step 607 is executed to send the message to the channel management module 112.
The message sent to the channel management module 112 in step 607 is a non-SSH protocol message obtained by performing protocol conversion on the SSH message.
If the determination result in step 610 indicates that the message C2 is not a file transfer type message, step 611 is executed to report an error.
If the determination result in step 602 indicates that the message C2 is not from the intercept forwarding module 130, step 612 is executed to determine whether the message C2 is a channel creation success message.
If the judgment result in step 612 indicates that the message C2 is a channel establishment success message, step 613 is executed to generate an SSH channel establishment result according to the channel establishment success message. Then, the SSH channel setup result is transmitted to the control unit 120 to complete the setup of the SSH channel between the control unit 120 and the protocol conversion module 111, through step 614.
If the determination result in step 612 indicates that the message C2 is not a channel establishment success message, step 615 is executed to forward the message normally. I.e. forwarding according to the destination address of the message C1.
By combining the above, in the data transmission method provided by the embodiment of the application, the dependence of the man-machine passwords of the control unit which depends on the SSH protocol on managing the managed equipment can be relieved, so that maintenance of a large number of man-machine passwords of the managed equipment is not required. In addition, the data transmission method provided by the embodiment of the application can be compatible with the existing control unit and SSH message which depend on the SSH protocol without reconstructing the existing control unit which depends on the SSH protocol. In addition, in the data transmission mode provided by the embodiment of the application, only the control unit on the management equipment is allowed to be capable of being managed by the equipment based on the SSH protocol range, so that the safety of equipment management is ensured.
Based on the above-described scheme, the embodiment of the application provides a data transmission method. The method can be applied to a server side in a data transmission system, the data transmission system further comprises a client side, the server side is configured on a first computing device with a control unit, the client side is configured on a second computing device, and the control unit is used for sending an SSH message to the second computing device. As shown in fig. 7, the method comprises the steps of:
In step 701, the server obtains a first SSH packet sent by the control unit to the second computing device. Reference is made in particular to the implementation of step 301 in fig. 2 described above.
Step 702, when the server side confirms that the first SSH message is a first SSH message sent by the control unit to the second computing device, a trusted data channel between the server side and the client side is established. Reference is made in particular to the implementation of the description above of steps 302-307 in fig. 2.
In step 703, the server receives, through an SSH data channel between the control unit and the server, a second SSH packet sent by the control unit to the second computing device, where the second SSH packet includes a control instruction for controlling the second computing device. Reference is made in particular to the implementation described above for step 309 in fig. 2.
Step 704, the server converts the second SSH message into a first message of the non-SSH protocol, and sends the first message to the client through the trusted data channel, where the first message includes the control instruction; the control instructions are for the client to control the second computing device. Reference is made in particular to the implementation described above for steps 310-313 in fig. 2.
In some embodiments, the trusted data channel is established through a trusted control channel between the client on the second computing device at startup and the server.
In some embodiments, the trusted data channel is established based on the unencrypted protocol if the client confirms that the client is trusted and the client is confident that the server is trusted.
In some embodiments, the data transmission system further comprises an intercept forwarding module configured on the first computing device; the interception and forwarding module is used for intercepting the message sent by the control unit, and forwarding the first SSH message to the server side when intercepting the first SSH message, so that the server side obtains the first SSH message.
In an example of this embodiment, the intercepting forwarding module may intercept the first SSH packet with a destination address of the second computing device, and forwarding the first SSH packet to the server includes: and the interception forwarding module carries the network address of the second computing device in the first SSH message under the condition that the first SSH message is confirmed to be the first SSH message sent to the second computing device by the control unit, and updates the destination address of the first SSH message to the network address of the server so as to forward the updated first SSH message to the server.
In some embodiments, the method further comprises: the server receives a second message sent by the client through the trusted data channel, wherein the second message comprises a result that the client controls the second computing device based on the control instruction; the server side converts the second message into a third SSH message, and sends the third SSH message to the control unit through the SSH data channel, wherein the third SSH message comprises a result that the client side controls the second computing device based on the control instruction.
In one example of this embodiment, the result of the client controlling the second computing device based on the control instructions includes: and the client executes the execution result of the control instruction at the second computing device.
In some embodiments, the method further comprises: when the user corresponding to the second SSH message is inconsistent with the user connected with the client in the early stage, executing user switching operation, and receiving a switching result from the client, wherein the switching result is used for indicating that the user connected with the second computing device is switched to the user corresponding to the second SSH message; and sending the switching result to the control unit.
In one example of this embodiment, the user switching operation includes: instruct the control unit to provide a password input instruction; the sending the switching result to the control unit includes sending the switching result to the control unit when a password is received from the control unit.
In some embodiments, the method further comprises: and when the user connected with the second computing equipment changes, indicating the client to configure the environment variable corresponding to the changed user.
In the data transmission method provided by the embodiment of the application, the dependence of the man-machine passwords of the control unit which depends on the SSH protocol on managing the managed equipment can be relieved, so that the maintenance of a large number of man-machine passwords of the managed equipment is not required. In addition, the data transmission method provided by the embodiment of the application can be compatible with the existing control unit and SSH message which depend on the SSH protocol without reconstructing the existing control unit which depends on the SSH protocol. In addition, in the data transmission mode provided by the embodiment of the application, only the control unit on the management equipment is allowed to be capable of being managed by the equipment based on the SSH protocol range, so that the safety of equipment management is ensured.
The embodiment of the application also provides a data transmission device 800. The apparatus 800 may be configured on a server in a data transmission system, where the data transmission system further includes a client, where the server is configured on a first computing device having a control unit, and the client is configured on a second computing device, and the control unit is configured to send an SSH message to the second computing device. Referring to fig. 8, an apparatus 800 includes: acquisition module 810, setup module 820, communication module 830.
The obtaining module 810 is configured to obtain a first SSH packet sent by the control unit to the second computing device;
the establishing module 820 is configured to establish a trusted data channel between the server and the client when the server confirms that the first SSH message is a first SSH message sent by the control unit to the second computing device;
the communication module 830 is configured to receive, through an SSH data channel between the control unit and the server, a second SSH packet sent by the control unit to the second computing device, where the second SSH packet includes a control instruction for controlling the second computing device;
The communication module 830 is further configured to convert the second SSH packet into a first packet of the non-SSH protocol, and send the first packet to the client through the trusted data channel, where the first packet includes the control instruction; the control instructions are for the client to control the second computing device.
The acquiring module 810, the establishing module 820 and the communication module 830 may be implemented by software, or may be implemented by hardware. Illustratively, an implementation of the acquisition module 810 is described next as an example of the acquisition module 810. Similarly, the implementation of the setup module 820 and the communication module 830 may refer to the implementation of the acquisition module 810.
Module as an example of a software functional unit, the acquisition module 810 may include code running on a computing instance. The computing instance may include at least one of a physical host (computing device), a virtual machine, and a container, among others. Further, the above-described computing examples may be one or more. For example, the acquisition module 810 may include code running on multiple hosts/virtual machines/containers. It should be noted that, multiple hosts/virtual machines/containers for running the code may be distributed in the same region (region), or may be distributed in different regions. Further, multiple hosts/virtual machines/containers for running the code may be distributed in the same availability zone (availability zone, AZ) or may be distributed in different AZs, each AZ comprising a data center or multiple geographically close data centers. Wherein typically a region may comprise a plurality of AZs.
Also, multiple hosts/virtual machines/containers for running the code may be distributed in the same virtual private cloud (virtual private cloud, VPC) or in multiple VPCs. In general, one VPC is disposed in one region, and a communication gateway is disposed in each VPC for implementing inter-connection between VPCs in the same region and between VPCs in different regions.
Module as an example of a hardware functional unit, the acquisition module 810 may include at least one computing device, such as a server or the like. Alternatively, the acquisition module 810 may be a device implemented using an application-specific integrated circuit (ASIC) or a programmable logic device (programmablel ogic device, PLD), etc. The PLD may be implemented as a complex program logic device (complex programmable logical device, CPLD), a field-programmable gate array (FPGA), a general-purpose array logic (generic arraylogic, GAL), or any combination thereof.
The multiple computing devices included in the acquisition module 810 may be distributed in the same region or may be distributed in different regions. The plurality of computing devices included in the acquisition module 810 may be distributed among the same AZ or may be distributed among different AZs. Likewise, multiple computing devices included in the acquisition module 810 may be distributed in the same VPC or may be distributed among multiple VPCs. Wherein the plurality of computing devices may be any combination of computing devices such as servers, ASIC, PLD, CPLD, FPGA, and GAL.
It should be noted that, in other embodiments, the obtaining module 810 may be configured to perform any step in the method shown in fig. 7, the establishing module 820 may be configured to perform any step in the method shown in fig. 7, and the communication module 830 may be configured to perform any step in the method shown in fig. 7. The steps that the acquisition module 810, the establishment module 820 and the communication module 830 are responsible for implementing may be specified as needed, and the different steps in the method shown in fig. 7 are implemented by the acquisition module 810, the establishment module 820 and the communication module 830 respectively to implement all the functions of the apparatus 800.
The present application also provides a computing device 900. As shown in fig. 9, the computing device 900 includes: bus 902, processor 904, memory 906, and communication interface 908. Communication between the processor 904, the memory 906, and the communication interface 908 is via the bus 902. Computing device 900 may be a server or a terminal device. It should be understood that the present application is not limited to the number of processors, memories in computing device 900.
Bus 902 may be a Peripheral Component Interconnect (PCI) bus, an extended industry standard architecture (extendedindustry standard architecture, EISA) bus, or the like. The buses may be divided into address buses, data buses, control buses, etc. For ease of illustration, only one line is shown in fig. 9, but not only one bus or one type of bus. Bus 902 may include a path to transfer information between various components of computing device 900 (e.g., memory 906, processor 904, communication interface 908).
The processor 904 may include any one or more of a central processing unit (central processing unit, CPU), a graphics processor (graphics processing unit, GPU), a Microprocessor (MP), or a digital signal processor (digital signal processor, DSP).
The memory 906 may include volatile memory (RAM), such as random access memory (random access memory). The memory 906 may also include non-volatile memory (non-volatile memory), such as read-only memory (ROM), flash memory, mechanical hard disk (HDD) or solid state disk (solid state drive, SSD).
The memory 906 has stored therein executable program code that the processor 904 executes to implement the functions of the aforementioned acquisition module 810, setup module 820, and communication module 830, respectively, to implement the method illustrated in fig. 7. That is, the memory 906 has instructions stored thereon for performing the method of FIG. 7.
Communication interface 908 enables communication between computing device 900 and other devices or communication networks using a transceiver module such as, but not limited to, a network interface card, transceiver, etc.
The embodiment of the application also provides a computing device cluster. The cluster of computing devices includes at least one computing device. The computing device may be a server, such as a central server, an edge server, or a local server in a local data center. In some embodiments, the computing device may also be a terminal device such as a desktop, notebook, or smart phone.
As shown in fig. 10, the cluster of computing devices includes at least one computing device 900. The same instructions for performing the method shown in fig. 7 may be stored in memory 906 in one or more computing devices 900 in the computing device cluster.
In some possible implementations, portions of the instructions for performing the method shown in fig. 7 may also be stored in the memory 906 of one or more computing devices 900 in the computing device cluster, respectively. In other words, a combination of one or more computing devices 900 may collectively execute instructions for performing the method shown in FIG. 7.
It should be noted that, the memory 906 in different computing devices 900 in the computing device cluster may store different instructions for performing part of the functions of the apparatus 800. That is, the instructions stored by the memory 906 in the different computing devices 900 may implement the functionality of one or more of the acquisition module 810, the setup module 820, and the communication module 830.
In some possible implementations, one or more computing devices in a cluster of computing devices may be connected through a network. Wherein the network may be a wide area network or a local area network, etc. Fig. 11 shows one possible implementation. As shown in fig. 11, two computing devices 900A and 900B are connected by a network. Specifically, the connection to the network is made through a communication interface in each computing device. In this type of possible implementation, instructions to perform the functions of the acquisition module 810 are stored in the memory 906 in the computing device 900A. Meanwhile, instructions to perform the functions of the setup module 820 and the communication module 830 are stored in the memory 906 in the computing device 900B.
It should be appreciated that the functionality of computing device 900A shown in fig. 11 may also be performed by multiple computing devices 900. Likewise, the functionality of computing device 900B may also be performed by multiple computing devices 900.
The embodiment of the application also provides another computing device cluster. The connection between computing devices in the computing device cluster may be similar to the connection of the computing device cluster described with reference to fig. 10 and 11. In contrast, the same instructions for performing the method of FIG. 7 may be stored in memory 906 of one or more computing devices 900 in the computing device cluster.
In some possible implementations, portions of the instructions for performing the method shown in fig. 7 may also be stored in the memory 906 of one or more computing devices 900 in the computing device cluster, respectively. In other words, a combination of one or more computing devices 900 may collectively execute instructions for performing the method shown in FIG. 7.
Embodiments of the present application also provide a computer program product comprising instructions. The computer program product may be software or a program product containing instructions capable of running on a computing device or stored in any useful medium. The computer program product, when run on at least one computing device, causes the at least one computing device to perform the method of fig. 7.
The embodiment of the application also provides a computer readable storage medium. The computer readable storage medium may be any available medium that can be stored by a computing device or a host migration device such as a data center containing one or more available media. The usable medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid state disk), etc. The computer-readable storage medium includes instructions that instruct a computing device to perform the method shown in fig. 7.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and are not limiting; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; these modifications or substitutions do not depart from the essence of the corresponding technical solutions from the protection scope of the technical solutions of the embodiments of the present invention.
Claims (20)
1. The data transmission method is characterized by being applied to a server side in a data transmission system, wherein the data transmission system further comprises a client side, the server side is configured on a first computing device with a control unit, the client side is configured on a second computing device, and the control unit is used for sending an SSH message to the second computing device; the method comprises the following steps:
the server side obtains a first SSH message sent by the control unit to the second computing device;
under the condition that the server side confirms that the first SSH message is the first SSH message sent to the second computing equipment by the control unit, a trusted data channel between the server side and the client side is established;
The server receives a second SSH message sent by the control unit to the second computing device through an SSH data channel between the control unit and the server, wherein the second SSH message comprises a control instruction for controlling the second computing device;
the server side converts the second SSH message into a first message of a non-SSH protocol, and sends the first message to the client side through the trusted data channel, wherein the first message comprises the control instruction; the control instructions are for the client to control the second computing device.
2. The method of claim 1, wherein the trusted data channel is established through a trusted control channel established with the server at the time of client start-up on the second computing device.
3. The method of claim 1 or 2, wherein the data transmission system further comprises an intercept forwarding module configured on the first computing device; the interception and forwarding module is used for intercepting the message sent by the control unit, and forwarding the first SSH message to the server side when intercepting the first SSH message, so that the server side obtains the first SSH message.
4. The method of claim 3, wherein the intercepting forwarding module uses the intercepted destination address of the first SSH message as the network address of the second computing device, and wherein forwarding the first SSH message to the server comprises: and the interception forwarding module carries the network address of the second computing device in the first SSH message under the condition that the first SSH message is confirmed to be the first SSH message sent to the second computing device by the control unit, and updates the destination address of the first SSH message to the network address of the server so as to forward the updated first SSH message to the server.
5. The method according to any one of claims 1-4, further comprising:
the server receives a second message sent by the client through the trusted data channel, wherein the second message comprises a result that the client controls the second computing device based on the control instruction;
the server side converts the second message into a third SSH message, and sends the third SSH message to the control unit through the SSH data channel, wherein the third SSH message comprises a result that the client side controls the second computing device based on the control instruction.
6. The method of claim 5, wherein the client controlling the result of the second computing device based on the control instructions comprises: and the client executes the execution result of the control instruction at the second computing device.
7. The method according to any one of claims 1-6, further comprising:
when the user corresponding to the second SSH message is inconsistent with the user connected with the client in the early stage, executing user switching operation, and receiving a switching result from the client, wherein the switching result is used for indicating that the user connected with the second computing device is switched to the user corresponding to the second SSH message;
and sending the switching result to the control unit.
8. The method of claim 7, wherein the step of,
the user switching operation includes: instruct the control unit to provide a password input instruction;
the sending the switching result to the control unit includes sending the switching result to the control unit when a password is received from the control unit.
9. The method according to any one of claims 1-8, further comprising:
And when the user connected with the second computing equipment changes, indicating the client to configure the environment variable corresponding to the changed user.
10. The data transmission method is characterized by being applied to a data transmission system, wherein the data transmission system further comprises a server side and a client side, the server side is configured on a first computing device with a control unit, the client side is configured on a second computing device, and the control unit is used for sending an SSH message to the second computing device; the method comprises the following steps:
the server side obtains a first SSH message sent by the control unit to the second computing device;
under the condition that the server side confirms that the first SSH message is the first SSH message sent to the second computing equipment by the control unit, a trusted data channel between the server side and the client side is established;
the server receives a second SSH message sent by the control unit to the second computing device through an SSH data channel between the control unit and the server; the second SSH message includes control instructions for controlling the second computing device;
the server side converts the second SSH message into a first message of a non-SSH protocol, and sends the first message to the client side through the trusted data channel, wherein the first message comprises the control instruction;
The client controls the second computing device based on the control instructions.
11. The method of claim 10, wherein the data transmission system further comprises an intercept forwarding module configured on the first computing device; the method further comprises the steps of: the interception and forwarding module intercepts the message sent by the control unit, and forwards the first SSH message to the server when intercepting the first SSH message, so that the server obtains the first SSH message.
12. The method according to claim 10 or 11, characterized in that the method further comprises:
the client sends a second message to the server through the trusted data channel, wherein the second message comprises a result that the client controls the second computing device based on the control instruction;
the server is configured to convert the second message into a third SSH message, and send the third SSH message to the control unit through the SSH data channel, where the third SSH message includes a result that the client controls the second computing device based on the control instruction.
13. The data transmission device is characterized by being configured at a server side in a data transmission system, wherein the data transmission system further comprises a client side, the server side is configured at a first computing device with a control unit, the client side is configured at a second computing device, and the control unit is used for sending an SSH message to the second computing device; the device comprises: the device comprises an acquisition module, an establishment module and a communication module; wherein,
The acquisition module is used for acquiring a first SSH message sent by the control unit to the second computing device;
the establishing module is configured to establish a trusted data channel between the server and the client when the server confirms that the first SSH message is a first SSH message sent by the control unit to the second computing device;
the communication module is used for receiving a second SSH message sent by the control unit to the second computing device through an SSH data channel between the control unit and the server, and the second SSH message comprises a control instruction for controlling the second computing device;
the communication module is further configured to convert the second SSH packet into a first packet of a non-SSH protocol, and send the first packet to the client through the trusted data channel, where the first packet includes the control instruction; the control instructions are for the client to control the second computing device.
14. The apparatus of claim 13, wherein the device comprises a plurality of sensors,
the communication module is further configured to receive a second message sent by the client through the trusted data channel, where the second message includes a result that the client controls the second computing device based on the control instruction;
The communication module is further configured to convert the second message into a third SSH message, and send the third SSH message to the control unit through the SSH data channel, where the third SSH message includes a result that the client controls the second computing device based on the control instruction.
15. The apparatus according to claim 13 or 14, characterized in that the apparatus further comprises: a switching module;
the switching module is used for executing user switching operation when the user corresponding to the second SSH message is inconsistent with the user connected with the client in the early stage, and receiving a switching result from the client, wherein the switching result is used for indicating that the user connected with the second computing device is switched to the user corresponding to the second SSH message;
the communication module is also used for sending the switching result to the control unit.
16. The apparatus of any of claims 13-15, wherein the communication module is further configured to, when a change occurs to a user connected to the second computing device, instruct the client to configure an environment variable corresponding to the changed user.
17. The data transmission system is characterized by comprising a service end and a client end, wherein the service end is configured on a first computing device with a control unit, the client end is configured on a second computing device, and the control unit is used for sending an SSH message to the second computing device; wherein,
The server side is used for acquiring a first SSH message sent by the control unit to the second computing device;
the server is used for establishing a trusted data channel between the server and the client under the condition that the first SSH message is confirmed to be a first SSH message sent to the second computing device by the control unit;
the server side is used for receiving a second SSH message sent by the control unit to the second computing device through an SSH data channel between the control unit and the server side, and the second SSH message comprises a control instruction for controlling the second computing device;
the server side converts the second SSH message into a first message of a non-SSH protocol, and sends the first message to the client side through the trusted data channel, wherein the first message comprises the control instruction;
the client is to control the second computing device based on the control instruction.
18. A cluster of computing devices, comprising at least one computing device, each computing device comprising a processor and a memory;
the processor of the at least one computing device is configured to execute instructions stored in a memory of the at least one computing device to cause the cluster of computing devices to perform the method of any of claims 1-9.
19. A computer readable storage medium comprising computer program instructions which, when executed by a cluster of computing devices, perform the method of any of claims 1-9.
20. A computer program product containing instructions that, when executed by a cluster of computing devices, cause the cluster of computing devices to perform the method of any of claims 1-9.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310731083.0A CN116980180A (en) | 2023-06-19 | 2023-06-19 | Data transmission method, device and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310731083.0A CN116980180A (en) | 2023-06-19 | 2023-06-19 | Data transmission method, device and system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN116980180A true CN116980180A (en) | 2023-10-31 |
Family
ID=88472062
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310731083.0A Pending CN116980180A (en) | 2023-06-19 | 2023-06-19 | Data transmission method, device and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116980180A (en) |
-
2023
- 2023-06-19 CN CN202310731083.0A patent/CN116980180A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9258308B1 (en) | Point to multi-point connections | |
US9537835B2 (en) | Secure mobile app connection bus | |
US8332464B2 (en) | System and method for remote network access | |
US7216225B2 (en) | Filtered application-to-application communication | |
US8117317B2 (en) | Systems and methods for integrating local systems with cloud computing resources | |
CN102356620B (en) | Web application access | |
US11924165B2 (en) | Securing containerized applications | |
EP3286889B1 (en) | Secure in-band service detection | |
EP2682892A1 (en) | System and method for out-of- band application authentification | |
CN113341798A (en) | Method, system, device, equipment and storage medium for remotely accessing application | |
US20170279806A1 (en) | Authentication in a Computer System | |
CN116830528A (en) | Selective policy-driven interception of encrypted network traffic using domain name service and single sign-on service | |
CN113872933B (en) | Method, system, device, equipment and storage medium for hiding source station | |
CN111628960B (en) | Method and apparatus for connecting to network services on a private network | |
KR101971995B1 (en) | Method for decryping secure sockets layer for security | |
JP4972646B2 (en) | Providing consistent application-compatible firewall traversal | |
CN108293049B (en) | Unique identification of and secure communication with devices in uncontrolled networks | |
CN116980180A (en) | Data transmission method, device and system | |
CN115499177A (en) | Cloud desktop access method, zero-trust gateway, cloud desktop client and server | |
CN113709113A (en) | Cloud desktop security and credibility authentication method based on three-terminal separation design | |
US20240241743A1 (en) | Registration and deployment of an agent platform appliance in a hybrid environment | |
US11569997B1 (en) | Security mechanisms for data plane extensions of provider network services | |
US8995271B2 (en) | Communications flow analysis | |
CN116760595A (en) | Access method, computing device and computer storage medium | |
CN117950791A (en) | Virtual machine access method and device, electronic equipment and computer readable medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |