A remote maintenance method, device and medium for emergency broadcast equipment based on SSH

By installing SSH software on emergency broadcast equipment and establishing SSH reverse tunnels, the problems of maintenance convenience and flexibility of emergency broadcast equipment are solved, remote maintenance and security verification are achieved, and maintenance efficiency and flexibility are improved.

CN114374454BActive Publication Date: 2024-11-22FUJIAN NEWLAND COMM SCI TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111481102.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-06
Publication Date
2024-11-22
Estimated Expiration
2041-12-06

AI Technical Summary

Technical Problem

Emergency broadcast equipment maintenance is difficult to achieve convenience and flexibility. Traditional methods require dispatching operation and maintenance personnel or relying on custom interactions, and the operating system-level interaction flexibility is poor.

Method used

By installing SSH software on emergency broadcast devices, generate public and private keys, establish a heartbeat connection and public network server, perform SSH reverse tunnel authentication, and use SSH reverse tunnel for remote maintenance, supporting linux command operations and running logs Real-time redirection.

Benefits of technology

It realizes convenient remote maintenance of emergency broadcast equipment, improves maintenance flexibility and security, can be controlled in the NAT intranet, and significantly improves maintenance efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114374454B_ABST
    Figure CN114374454B_ABST
Patent Text Reader

Abstract

The present invention provides a remote maintenance method, device and medium of emergency broadcast equipment based on SSH in the field of emergency broadcast technology, and the method comprises the following steps: step S10, installing SSH software on the emergency broadcast equipment; step S20, the emergency broadcast equipment establishes a heartbeat connection with a public network server; step S30, generating a pair of public keys and private keys through SSH software, and sending the public key to the public network server; step S40, the public network server authenticates the corresponding emergency broadcast equipment through the public key based on the maintenance request sent by the maintenance computer; step S50, the public network server establishes an SSH reverse tunnel with the emergency broadcast equipment; step S60, the maintenance computer remotely maintains the emergency broadcast equipment through the SSH reverse tunnel. The advantages of the present invention are: greatly improving the convenience and flexibility of emergency broadcast equipment maintenance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of emergency broadcasting, and in particular to a remote maintenance method, equipment and medium for emergency broadcasting equipment based on SSH. Background Art

[0002] Emergency broadcasting equipment is widely distributed, usually located in villages within a certain area. It basically uses Linux system, communicates with the broadcasting platform through wireless network or network cable, and can perform broadcasting tasks at any time. As emergency broadcasting equipment running outdoors, it is inevitable that various unpredictable failures will occur, which requires maintenance (debugging).

[0003] Traditionally, there are two methods for maintaining emergency broadcasting equipment:

[0004] One is to send operation and maintenance personnel to the site, connect the emergency broadcasting equipment to the operation and maintenance computer via a serial port or network cable, and then have the developers in the office log in to the operation and maintenance computer through remote desktop software (such as Sunflower) to troubleshoot the problem. Although this method does not need to worry about network failures of emergency broadcasting equipment, sending operation and maintenance personnel on a business trip requires considerable energy and time.

[0005] The second is to allow the emergency broadcasting equipment to remotely transmit some printouts (equipment operation logs) to the background server through the network for customized interaction. However, which printouts and interactive behaviors can be executed need to be written into the software of the emergency broadcasting equipment in advance, which lacks flexibility and is especially difficult to interact at the operating system level.

[0006] Therefore, how to provide an SSH-based remote maintenance method, equipment and medium for emergency broadcasting equipment to improve the convenience and flexibility of emergency broadcasting equipment maintenance has become a technical problem that needs to be solved urgently. Summary of the invention

[0007] The technical problem to be solved by the present invention is to provide a remote maintenance method, device and medium for emergency broadcast equipment based on SSH, so as to improve the convenience and flexibility of emergency broadcast equipment maintenance.

[0008] In a first aspect, the present invention provides a remote maintenance method for emergency broadcast equipment based on SSH, comprising the following steps:

[0009] Step S10: Install SSH software on the emergency broadcasting device;

[0010] Step S20: The emergency broadcast device establishes a heartbeat connection with the public network server;

[0011] Step S30: Generate a pair of public and private keys through SSH software, and send the public key to the public network server;

[0012] Step S40: the public network server authenticates the corresponding emergency broadcast device through the public key based on the maintenance request sent by the maintenance computer;

[0013] Step S50: The public network server and the emergency broadcast device establish an SSH reverse tunnel;

[0014] Step S60: The maintenance computer performs remote maintenance on the emergency broadcasting equipment through the SSH reverse tunnel.

[0015] Furthermore, the step S10 is specifically as follows:

[0016] Download the source code of SSH software on the emergency broadcasting device running the Linux operating system, cross-compile the source code to generate dbclient program, dropbear program and dropbearkey program, and transplant the dbclient program, dropbear program and dropbearkey program into the file system of the emergency broadcasting device to complete the installation of SSH software.

[0017] Furthermore, the step S20 is specifically as follows:

[0018] The emergency broadcast device periodically sends a heartbeat packet carrying the device serial number to the public network server through the UDP port, and then establishes a heartbeat connection with the public network server.

[0019] Furthermore, the step S30 is specifically as follows:

[0020] The emergency broadcast device generates a pair of public and private keys through the dropbearkey program, and sends the public key to a designated directory on the public network server through FTP;

[0021] The public network server creates a device list for maintaining device serial numbers, public keys, online status, IP addresses and UDP ports, and automatically monitors the specified directory through a script to update the monitored public keys into the device list.

[0022] Furthermore, the step S40 specifically includes:

[0023] Step S41, the maintenance computer sends a maintenance request carrying the device serial number to the public network server;

[0024] Step S42: The public network server receives the maintenance request, and matches the corresponding public key, IP address, and UDP port from the device list based on the device serial number carried in the maintenance request;

[0025] Step S43: the public network server randomly generates a character string, and sends the character string to the corresponding emergency broadcast device through the IP address and UDP port;

[0026] Step S44: the emergency broadcast device encrypts the received character string using the private key to obtain an encrypted character string, and sends the encrypted character string to the public network server;

[0027] Step S45, the public network server uses the public key to decrypt the encrypted string, and compares the decrypted string with the locally stored string to see if they are consistent. If so, the identity authentication passes and enters step S50; if not, the identity authentication fails and the process ends.

[0028] Furthermore, the step S50 is specifically as follows:

[0029] The public network server calls the dbclient program of the emergency broadcast device, allowing the emergency broadcast device to log in to the public network server as a client with SSH reverse tunnel enabled, and then starts the dropbear program as an SSH server to receive reverse SSH requests from the public network server, thereby completing the establishment of the SSH reverse tunnel.

[0030] Furthermore, the step S60 is specifically as follows:

[0031] The maintenance computer sends Linux commands to the emergency broadcasting device through the SSH reverse tunnel to view and modify the system files of the emergency broadcasting device so as to perform remote maintenance on the emergency broadcasting device.

[0032] Furthermore, the step S60 further includes:

[0033] The emergency broadcast device redirects the operation log to the maintenance computer in real time through the SSH reverse tunnel.

[0034] In a second aspect, the present invention provides an SSH-based remote maintenance device for emergency broadcast equipment, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method described in the first aspect when executing the program.

[0035] In a third aspect, the present invention provides an SSH-based remote maintenance medium for emergency broadcast equipment, on which a computer program is stored, and when the program is executed by a processor, the method described in the first aspect is implemented.

[0036] One or more technical solutions provided in the embodiments of the present invention have at least the following technical effects or advantages:

[0037] 1. By installing dbclient program and dropbear program on the emergency broadcasting device running the Linux operating system, an SSH reverse tunnel can be established between the public network server and the emergency broadcasting device. After the maintenance computer sends a login request to the designated port of the public network server through the SSH protocol, the login request can be transparently transmitted to the emergency broadcasting device through the SSH reverse tunnel. After a successful login, the emergency broadcasting device can be remotely maintained using Linux commands. During the maintenance process, the emergency broadcasting device can also redirect the operation log to the maintenance computer in real time to realize remote maintenance of the emergency broadcasting device. Logging in to the Linux operating system through the SSH reverse tunnel can provide the greatest control flexibility for the emergency broadcasting device, and the emergency broadcasting device in the NAT intranet can still be controlled, which ultimately greatly improves the convenience and flexibility of emergency broadcasting equipment maintenance.

[0038] 2. Create a pair of public and private keys on the emergency broadcast device and send the public key to the public network server. After receiving the maintenance request from the maintenance computer, the public network server sends a string to the emergency broadcast device, and asks the emergency broadcast device to return the string encrypted with the private key. The encrypted string is then decrypted using the public key, and the decrypted string is compared with the local string to see if they are consistent. Since the data encrypted by the private key can only be decrypted by the matching public key, this method can verify whether the private key of the emergency broadcast device has been tampered with or whether it is connected to the wrong emergency broadcast device, thereby greatly improving the security of maintenance.

[0039] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] The present invention will be further described below in conjunction with embodiments with reference to the accompanying drawings.

[0041] Figure 1 The present invention is a flowchart of a remote maintenance method for emergency broadcast equipment based on SSH.

[0042] Figure 2 It is a structural schematic diagram of an SSH-based remote maintenance device for emergency broadcasting equipment of the present invention.

[0043] Figure 3 The present invention is a structural schematic diagram of a remote maintenance medium for emergency broadcast equipment based on SSH.

[0044] Figure 4 It is a hardware architecture diagram of the present invention. DETAILED DESCRIPTION

[0045] The embodiments of the present application provide an SSH-based remote maintenance method, device, and medium for emergency broadcast equipment, thereby improving the convenience and flexibility of emergency broadcast equipment maintenance.

[0046] The technical solution in the embodiment of the present application has the following overall idea: an SSH reverse tunnel is established between the public network server and the emergency broadcasting equipment through the dbclient program and the dropbear program, so that the maintenance computer sends a login request to the designated port of the public network server through the SSH protocol. The login request can then be transparently transmitted to the emergency broadcasting equipment through the SSH reverse tunnel. After a successful login, the emergency broadcasting equipment can be remotely maintained using Linux commands to improve the convenience and flexibility of emergency broadcasting equipment maintenance.

[0047] Please refer to Figures 1 to 4 As shown:

[0048] Embodiment 1 provides a remote maintenance method for emergency broadcast equipment based on SSH, comprising the following steps:

[0049] Step S10: Install lightweight SSH software on the emergency broadcasting device;

[0050] Step S20: The emergency broadcast device establishes a heartbeat connection with the public network server;

[0051] Step S30: Generate a pair of public and private keys through SSH software, and send the public key to the public network server;

[0052] Step S40: the public network server authenticates the corresponding emergency broadcast device through the public key based on the maintenance request sent by the maintenance computer;

[0053] Step S50: The public network server and the emergency broadcast device establish an SSH reverse tunnel;

[0054] Step S60: The maintenance computer performs remote maintenance on the emergency broadcasting equipment through the SSH reverse tunnel.

[0055] The present invention is based on SSH reverse tunnel technology. When the network status of the emergency broadcasting equipment is normal, remote maintenance can be performed without worrying about the problems of the emergency broadcasting equipment behind NAT. The technical personnel can remotely debug and quickly locate the problems, making the maintenance of the emergency broadcasting equipment easier.

[0056] The step S10 is specifically as follows:

[0057] Download the source code of SSH software on the emergency broadcasting device running the Linux operating system, cross-compile the source code through the tool chain to generate dbclient program, dropbear program and dropbearkey program, and transplant the dbclient program, dropbear program and dropbearkey program into the file system of the emergency broadcasting device to complete the installation of SSH software.

[0058] The step S20 is specifically as follows:

[0059] The emergency broadcast device sends a heartbeat packet carrying the device serial number to the public network server via the UDP port at regular intervals, thereby establishing a heartbeat connection with the public network server. The public network server maintains the online status of the device list in real time based on the heartbeat connection.

[0060] The step S30 is specifically as follows:

[0061] The emergency broadcast device generates a pair of public and private keys through the dropbearkey program, and sends the public key to a designated directory of the public network server through FTP, such as the ~ / .ssh directory of the public network server;

[0062] The public network server creates a device list for maintaining device serial numbers, public keys, online status, IP addresses and UDP ports, and automatically monitors the specified directory through a script to update the monitored public keys into the device list.

[0063] The step S40 specifically includes:

[0064] Step S41, the maintenance computer sends a maintenance request carrying the device serial number to the public network server;

[0065] Step S42: The public network server receives the maintenance request, and matches the corresponding public key, IP address, and UDP port from the device list based on the device serial number carried in the maintenance request;

[0066] Step S43: the public network server randomly generates a character string, and sends the character string to the corresponding emergency broadcast device through the IP address and UDP port;

[0067] Step S44: the emergency broadcast device encrypts the received character string using the private key to obtain an encrypted character string, and sends the encrypted character string to the public network server;

[0068] Step S45, the public network server uses the public key to decrypt the encrypted string, and compares the decrypted string with the locally stored string to see if they are consistent. If so, the identity authentication passes, and a device trusted response is sent to the maintenance computer, and the process proceeds to step S50; if not, the identity authentication fails, and the process ends.

[0069] The step S50 is specifically as follows:

[0070] The public network server calls the dbclient program of the emergency broadcast device, allowing the emergency broadcast device to log in to the public network server as a client with SSH reverse tunnel enabled, and then starts the dropbear program as an SSH server to receive the reverse SSH request of the public network server, thereby completing the establishment of the SSH reverse tunnel. That is, the emergency broadcast device is used as a client with SSH reverse tunnel enabled to log in to the public network server in the form of dbclient-TNRf.

[0071] The step S60 is specifically as follows:

[0072] The maintenance computer sends Linux commands to the emergency broadcasting device through the SSH reverse tunnel to view and modify the system files of the emergency broadcasting device so as to perform remote maintenance on the emergency broadcasting device.

[0073] The step S60 further includes:

[0074] The emergency broadcast device redirects the operation log to the maintenance computer in real time through the SSH reverse tunnel.

[0075] Based on the same inventive concept, the present application provides an electronic device embodiment corresponding to the first embodiment, see the second embodiment for details.

[0076] Embodiment 2 provides an SSH-based remote maintenance device for emergency broadcast equipment, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, any implementation method in Embodiment 1 can be implemented.

[0077] Since the electronic device introduced in this embodiment is a device used to implement the method in the first embodiment of the present application, based on the method introduced in the first embodiment of the present application, a person skilled in the art can understand the specific implementation of the electronic device of the present embodiment and its various variations, so how the electronic device implements the method in the embodiment of the present application is not described in detail here. As long as a person skilled in the art implements the device used by the method in the embodiment of the present application, it belongs to the scope of protection of the present application.

[0078] Based on the same inventive concept, the present application provides a storage medium corresponding to the first embodiment, see the fourth embodiment for details.

[0079] Embodiment 4 provides an SSH-based remote maintenance medium for emergency broadcast equipment, on which a computer program is stored. When the computer program is executed by a processor, any implementation method in Embodiment 1 can be implemented.

[0080] In summary, the advantages of the present invention are:

[0081] 1. By installing dbclient program and dropbear program on the emergency broadcasting device running the Linux operating system, an SSH reverse tunnel can be established between the public network server and the emergency broadcasting device. After the maintenance computer sends a login request to the designated port of the public network server through the SSH protocol, the login request can be transparently transmitted to the emergency broadcasting device through the SSH reverse tunnel. After a successful login, the emergency broadcasting device can be remotely maintained using Linux commands. During the maintenance process, the emergency broadcasting device can also redirect the operation log to the maintenance computer in real time to realize remote maintenance of the emergency broadcasting device. Logging in to the Linux operating system through the SSH reverse tunnel can provide the greatest control flexibility for the emergency broadcasting device, and the emergency broadcasting device in the NAT intranet can still be controlled, which ultimately greatly improves the convenience and flexibility of emergency broadcasting equipment maintenance.

[0082] 2. Create a pair of public and private keys on the emergency broadcast device and send the public key to the public network server. After receiving the maintenance request from the maintenance computer, the public network server sends a string to the emergency broadcast device, and asks the emergency broadcast device to return the string encrypted with the private key. The encrypted string is then decrypted using the public key, and the decrypted string is compared with the local string to see if they are consistent. Since the data encrypted by the private key can only be decrypted by the matching public key, this method can verify whether the private key of the emergency broadcast device has been tampered with or whether it is connected to the wrong emergency broadcast device, thereby greatly improving the security of maintenance.

[0083] Although the specific implementation modes of the present invention are described above, those skilled in the art should understand that the specific implementation modes described are only illustrative and are not intended to limit the scope of the present invention. Equivalent modifications and changes made by those skilled in the art in accordance with the spirit of the present invention should be included in the scope of protection of the claims of the present invention.

Claims

1. A remote maintenance method for emergency broadcast equipment based on SSH, characterized in that: The steps include: Step S10: Install SSH software on the emergency broadcasting device; Step S20: The emergency broadcast device establishes a heartbeat connection with the public network server; Step S30: Generate a pair of public and private keys through SSH software, and send the public key to the public network server; Step S40: the public network server authenticates the corresponding emergency broadcast device through the public key based on the maintenance request sent by the maintenance computer; Step S50: The public network server and the emergency broadcast device establish an SSH reverse tunnel; Step S60: The maintenance computer performs remote maintenance on the emergency broadcasting equipment through the SSH reverse tunnel; The step S10 is specifically as follows: Download the source code of SSH software on the emergency broadcasting device running the Linux operating system, cross-compile the source code to generate dbclient program, dropbear program and dropbearkey program, and transplant the dbclient program, dropbear program and dropbearkey program into the file system of the emergency broadcasting device to complete the installation of SSH software; The step S20 is specifically as follows: The emergency broadcast device periodically sends a heartbeat packet carrying the device serial number to the public network server through the UDP port, and then establishes a heartbeat connection with the public network server; The step S30 is specifically as follows: The emergency broadcast device generates a pair of public and private keys through the dropbearkey program, and sends the public key to a designated directory on the public network server through FTP; The public network server creates a device list for maintaining device serial numbers, public keys, online status, IP addresses, and UDP ports, and automatically monitors the specified directory through a script, and updates the monitored public keys to the device list; The step S40 specifically includes: Step S41, the maintenance computer sends a maintenance request carrying the device serial number to the public network server; Step S42: The public network server receives the maintenance request, and matches the corresponding public key, IP address, and UDP port from the device list based on the device serial number carried in the maintenance request; Step S43: the public network server randomly generates a character string, and sends the character string to the corresponding emergency broadcast device through the IP address and UDP port; Step S44: the emergency broadcast device encrypts the received character string using the private key to obtain an encrypted character string, and sends the encrypted character string to the public network server; Step S45, the public network server uses the public key to decrypt the encrypted string, and compares the decrypted string with the locally stored string to see if they are consistent. If so, the identity authentication is passed, and the process proceeds to step S50; if not, the identity authentication fails, and the process ends; The step S50 is specifically as follows: The public network server calls the dbclient program of the emergency broadcast device, allowing the emergency broadcast device to log in to the public network server as a client with SSH reverse tunnel enabled, and then starts the dropbear program as an SSH server to receive reverse SSH requests from the public network server, thereby completing the establishment of the SSH reverse tunnel.

2. The remote maintenance method for emergency broadcast equipment based on SSH as claimed in claim 1, characterized in that: The step S60 is specifically as follows: The maintenance computer sends Linux commands to the emergency broadcasting device through the SSH reverse tunnel to view and modify the system files of the emergency broadcasting device so as to perform remote maintenance on the emergency broadcasting device.

3. The remote maintenance method for emergency broadcast equipment based on SSH as claimed in claim 1, characterized in that: The step S60 further includes: The emergency broadcast device redirects the operation log to the maintenance computer in real time through the SSH reverse tunnel.

4. An SSH-based remote maintenance device for emergency broadcasting equipment, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the method according to any one of claims 1 to 3 is implemented.

5. A remote maintenance medium for emergency broadcasting equipment based on SSH, on which a computer program is stored, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 3 is implemented.