CN114238928A - Method and device for remote server management - Google Patents

Method and device for remote server management Download PDF

Info

Publication number
CN114238928A
CN114238928A CN202111553133.8A CN202111553133A CN114238928A CN 114238928 A CN114238928 A CN 114238928A CN 202111553133 A CN202111553133 A CN 202111553133A CN 114238928 A CN114238928 A CN 114238928A
Authority
CN
China
Prior art keywords
remote server
foreground
data stream
background
login
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
Application number
CN202111553133.8A
Other languages
Chinese (zh)
Inventor
白雪龙
陈厚旺
周文峰
刘波
黄文宝
程广向
张婷婷
梅振平
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Construction Bank Corp
Original Assignee
China Construction Bank Corp
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by China Construction Bank Corp filed Critical China Construction Bank Corp
Priority to CN202111553133.8A priority Critical patent/CN114238928A/en
Publication of CN114238928A publication Critical patent/CN114238928A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/44Program or device authentication
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/10Protecting distributed programs or content, e.g. vending or licensing of copyrighted material ; Digital rights management [DRM]
    • G06F21/107License processing; Key processing
    • G06F21/1078Logging; Metering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/45Structures or tools for the administration of authentication

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • Computer Hardware Design (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Technology Law (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a method and a device for remote server management, and relates to the technical field of resource scheduling. One embodiment of the method comprises: responding to a received login request sent by a foreground, and establishing session connection between the foreground and a target remote server; receiving login data corresponding to the login information returned by the target remote server; and converting the login data into a data stream, carrying out coding processing on the data stream according to the coding configuration of the foreground, and sending the coded data stream to the foreground so as to enable the foreground to display the coded data stream. The method establishes session connection with the foreground and the target remote server, and the session is carried out in a data stream mode, so that sensitive information can be effectively prevented from being leaked; the data stream can be coded according to the coding configuration of the foreground so as to realize the display of various character set codes; the front-back platform separated architecture is adopted to manage the target remote server, and the limitations of cross-platform and software dependency and the like are solved.

Description

Method and device for remote server management
Technical Field
The present invention relates to the field of resource scheduling technologies, and in particular, to a method and an apparatus for remote server management.
Background
In the traditional test environment management, the management of a remote server needs to be completed by means of multiple types of software such as SecureCRT, putty, filezilla and the like, but the compatibility and cross-platform of the multiple types of software cannot be kept consistent; and sensitive information such as server passwords and the like needs to be input into software in advance during management, so that the sensitive information of the server is easy to leak.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method and an apparatus for remote server management, which can effectively avoid leakage of sensitive information of a server, and implement display of multiple character set codes; the front-back platform separated architecture is adopted to manage the target remote server, so that the limitations of cross-platform and software dependency and the like are solved, and the flexible management of the target remote server is realized.
To achieve the above object, according to a first aspect of an embodiment of the present invention, there is provided a method for remote server management, including:
responding to a received login request sent by a foreground, and establishing session connection between the foreground and a target remote server; the login request indicates login information and a target remote server;
receiving login data corresponding to the login information returned by the target remote server;
and converting the login data into a data stream, performing coding processing on the data stream according to the coding configuration of the foreground, and sending the coded data stream to the foreground so as to enable the foreground to display the coded data stream.
Optionally, establishing a session connection with the foreground and the target remote server includes:
verifying the login request, and establishing socket connection with the foreground after the verification is passed;
and matching the target remote server according to the login request, and establishing remote connection with the target remote server.
Optionally, the login request further includes an authorization code for the target remote server, and the checking the login request includes: the login information and/or the authorization code is verified.
Optionally, the login information includes a login account, and verifying the login information includes:
checking whether the login account has the authority of logging in the target remote server, and if so, determining that the checking is passed; otherwise, the check fails.
Optionally, after the encoding processing is performed on the data stream according to the encoding configuration of the foreground and the encoded data stream is sent to the foreground, the method further includes:
receiving the coding change message sent by the foreground;
determining the changed code configuration of the foreground according to the code change message;
coding the data stream according to the changed coding configuration of the foreground to generate a coding changed data stream;
and sending the data stream with the changed codes to the foreground so that the foreground displays the data stream with the changed codes.
Optionally, after sending the data stream after the encoding processing to the foreground, the method further includes:
receiving a file transmission instruction aiming at the target remote server and sent by the foreground, wherein the file transmission instruction indicates a file to be transmitted and a remote path;
and sending a file transmission request to the target remote server based on the file transmission instruction so as to enable the target remote server to transmit the file to be transmitted to the position specified by the remote path.
Optionally, before receiving the login request sent by the foreground, the method includes: and receiving a selection instruction of the foreground to the target remote server from a remote server list, and determining the target remote server.
Optionally, the method further comprises: and receiving a change request aiming at the remote server list sent by the foreground, and changing the remote server list based on the change request.
Optionally, before sending the data stream after the encoding processing to the foreground, the method includes:
and in response to receiving the changed row and column values of the display window sent by the foreground, adjusting the row and column values in the data stream after the encoding processing according to the changed row and column values of the display window, wherein the changed row and column values of the display window are obtained by the foreground through monitoring an event indicating the change of the row and column values of the display window.
Optionally, after sending the data stream after the encoding processing to the foreground, the method further includes: and when the operation instruction aiming at the target remote server sent by a foreground is not received within the preset time, disconnecting the session connection with the foreground and the remote server.
A second aspect of an embodiment of the present invention provides a method for remote server management, including:
sending a login request to a background so as to establish session connection with a target remote server through the background; the login request indicates login information and a target remote server;
receiving a data stream which is returned by the background and corresponds to the login information after coding processing;
wherein the data stream after the encoding process is obtained by: the background receives login data corresponding to the login information returned by the target remote server, converts the login data into a data stream, and codes the data stream according to coding configuration to obtain the coded data stream;
and displaying the data stream after the coding processing.
Optionally, sending a login request to a background to establish a session connection with a target remote server through the background, including:
sending a login request to the background so that the background verifies the login request, and establishing socket connection with the background after the verification is passed;
and enabling the background to be matched with the target remote server according to the login request so as to enable the background to establish remote connection with the target remote server.
Optionally, the login request further includes an authorization code for the target remote server, so that the background checks the login request, including: so that the background verifies the login information and/or the authorization code.
Optionally, the login information includes a login account, so that the background checks the login information, including: enabling the background to verify whether the login account has the authority of logging in the target remote server, and if so, passing the verification; otherwise, the check fails.
Optionally, after receiving the encoded data stream corresponding to the login information returned by the background, the method further includes:
sending a code change message to the background so that the background determines the changed code configuration of the foreground according to the code change message;
enabling the background to carry out coding processing on the data stream data according to the changed coding configuration of the foreground, and then generating a coding changed data stream;
and receiving the data stream of the coding change sent by the background, and displaying the data stream of the coding change.
Optionally, after displaying the data stream after the encoding process, the method further includes:
sending a file transmission instruction aiming at the target remote server to the background, wherein the file transmission instruction indicates a file to be transmitted and a remote path;
and the background sends a file transmission request to the target remote server based on the file transmission instruction, and the target remote server transmits the file to be transmitted to the position specified by the remote path.
Optionally, before sending the login request to the background, the method includes: and sending a selection instruction of the target remote server from a remote server list to the background so as to determine the target remote server.
Optionally, the method further comprises:
sending a change request for the remote server list to the background, so that the background changes the remote server list based on the change request.
Optionally, before receiving the encoded data stream corresponding to the login information returned by the background, the method includes:
monitoring an event indicating a change in the number of rows and columns of the display window; and sending the changed row and column numerical value of the display window to the background so that the background adjusts the row and column numerical value in the data stream after the coding processing according to the changed row and column numerical value of the display window.
Optionally, after displaying the data stream after the encoding process, the method further includes: and when the operation instruction aiming at the target remote server is not sent to the background within the preset time, the session connection with the target remote server is disconnected through the background.
A third aspect of an embodiment of the present invention provides an apparatus for remote server management, including:
the connection module responds to a received login request sent by a foreground and establishes session connection between the foreground and a target remote server; the login request indicates login information and a target remote server;
the first receiving module is used for receiving login data corresponding to the login information returned by the target remote server;
and the first sending module is used for converting the login data into a data stream, carrying out coding processing on the data stream according to the coding configuration of the foreground, and sending the coded data stream to the foreground so as to enable the foreground to display the coded data stream.
Optionally, the first receiving module is further configured to:
verifying the login request, and establishing socket connection with the foreground after the verification is passed;
and matching the target remote server according to the login request, and establishing remote connection with the target remote server.
Optionally, the login request further includes an authorization code for the target remote server, and the first receiving module is further configured to: the login information and/or the authorization code is verified.
Optionally, the login information includes a login account, and the first receiving module is further configured to:
checking whether the login account has the authority of logging in the target remote server, and if so, determining that the checking is passed; otherwise, the check fails.
Optionally, the first sending module is further configured to: after the data stream is coded according to the coding configuration of the foreground and the coded data stream is sent to the foreground,
receiving the coding change message sent by the foreground;
determining the changed code configuration of the foreground according to the code change message;
coding the data stream according to the changed coding configuration of the foreground to generate a coding changed data stream;
and sending the data stream with the changed codes to the foreground so that the foreground displays the data stream with the changed codes.
Optionally, the apparatus further includes a first file transfer module, configured to: after sending the encoded data stream to the foreground,
receiving a file transmission instruction aiming at the target remote server and sent by the foreground, wherein the file transmission instruction indicates a file to be transmitted and a remote path;
and sending a file transmission request to the target remote server based on the file transmission instruction so as to enable the target remote server to transmit the file to be transmitted to the position specified by the remote path.
Optionally, the apparatus comprises a first determining module configured to: and before receiving a login request sent by a foreground, receiving a selection instruction of the foreground to the target remote server from a remote server list, and determining the target remote server.
Optionally, the apparatus further comprises a first changing module configured to: and receiving a change request aiming at the remote server list sent by the foreground, and changing the remote server list based on the change request.
Optionally, the first sending module is further configured to: before sending the data stream after the encoding processing to the foreground,
and in response to receiving the changed row and column values of the display window sent by the foreground, adjusting the row and column values in the data stream after the encoding processing according to the changed row and column values of the display window, wherein the changed row and column values of the display window are obtained by the foreground through monitoring an event indicating the change of the row and column values of the display window.
Optionally, the apparatus further includes a first listening module configured to: after the first sending module sends the coded data stream to the foreground, when an operation instruction aiming at the target remote server and sent by the foreground is not received within a preset time, session connection with the foreground and the remote server is disconnected.
A fourth aspect of the embodiments of the present invention provides an apparatus for remote server management, including:
the second sending module is used for sending a login request to a background so as to establish session connection with the background and between the background and a target remote server; the login request indicates login information and a target remote server;
the second receiving module is used for receiving the data stream which is returned by the background and corresponds to the login information after the coding processing; wherein the data stream after the encoding process is obtained by: the background receives login data corresponding to the login information returned by the target remote server, the background converts the login data into a data stream, and the background performs coding processing on the data stream according to the coding configuration of the foreground to obtain the coded data stream;
and the display module displays the data stream after the coding processing.
Optionally, the second sending module is further configured to:
sending a login request to the background so that the background verifies the login request, and establishing socket connection with the background after the verification is passed;
and enabling the background to be matched with the target remote server according to the login request so as to enable the background to establish remote connection with the target remote server.
Optionally, the login request further includes an authorization code for the target remote server, and the second sending module is further configured to: so that the background verifies the login information and/or the authorization code.
Optionally, the login information includes a login account, and the second sending module is further configured to: enabling the background to verify whether the login account has the authority of logging in the target remote server, and if so, passing the verification; otherwise, the check fails.
Optionally, the second receiving module is further configured to: after receiving the coded data stream corresponding to the login information returned by the background,
sending a code change message to the background so that the background determines the changed code configuration of the foreground according to the code change message;
enabling the background to carry out coding processing on the data stream data according to the changed coding configuration of the foreground, and then generating a coding changed data stream;
and receiving the data stream of the coding change sent by the background, and displaying the data stream of the coding change.
Optionally, the apparatus further includes a second file transfer module, configured to: after presenting the encoded processed data stream,
sending a file transmission instruction aiming at the target remote server to the background, wherein the file transmission instruction indicates a file to be transmitted and a remote path;
and the background sends a file transmission request to the target remote server based on the file transmission instruction, and the target remote server transmits the file to be transmitted to the position specified by the remote path.
Optionally, the apparatus further comprises a second determining module configured to: and sending a selection instruction of the target remote server from a remote server list to the background to determine the target remote server before sending a login request to the background.
Optionally, the apparatus further comprises a second changing module configured to: sending a change request for the remote server list to the background, so that the background changes the remote server list based on the change request.
Optionally, the second sending module is further configured to: monitoring an event indicating the change of the row and column number of a display window before receiving the data stream which is returned by the background and corresponds to the login information and is subjected to encoding processing; and sending the changed row and column numerical value of the display window to the background so that the background adjusts the row and column numerical value in the data stream after the coding processing according to the changed row and column numerical value of the display window.
Optionally, the apparatus further includes a second listening module configured to: and after the display module displays the coded data stream, when an operation instruction aiming at the target remote server is not sent to the background within a preset time, the session connection with the target remote server is disconnected through the background.
According to another aspect of an embodiment of the present invention, there is provided an electronic apparatus including:
one or more processors;
a storage device for storing one or more programs,
when the one or more programs are executed by the one or more processors, the one or more processors implement the method for remote server management provided in the first aspect or the second aspect of the embodiments of the present invention.
According to a further aspect of the embodiments of the present invention, there is provided a computer readable medium, on which a computer program is stored, which when executed by a processor, implements the method for remote server management provided by the first or second aspect of the embodiments of the present invention.
According to a further aspect of embodiments of the present invention, there is provided a computer program product comprising a computer program which, when executed by a processor, implements the method of remote server management provided by the first or second aspect of embodiments of the present invention.
One embodiment of the above invention has the following advantages or benefits: in the embodiment of the invention, when a login request sent by a foreground is received, session connection between the foreground and a target remote server is established; then receiving login data corresponding to the login information returned by the target remote server; and converting the login data into a data stream, carrying out coding processing on the data stream according to the coding configuration of the foreground, and sending the data stream after the coding processing to the foreground so as to enable the foreground to display the data stream after the coding processing. The method establishes session connection with the foreground and the target remote server, and the session is carried out in a data stream mode, so that sensitive information can be effectively prevented from being leaked; the data stream can be coded according to the coding configuration of the foreground so as to realize the display of various character set codes; the front-back platform separated architecture is adopted to manage the target remote server, and the limitations of cross-platform and software dependency and the like are solved.
Further effects of the above-mentioned non-conventional alternatives will be described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
fig. 1 is a schematic diagram of a main flow of a method of remote server management according to an embodiment of the present invention;
FIG. 2 is a flow chart illustrating a method of remote server management according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of the main flow of another method of remote server management according to an embodiment of the invention;
FIG. 4 is a schematic diagram of the major modules of an apparatus for remote server management according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of the main modules of another remote server managed device according to an embodiment of the present invention;
FIG. 6 is an exemplary system architecture diagram in which embodiments of the present invention may be employed;
fig. 7 is a schematic block diagram of a computer system suitable for use in implementing a terminal device or server of an embodiment of the invention.
Detailed Description
Exemplary embodiments of the present invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Fig. 1 is a schematic diagram of a main flow of a method for remote server management according to an embodiment of the present invention, as shown in fig. 1, the method for remote server management includes the following steps:
step S101: responding to a received login request sent by a foreground, and establishing session connection between the foreground and a target remote server; the login information and the target remote server are indicated in the login request;
step S102: receiving login data corresponding to the login information returned by the target remote server;
step S103: and converting the login data into a data stream, carrying out coding processing on the data stream according to the coding configuration of the foreground, and sending the coded data stream to the foreground so as to enable the foreground to display the coded data stream.
In the embodiment of the present invention, in step S101, a login request sent by a foreground is received, where the login request indicates login information and a target remote server, and the login information includes at least one of a login account, a login password, and the like.
In the embodiment of the present invention, the foreground may be a browser terminal, such as a web browser terminal, and the background may be a server corresponding to the foreground.
Optionally, before receiving the login request sent by the foreground, the foreground receives a selection instruction of the target remote server from the remote server list to determine the remote server. The method comprises the steps that a user configures query conditions according to needs, a remote server list is obtained according to the query conditions, then one or more remote servers are selected from the remote server list, and a selection instruction is sent to a background, so that the background takes the one or more remote servers selected by a foreground as target remote servers.
Optionally, establishing a session connection with the foreground and the target remote server includes: checking the login request, and establishing socket connection with a foreground after the check is passed; and matching the target remote server according to the login request, and establishing remote connection with the target remote server. The foreground and the background establish socket connection, namely websocket connection, so that the foreground and the background establish long connection, send and receive data through the socket connection, and a customized interface can be manufactured according to message content. The remote connection may be a ssh connection, an rdp connection, an rsh connection, etc. The background establishes ssh connection with the target remote server, and sends and receives data through the ssh connection, so that the background can access the target remote server through an ssh protocol, the connection is persistent, and the session connection between the foreground and the target remote server is established.
Optionally, after the socket connection with the foreground is established, the heartbeat detection is timed, that is, the connection state between the background and the foreground is detected regularly, and the validity of the session is detected.
In one embodiment, matching a target remote server according to a login request to establish a remote ssh connection with the target remote server comprises: and obtaining ssh connection with the target remote server according to the login request by adopting an Open-ssh technology.
The ssh is a security protocol created on the basis of an application layer and a transport layer, and provides a traditional network service program of a secure transmission and use environment for the shell of the computer, the ssh connection is based on the ssh protocol, the rdp connection is based on the rdp protocol, and the rsh connection is based on the rsh protocol.
In the embodiment of the invention, the login request is verified, including the login information. The login information comprises a login account, the login account can be verified, whether the login account has the authority of logging in the target remote server or not is judged, and if yes, the verification is passed. Before the login information is verified, a login account list with the authority of logging in the target remote server is configured in advance, and if a login request, namely a login account included in the login information, is in the login account list, the corresponding target remote server can be logged in. For example, a common account list and an administrator account list can be configured in advance, so that the login authority of a login account on a target remote server can be judged, the authority isolation of different user management servers in a test environment is realized, and the management authority of different users on the server is limited.
The target remote server which needs to be authorized may exist in the target remote server, and the authorization code needs to be verified aiming at the target remote server which needs to be authorized, so that the target remote server which does not need to be authorized does not need to be verified by the authorization code. Optionally, the login request further includes an authorization code for the target remote server, the verification of the login request includes the verification of the authorization code, and if the authorization code for the target remote server in the login request is the same as the configured authorization code for the target remote server, the verification passes. The user logs in the target remote server through the authorization code and checks the authorization code to configure the access strategy, so that the management authority of the user on different servers can be limited, the management flexibility is high, the working efficiency can be improved, and the management capability of system services can be improved.
Optionally, after the login information and/or the authorization code in the login request is verified and the verification is passed, the login information and/or the authorization code, the stored login authentication information of the target remote server, the server password and other information are sent to the target remote server to match the target remote server, so that the remote connection with the target remote server is realized. Sensitive information such as login authentication information and server passwords of a target remote server does not need to be input by a foreground, login management is carried out by a background, so that a user has the authority of managing the target remote server in the current session process without knowing the server passwords, the sensitive information of the server cannot be leaked when the user carries out remote server management in public equipment, and safety risks are reduced. The user can obtain the control right of the operation session of the user with the authority on the premise of not mastering the sensitive information.
After session connection is established between the remote server and the foreground, login data corresponding to login information returned by the target remote server are received and returned to the foreground, and the login data are converted or packaged into a data stream (stream) when returned to the foreground, so that sessions are exchanged in a data stream mode, the number of times of sensitive information interaction is reduced, and sensitive information leakage can be effectively avoided. And then, acquiring the coding configuration of the foreground through socket connection, coding the data stream according to the coding configuration of the foreground, and sending the coded data stream to the foreground so as to display the data stream on the foreground.
In the embodiment of the present invention, after performing encoding processing on a data stream according to encoding configuration of a foreground and sending the encoded data stream to the foreground, the method further includes: receiving a code change message sent by a foreground; determining the changed coding configuration of the foreground according to the coding change message; coding the data stream according to the changed coding configuration of the foreground to generate a coding changed data stream; and sending the data stream with the changed codes to a foreground so that the foreground displays the data stream with the changed codes.
In the embodiment of the invention, the data stream with the changed codes is obtained by coding the data stream according to the code configuration changed by the foreground, so that the foreground can normally display the data stream, and the code configuration of the character set of the login data returned by the target remote server is changed at the browser end. The encoding is character set encoding, the encoding processing is character set encoding in the encoding configuration for converting the data stream into the foreground, the character set encoding can be utf-8 encoding, can also be Chinese character set encoding such as gbk and gb2312, and can also be expanded multi-language character set encoding.
In the embodiment of the present invention, before sending the data stream after the encoding process to the foreground, the method includes: and responding to the changed row and column numerical values of the display window sent by the receiving foreground, and adjusting the row and column numerical values in the data stream after the coding processing according to the changed row and column numerical values of the display window, wherein the changed row and column numerical values of the display window are obtained by the receiving foreground through monitoring an event indicating the change of the row and column numerical values of the display window.
Monitoring an event of a change of a row and column value of a display window by a foreground, for example, when a user changes the size of a display window of a browser, triggering a resize event, monitoring and capturing the resize event in real time by the foreground, then analyzing the row and column value of the display window from the resize event, namely the row number and column number of the display window, sending the row and column value of the changed display window to the background by the foreground, obtaining the row and column value of the changed display window through socket connection before sending a data stream after encoding processing to the background, and then adjusting the row and column value in the data stream after encoding processing, so that the adjusted data stream after encoding processing is adapted to the size of the display window of the foreground, thereby realizing adaptive adjustment.
In one embodiment, the foreground shows the encoded data stream, including: js, displaying the coded data stream received by the socket connection to the browser by the foreground, and adaptively adjusting the displayed row and column numerical values.
In the embodiment of the invention, when the background establishes session connection with the foreground and the remote server, namely under the condition that the session connection is effective, the foreground and the target remote server can perform file transmission, including file uploading, file downloading and the like. Specifically, a file transmission instruction which is sent by the foreground and aims at the target remote server is received, wherein the file transmission instruction indicates a file to be transmitted and a remote path; and sending a file transmission request to the target remote server based on the file transmission instruction so as to enable the target remote server to transmit the file to be transmitted to the position specified by the remote path. When the file is transmitted, a user selects a file to be transmitted and a remote path, the foreground sends the file to be transmitted to the background, the background sends a file transmission request to a target remote server after receiving the file to be transmitted, and the file transmission request is transmitted to a position designated by the remote path, so that file list information and file permission information can be checked. Alternatively, the file transfer request may be an sftp request, where sftp is a secure file transfer protocol, a secure method of transferring a file over a network.
In an embodiment of the present invention, the method further includes: and receiving a change request aiming at the remote server list sent by the foreground, and changing the remote server list based on the change request. Optionally, the change request for the remote server list may be a change of information of the remote server in the remote server list, or a change of the number of the remote servers in the remote server list, where the change may be one or more of addition, modification, and deletion. Alternatively, the changes may be to one or more pieces of remote server information. When the information of the remote server is newly added, the foreground directly imports the file (such as an excel format file) of the information of the newly added remote server, the user judges whether the file has the information needing to be modified, if so, the file can be modified on the page, and if not, the file is sent to the background, so that the batch management of the information of the remote server is realized. When a piece of remote server information in the remote server list needs to be deleted, the information is selected to be deleted from the list; when a piece of remote server information needs to be newly added, the user fills in the remote server information; and if one piece of information needs to be modified, directly selecting the piece of information for modification, receiving a change request sent by a foreground, and obtaining a changed remote server list.
The method of the embodiment of the invention realizes the change of the remote server list by receiving the change request of the remote server list sent by the foreground, so that the information of the remote server can be maintained singly or in batch by the foreground.
In the embodiment of the invention, after the coded data stream is sent to the foreground, namely under the condition of session connection, when an operation instruction aiming at a target remote server sent by the foreground is not received within preset time, the session connection with the foreground and the remote server is disconnected. If the user does not respond after time out, if the user does not trigger the keyboard time for a long time, the system considers the conversation to be invalid, and the conversation connection is disconnected.
Fig. 2 is a schematic flowchart of a method for remote server management according to an embodiment of the present invention, where the method includes:
step S201: receiving a login request sent by a foreground, requesting to establish socket connection, wherein the login request indicates login information, an authorization code and a target remote server;
step S202: judging whether the login information and the authorization code pass the verification; if yes, go to step S203, otherwise, end the process;
step S203: establishing socket connection with a foreground;
step S204: acquiring ssh connection to a target remote server by means of an Open-ssh technology according to a login request to establish session connection between a foreground and the target remote server;
step S205: receiving login data returned by a target remote server, and converting the login data into a data stream;
step S206: carrying out coding processing on the data stream according to the coding configuration of the foreground to obtain the data stream after the coding processing, and sending the data stream to the foreground;
step S207: judging whether a code change message sent by a foreground is received or not; if yes, go to step S208; if not, go to step S211;
step S208: determining the code configuration after foreground change according to the code change message;
step S209: coding the data stream according to the changed coding configuration to generate a coding changed data stream;
step S210: sending the data stream with changed codes to a foreground;
step S211: displaying the data stream on the foreground;
step S212: judging whether an operation instruction aiming at a target remote server sent by a foreground is received within preset time or not; if yes, go to step S213; if not, ending the flow;
step S213: and receiving a data result returned by the target remote server for the operation instruction, converting the data result into a data stream, and returning to the step S206.
According to the remote server management method provided by the embodiment of the invention, after a background receives a login request sent by a foreground, login information and/or an authorization code in the login request are/is verified, after the verification is successful, a target remote server is matched according to the login request, so that the background establishes session connection with the foreground and the target remote server, the background receives login data returned by the target remote server based on the login information, the background converts the login data into a data stream, the data stream is subjected to coding processing and then is returned to the foreground, and the foreground displays the data. The method of the embodiment of the invention realizes the management of the target remote server through the architecture of separating the foreground from the background, solves the limitations of cross-platform and software dependence, and the like, and the architecture of separating the foreground from the background has expansibility; the conversation is exchanged in a data flow mode, so that the interaction times of sensitive information can be reduced, and the sensitive information of the remote server is effectively prevented from being leaked; the foreground can change the coding configuration and support the setting of various character set codes, and the background can carry out coding processing on the data stream according to the changed coding configuration so as to normally display the data stream on the foreground; in addition, the method can change the remote server information in batch, and can automatically identify the operations of newly adding and modifying and the like, so that the maintenance of the remote server information is simpler and more efficient; the method can limit the management authority of the user to the remote server by configuring the role or the authorization code of the user, improve the working efficiency and improve the management capability of system service; the method supports file transmission with a remote server, including uploading or downloading to any remote path, does not limit the size of the file, and does not block the interaction between a user and the remote server; the method can enable the data returned by the remote server to be adaptive to the display window, and improves user experience.
As shown in fig. 3, another aspect of the present invention provides another remote server management method, applied to a client, including the following steps:
step S301: sending a login request to a background so as to establish session connection with a target remote server through the background; the login information and the target remote server are indicated in the login request;
step S302: receiving a data stream which is returned by a background and corresponds to the login information after coding processing;
the data stream after the encoding processing is obtained by the following method: the background receives login data corresponding to the login information returned by the target remote server, converts the login data into a data stream, and codes the data stream according to the coding configuration to obtain the coded data stream;
step S303: and displaying the data stream after the coding processing.
In the embodiment of the present invention, sending a login request to a background to establish a session connection with a target remote server through the background, includes: sending a login request to a background so that the background verifies the login request, and establishing socket connection with the background after the verification is passed; and enabling the background to be matched with the target remote server according to the login request so as to enable the background to establish remote connection with the target remote server.
In this embodiment of the present invention, the login request further includes an authorization code for the target remote server, so that the background checks the login request, including: so that the background checks the login information and/or the authorization code.
In the embodiment of the present invention, the login information includes a login account, so that the background checks the login information, including: enabling the background to check whether the login account has the authority of logging in the target remote server, and if so, passing the check; otherwise, the check fails.
In the embodiment of the present invention, after receiving the encoded data stream corresponding to the login information returned by the background, the method further includes: sending a code change message to the background so that the background determines the changed code configuration of the foreground according to the code change message; enabling the background to carry out coding processing on the data stream data according to the changed coding configuration of the foreground, and then generating a coding changed data stream; and receiving the data stream of the coding change sent by the background, and displaying the data stream of the coding change.
In the embodiment of the present invention, a foreground, such as a browser end, may set a coding configuration, that is, set a character set code, so that a background performs coding processing on a data stream according to the character set code set by the foreground, and normally displays a received data stream after the coding processing sent by the background. Optionally, the character set encoding may be utf-8 encoding, or may be chinese character set encoding such as gbk, gb2312, and the like, or may extend multi-language character set encoding.
In this embodiment of the present invention, after displaying the data stream after the encoding process, the method further includes: sending a file transmission instruction aiming at a target remote server to a background, wherein the file transmission instruction indicates a file to be transmitted and a remote path; and the background sends a file transmission request to the target remote server based on the file transmission instruction, and the target remote server transmits the file to be transmitted to the position specified by the remote path. The file transmission comprises file uploading and downloading to any remote path, and the size of the file to be transmitted is not limited, so that interaction between a user and a remote server is not blocked.
In the embodiment of the present invention, before sending the login request to the background, the method includes: and sending a selection instruction of the target remote server from the remote server list to the background so as to determine the target remote server.
In an embodiment of the present invention, the method further includes: and sending a change request aiming at the remote server list to the background so that the background changes the remote server list based on the change request. When the number of remote servers or the information of the remote servers in the list of the remote servers needs to be changed, a change request can be sent through a foreground to realize the change, so that the information of the remote servers can be maintained in batches or singly at the foreground such as a browser end, and the defect of low efficiency caused by manually inputting a large amount of information of the remote servers in the prior art is overcome.
In the embodiment of the present invention, before receiving a data stream, which is returned by a background and corresponds to login information after encoding processing, the method includes: monitoring an event indicating a change in the number of rows and columns of the display window; and sending the changed row and column numerical value of the display window to the background so that the background adjusts the row and column numerical value in the data stream after the coding processing according to the changed row and column numerical value of the display window. For example, by capturing a resize event in real time, the resize event indicates a change in the row and column values of the display window, the changed row and column values of the display window are obtained according to the event, and then are sent to the background, so that the background adjusts the row and column values in the data stream after encoding, and the self-adaptation of the display window is realized.
In this embodiment of the present invention, after displaying the data stream after the encoding process, the method further includes: and when the operation instruction aiming at the target remote server is not sent to the background within the preset time, the session connection with the target remote server is disconnected through the background. When the user does not respond when the time out, for example, the user does not trigger the keyboard time for a long time, the system considers that the session can be invalidated, disconnects the target remote server, including disconnecting the background, and causes the background to disconnect the target remote server.
Another aspect of the present invention provides an apparatus 400 for remote server management, including:
the connection module 401, in response to receiving the login request sent by the foreground, establishes session connection with the foreground and the target remote server; the login information and the target remote server are indicated in the login request;
a first receiving module 402, configured to receive login data corresponding to login information returned by a target remote server;
the first sending module 403 converts the login data into a data stream, performs encoding processing on the data stream according to the encoding configuration of the foreground, and sends the encoded data stream to the foreground, so that the foreground displays the encoded data stream.
In this embodiment of the present invention, the first receiving module 402 is further configured to: checking the login request, and establishing socket connection with a foreground after the check is passed; and matching the target remote server according to the login request, and establishing remote connection with the target remote server.
In this embodiment of the present invention, the login request further includes an authorization code for the target remote server, and the first receiving module 402 is further configured to: the login information and/or the authorization code is verified.
In this embodiment of the present invention, the login information includes a login account, and the first receiving module 402 is further configured to: checking whether the login account has the authority of logging in the target remote server, and if so, determining that the checking is passed; otherwise, the check fails.
In this embodiment of the present invention, the first sending module 403 is further configured to: after the data stream is coded according to the coding configuration of the foreground and the coded data stream is sent to the foreground, the coding change message sent by the foreground is received; determining the changed coding configuration of the foreground according to the coding change message; coding the data stream according to the changed coding configuration of the foreground to generate a coding changed data stream; and sending the data stream with the changed codes to a foreground so that the foreground displays the data stream with the changed codes.
In an embodiment of the present invention, the apparatus further includes a first file transfer module, configured to: after the data stream after the coding processing is sent to a foreground, a file transmission instruction which is sent by the foreground and aims at a target remote server is received, and the file transmission instruction indicates a file to be transmitted and a remote path; and sending a file transmission request to the target remote server based on the file transmission instruction so that the target remote server transmits the file to be transmitted to the position specified by the remote path.
In an embodiment of the present invention, the apparatus includes a first determining module configured to: before receiving a login request sent by a foreground, receiving a selection instruction of the foreground to a target remote server from a remote server list, and determining the target remote server.
In an embodiment of the present invention, the apparatus further includes a first changing module, configured to: and receiving a change request aiming at the remote server list sent by the foreground, and changing the remote server list based on the change request.
In this embodiment of the present invention, the first sending module 403 is further configured to: and before sending the data stream after the coding processing to the foreground, responding to the changed row and column numerical values of the display window sent by the receiving foreground, and adjusting the row and column numerical values in the data stream after the coding processing according to the changed row and column numerical values of the display window, wherein the changed row and column numerical values are obtained by the foreground through monitoring an event indicating the change of the row and column numerical values of the display window.
In an embodiment of the present invention, the apparatus further includes a first listening module, configured to: after the first sending module sends the coded data stream to the foreground, when an operation instruction aiming at the target remote server and sent by the foreground is not received within the preset time, session connection with the foreground and the remote server is disconnected.
Another aspect of the present invention provides an apparatus 500 for remote server management, including:
a second sending module 501, configured to send a login request to the background to establish session connection with the background and between the background and the target remote server; the login information and the target remote server are indicated in the login request;
the second receiving module 502 receives the coded data stream corresponding to the login information returned by the background; the data stream after the encoding processing is obtained by the following method: the background receives login data corresponding to the login information returned by the target remote server, converts the login data into a data stream, and codes the data stream according to the coding configuration of the foreground to obtain the coded data stream;
and a display module 503 for displaying the encoded data stream.
In this embodiment of the present invention, the second sending module 501 is further configured to: sending a login request to a background so that the background verifies the login request, and establishing socket connection with the background after the verification is passed; and enabling the background to be matched with the target remote server according to the login request so as to enable the background to establish remote connection with the target remote server.
In this embodiment of the present invention, the login request further includes an authorization code for the target remote server, and the second sending module 501 is further configured to: so that the background checks the login information and/or the authorization code.
In this embodiment of the present invention, the login information includes a login account, and the second sending module 501 is further configured to: enabling the background to check whether the login account has the authority of logging in the target remote server, and if so, passing the check; otherwise, the check fails.
In this embodiment of the present invention, the second receiving module 502 is further configured to: after receiving a data stream which is returned by a background and corresponds to the login information and subjected to coding processing, sending a coding change message to the background so that the background determines the changed coding configuration of a foreground according to the coding change message; enabling the background to carry out coding processing on the data stream data according to the changed coding configuration of the foreground, and then generating a coding changed data stream; and receiving the data stream of the coding change sent by the background, and displaying the data stream of the coding change.
In an embodiment of the present invention, the apparatus further includes a second file transfer module, configured to: after the data stream subjected to coding processing is displayed, a file transmission instruction aiming at a target remote server is sent to a background, and the file transmission instruction indicates a file to be transmitted and a remote path; and the background sends a file transmission request to the target remote server based on the file transmission instruction, and the target remote server transmits the file to be transmitted to the position specified by the remote path.
In an embodiment of the present invention, the apparatus further includes a second determining module, configured to: before sending the login request to the background, sending a selection instruction of the target remote server from the list of the remote servers to the background so as to determine the target remote server.
In an embodiment of the present invention, the apparatus further includes a second changing module, configured to: and sending a change request aiming at the remote server list to the background so that the background changes the remote server list based on the change request.
In this embodiment of the present invention, the second sending module 501 is further configured to: monitoring an event indicating the change of the row and column number of a display window before receiving a data stream which is returned by a background and corresponds to the login information and is subjected to encoding processing; and sending the changed row and column numerical value of the display window to the background so that the background adjusts the row and column numerical value in the data stream after the coding processing according to the changed row and column numerical value of the display window.
In an embodiment of the present invention, the apparatus further includes a second monitoring module, configured to: and after the display module displays the coded data stream, an operation instruction aiming at the target remote server is not sent to the background within the preset time, so that the session connection with the target remote server is disconnected through the background.
In another aspect, an embodiment of the present invention provides an electronic device, including: one or more processors; the storage device is configured to store one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors implement the method for remote server management provided in the first aspect or the second aspect of the embodiments of the present invention.
A further aspect of embodiments of the present invention provides a computer-readable medium on which a computer program is stored, which, when executed by a processor, implements the method for remote server management provided by the first or second aspect of embodiments of the present invention.
Embodiments of the present invention provide a computer program product, which includes a computer program, and when the computer program is executed by a processor, the method for managing a remote server provided in the first aspect or the second aspect of the embodiments of the present invention is implemented.
Fig. 6 illustrates an exemplary system architecture 600 of a method of remote server management or an apparatus of remote server management to which embodiments of the present invention may be applied.
As shown in fig. 6, the system architecture 600 may include terminal devices 601, 602, 603, a network 604, a server 605, and remote servers 606, 607, 608. Network 604 is the medium used to provide communications links between terminal devices 601, 602, 603 and server 605, and between server 605 and remote servers 606, 607, 608. Network 604 may include various types of connections, such as wire, wireless communication links, or fiber optic cables, to name a few.
A user may use the terminal devices 601, 602, 603 to interact with the server 605 via the network 604 to receive or send messages or the like. The terminal devices 601, 602, 603 may have installed thereon various communication client applications, such as shopping applications, web browser applications, search applications, instant messaging tools, mailbox clients, social platform software, etc. (by way of example only).
The terminal devices 601, 602, 603 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 605 may be a server providing various services, such as a background management server (for example only) providing support for shopping websites browsed by users using the terminal devices 601, 602, 603. The backend management server may analyze and perform other processing on the received data such as the product information query request, and feed back a processing result (for example, target push information, product information — just an example) to the terminal device. The server 605 may receive login requests transmitted by the terminal devices 601, 602, 603 to the remote servers 606, 607, 608, check login information in the login requests, receive login data returned by the remote servers 606, 607, 608, and feed the login data back to the terminal devices 601, 602, 603 after analysis processing.
The remote servers 606, 607, 608 may be remote servers that provide various services, and for example, receive login information transmitted from the terminal apparatuses 601, 602, 603 via the server 605, analyze data such as the login information, and return the processing results such as login data to the server 605.
It should be noted that the method for managing a remote server provided in the embodiment of the present invention may be executed by the terminal devices 601, 602, and 603, or may be executed by the server 605, and accordingly, the apparatus for managing a remote server may be provided in the terminal devices 601, 602, and 603, or may be provided in the server 605.
It should be understood that the number of terminal devices, networks, and servers in fig. 6 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 7, shown is a block diagram of a computer system 700 suitable for use with a terminal device implementing an embodiment of the present invention. The terminal device shown in fig. 7 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 7, the computer system 700 includes a Central Processing Unit (CPU)701, which can perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)702 or a program loaded from a storage section 708 into a Random Access Memory (RAM) 703. In the RAM 703, various programs and data necessary for the operation of the system 700 are also stored. The CPU 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input/output (I/O) interface 705 is also connected to bus 704.
The following components are connected to the I/O interface 705: an input portion 706 including a keyboard, a mouse, and the like; an output section 707 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 708 including a hard disk and the like; and a communication section 709 including a network interface card such as a LAN card, a modem, or the like. The communication section 709 performs communication processing via a network such as the internet. A drive 710 is also connected to the I/O interface 705 as needed. A removable medium 711 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 710 as necessary, so that a computer program read out therefrom is mounted into the storage section 708 as necessary.
In particular, according to the embodiments of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program can be downloaded and installed from a network through the communication section 709, and/or installed from the removable medium 711. The computer program performs the above-described functions defined in the system of the present invention when executed by the Central Processing Unit (CPU) 701.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present invention, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present invention may be implemented by software or hardware. The described modules may also be provided in a processor, which may be described as: a processor includes a connection module, a first receiving module, and a first sending module. The names of these modules do not constitute a limitation to the modules themselves in some cases, for example, the first receiving module may also be described as "receiving login data corresponding to login information returned by the target remote server".
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to comprise: responding to a received login request sent by a foreground, and establishing session connection between the foreground and a target remote server; the login information and the target remote server are indicated in the login request; receiving login data corresponding to the login information returned by the target remote server; and converting the login data into a data stream, carrying out coding processing on the data stream according to the coding configuration of the foreground, and sending the coded data stream to the foreground so as to enable the foreground to display the coded data stream.
According to the technical scheme of the embodiment of the invention, the method for managing the remote server provided by the embodiment of the invention comprises the steps that after a background receives a login request sent by a foreground, login information and/or an authorization code in the login request are/is verified, after the verification is successful, a target remote server is matched according to the login request, so that the background establishes session connection with the foreground and the target remote server, the background receives login data returned by the target remote server based on the login information, the background converts the login data into a data stream, the data stream is returned to the foreground after the login data is coded, and the data stream is displayed by the foreground. The method of the embodiment of the invention realizes the management of the target remote server through the architecture with separated foreground and background, solves the limitations of cross-platform and software dependence, and the like, and the architecture with separated foreground and background has expansibility; the conversation is exchanged in a data flow mode, so that the interaction times of sensitive information can be reduced, and the sensitive information of the remote server is effectively prevented from being leaked; the foreground can change the coding configuration and support the setting of various character set codes, and the background can carry out coding processing on the data stream according to the changed coding configuration so as to normally display the data stream on the foreground; in addition, the method can change the remote server information in batch, and can automatically identify the operations of newly adding and modifying and the like, so that the maintenance of the remote server information is simpler and more efficient; the method can limit the management authority of the user to the remote server by configuring the role or the authorization code of the user, improve the working efficiency and improve the management capability of system service; the method supports file transmission with a remote server, including uploading or downloading to any remote path, does not limit the size of the file, and does not block the interaction between a user and the remote server; the method can enable the data returned by the remote server to be adaptive to the display window, and improves user experience.
The above-described embodiments should not be construed as limiting the scope of the invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions can occur, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (43)

1. A method of remote server management, comprising:
responding to a received login request sent by a foreground, and establishing session connection between the foreground and a target remote server; the login request indicates login information and a target remote server;
receiving login data corresponding to the login information returned by the target remote server;
and converting the login data into a data stream, performing coding processing on the data stream according to the coding configuration of the foreground, and sending the coded data stream to the foreground so as to enable the foreground to display the coded data stream.
2. The method of claim 1, wherein establishing a session connection with the foreground and target remote servers comprises:
verifying the login request, and establishing socket connection with the foreground after the verification is passed;
and matching the target remote server according to the login request, and establishing remote connection with the target remote server.
3. The method of claim 2, wherein the login request further includes an authorization code for the target remote server, and wherein verifying the login request comprises: the login information and/or the authorization code is verified.
4. The method of claim 3, wherein the login information comprises a login account, and wherein verifying the login information comprises:
checking whether the login account has the authority of logging in the target remote server, and if so, determining that the checking is passed; otherwise, the check fails.
5. The method according to claim 1, wherein after performing encoding processing on the data stream according to the encoding configuration of the foreground and sending the encoded data stream to the foreground, further comprising:
receiving the coding change message sent by the foreground;
determining the changed code configuration of the foreground according to the code change message;
coding the data stream according to the changed coding configuration of the foreground to generate a coding changed data stream;
and sending the data stream with the changed codes to the foreground so that the foreground displays the data stream with the changed codes.
6. The method of claim 1, wherein after sending the encoded data stream to the foreground, further comprising:
receiving a file transmission instruction aiming at the target remote server and sent by the foreground, wherein the file transmission instruction indicates a file to be transmitted and a remote path;
and sending a file transmission request to the target remote server based on the file transmission instruction so as to enable the target remote server to transmit the file to be transmitted to the position specified by the remote path.
7. The method of claim 1, wherein prior to receiving the login request sent by the foreground, comprising: and receiving a selection instruction of the foreground to the target remote server from a remote server list, and determining the target remote server.
8. The method of claim 7, further comprising: and receiving a change request aiming at the remote server list sent by the foreground, and changing the remote server list based on the change request.
9. The method of claim 1, wherein before sending the encoded data stream to the foreground, the method comprises:
and in response to receiving the changed row and column values of the display window sent by the foreground, adjusting the row and column values in the data stream after the encoding processing according to the changed row and column values of the display window, wherein the changed row and column values of the display window are obtained by the foreground through monitoring an event indicating the change of the row and column values of the display window.
10. The method of claim 1, wherein after sending the encoded data stream to the foreground, further comprising: and when the operation instruction aiming at the target remote server sent by a foreground is not received within the preset time, disconnecting the session connection with the foreground and the remote server.
11. A method of remote server management, comprising:
sending a login request to a background so as to establish session connection with a target remote server through the background; the login request indicates login information and a target remote server;
receiving a data stream which is returned by the background and corresponds to the login information after coding processing;
wherein the data stream after the encoding process is obtained by: the background receives login data corresponding to the login information returned by the target remote server, converts the login data into a data stream, and codes the data stream according to coding configuration to obtain the coded data stream;
and displaying the data stream after the coding processing.
12. The method of claim 11, wherein sending a login request to a background to establish a session connection with a target remote server through the background comprises:
sending a login request to the background so that the background verifies the login request, and establishing socket connection with the background after the verification is passed;
and enabling the background to be matched with the target remote server according to the login request so as to enable the background to establish remote connection with the target remote server.
13. The method of claim 12, wherein the login request further includes an authorization code for the target remote server to enable a background to verify the login request, comprising: so that the background verifies the login information and/or the authorization code.
14. The method of claim 13, wherein the login information comprises a login account, such that the background verifies the login information, comprising: enabling the background to verify whether the login account has the authority of logging in the target remote server, and if so, passing the verification; otherwise, the check fails.
15. The method of claim 11, wherein after receiving the encoded data stream corresponding to the login information returned by the background, the method further comprises:
sending a code change message to the background so that the background determines the changed code configuration of the foreground according to the code change message;
enabling the background to carry out coding processing on the data stream data according to the changed coding configuration of the foreground, and then generating a coding changed data stream;
and receiving the data stream of the coding change sent by the background, and displaying the data stream of the coding change.
16. The method of claim 11, wherein after presenting the encoded data stream, further comprising:
sending a file transmission instruction aiming at the target remote server to the background, wherein the file transmission instruction indicates a file to be transmitted and a remote path;
and the background sends a file transmission request to the target remote server based on the file transmission instruction, and the target remote server transmits the file to be transmitted to the position specified by the remote path.
17. The method of claim 11, wherein prior to sending the login request to the background, comprising: and sending a selection instruction of the target remote server from a remote server list to the background so as to determine the target remote server.
18. The method of claim 17, further comprising:
sending a change request for the remote server list to the background, so that the background changes the remote server list based on the change request.
19. The method of claim 11, wherein before receiving the encoded data stream corresponding to the login information returned by the background, the method comprises:
monitoring an event indicating a change in the number of rows and columns of the display window; and sending the changed row and column numerical value of the display window to the background so that the background adjusts the row and column numerical value in the data stream after the coding processing according to the changed row and column numerical value of the display window.
20. The method of claim 11, wherein after presenting the encoded data stream, further comprising: and when the operation instruction aiming at the target remote server is not sent to the background within the preset time, the session connection with the target remote server is disconnected through the background.
21. An apparatus for remote server management, comprising:
the connection module responds to a received login request sent by a foreground and establishes session connection between the foreground and a target remote server; the login request indicates login information and a target remote server;
the first receiving module is used for receiving login data corresponding to the login information returned by the target remote server;
and the first sending module is used for converting the login data into a data stream, carrying out coding processing on the data stream according to the coding configuration of the foreground, and sending the coded data stream to the foreground so as to enable the foreground to display the coded data stream.
22. The apparatus of claim 21, wherein the first receiving module is further configured to:
verifying the login request, and establishing socket connection with the foreground after the verification is passed;
and matching the target remote server according to the login request, and establishing remote connection with the target remote server.
23. The apparatus of claim 22, wherein the login request further includes an authorization code for the target remote server, and wherein the first receiving module is further configured to: the login information and/or the authorization code is verified.
24. The apparatus of claim 23, wherein the login information comprises a login account, and wherein the first receiving module is further configured to:
checking whether the login account has the authority of logging in the target remote server, and if so, determining that the checking is passed; otherwise, the check fails.
25. The apparatus of claim 21, wherein the first sending module is further configured to: after the data stream is coded according to the coding configuration of the foreground and the coded data stream is sent to the foreground,
receiving the coding change message sent by the foreground;
determining the changed code configuration of the foreground according to the code change message;
coding the data stream according to the changed coding configuration of the foreground to generate a coding changed data stream;
and sending the data stream with the changed codes to the foreground so that the foreground displays the data stream with the changed codes.
26. The apparatus of claim 21, further comprising a first file transfer module configured to: after sending the encoded data stream to the foreground,
receiving a file transmission instruction aiming at the target remote server and sent by the foreground, wherein the file transmission instruction indicates a file to be transmitted and a remote path;
and sending a file transmission request to the target remote server based on the file transmission instruction so as to enable the target remote server to transmit the file to be transmitted to the position specified by the remote path.
27. The apparatus of claim 21, wherein the apparatus comprises a first determining module configured to: and before receiving a login request sent by a foreground, receiving a selection instruction of the foreground to the target remote server from a remote server list, and determining the target remote server.
28. The apparatus of claim 27, further comprising a first alteration module to: and receiving a change request aiming at the remote server list sent by the foreground, and changing the remote server list based on the change request.
29. The apparatus of claim 21, wherein the first sending module is further configured to: before sending the data stream after the encoding processing to the foreground,
and in response to receiving the changed row and column values of the display window sent by the foreground, adjusting the row and column values in the data stream after the encoding processing according to the changed row and column values of the display window, wherein the changed row and column values of the display window are obtained by the foreground through monitoring an event indicating the change of the row and column values of the display window.
30. The apparatus of claim 21, further comprising a first listening module configured to: after the first sending module sends the coded data stream to the foreground, when an operation instruction aiming at the target remote server and sent by the foreground is not received within a preset time, session connection with the foreground and the remote server is disconnected.
31. An apparatus for remote server management, comprising:
the second sending module is used for sending a login request to a background so as to establish session connection with the background and between the background and a target remote server; the login request indicates login information and a target remote server;
the second receiving module is used for receiving the data stream which is returned by the background and corresponds to the login information after the coding processing; wherein the data stream after the encoding process is obtained by: the background receives login data corresponding to the login information returned by the target remote server, the background converts the login data into a data stream, and the background performs coding processing on the data stream according to the coding configuration of the foreground to obtain the coded data stream;
and the display module displays the data stream after the coding processing.
32. The apparatus of claim 31, wherein the second sending module is further configured to:
sending a login request to the background so that the background verifies the login request, and establishing socket connection with the background after the verification is passed;
and enabling the background to be matched with the target remote server according to the login request so as to enable the background to establish remote connection with the target remote server.
33. The apparatus of claim 32, wherein the login request further includes an authorization code for the target remote server, and wherein the second sending module is further configured to: so that the background verifies the login information and/or the authorization code.
34. The apparatus of claim 33, wherein the login information comprises a login account, and wherein the second sending module is further configured to: enabling the background to verify whether the login account has the authority of logging in the target remote server, and if so, passing the verification; otherwise, the check fails.
35. The apparatus of claim 31, wherein the second receiving module is further configured to: after receiving the coded data stream corresponding to the login information returned by the background,
sending a code change message to the background so that the background determines the changed code configuration of the foreground according to the code change message;
enabling the background to carry out coding processing on the data stream data according to the changed coding configuration of the foreground, and then generating a coding changed data stream;
and receiving the data stream of the coding change sent by the background, and displaying the data stream of the coding change.
36. The apparatus of claim 31, further comprising a second file transfer module configured to: after presenting the encoded processed data stream,
sending a file transmission instruction aiming at the target remote server to the background, wherein the file transmission instruction indicates a file to be transmitted and a remote path;
and the background sends a file transmission request to the target remote server based on the file transmission instruction, and the target remote server transmits the file to be transmitted to the position specified by the remote path.
37. The apparatus of claim 31, further comprising a second determining module configured to: and sending a selection instruction of the target remote server from a remote server list to the background to determine the target remote server before sending a login request to the background.
38. The apparatus of claim 37, further comprising a second alteration module to: sending a change request for the remote server list to the background, so that the background changes the remote server list based on the change request.
39. The apparatus of claim 31, wherein the second sending module is further configured to: monitoring an event indicating the change of the row and column number of a display window before receiving the data stream which is returned by the background and corresponds to the login information and is subjected to encoding processing; and sending the changed row and column numerical value of the display window to the background so that the background adjusts the row and column numerical value in the data stream after the coding processing according to the changed row and column numerical value of the display window.
40. The apparatus of claim 31, further comprising a second listening module configured to: and after the display module displays the coded data stream, when an operation instruction aiming at the target remote server is not sent to the background within a preset time, the session connection with the target remote server is disconnected through the background.
41. An electronic device, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-10 or 11-20.
42. A computer-readable medium, on which a computer program is stored, which program, when being executed by a processor, is adapted to carry out the method of any one of claims 1-10 or 11-20.
43. A computer program product comprising a computer program, characterized in that the computer program realizes the method according to any of claims 1-10 or 11-20 when executed by a processor.
CN202111553133.8A 2021-12-17 2021-12-17 Method and device for remote server management Pending CN114238928A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111553133.8A CN114238928A (en) 2021-12-17 2021-12-17 Method and device for remote server management

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111553133.8A CN114238928A (en) 2021-12-17 2021-12-17 Method and device for remote server management

Publications (1)

Publication Number Publication Date
CN114238928A true CN114238928A (en) 2022-03-25

Family

ID=80758212

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111553133.8A Pending CN114238928A (en) 2021-12-17 2021-12-17 Method and device for remote server management

Country Status (1)

Country Link
CN (1) CN114238928A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117221315A (en) * 2023-11-09 2023-12-12 深圳融安网络科技有限公司 File transmission method, device, terminal equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117221315A (en) * 2023-11-09 2023-12-12 深圳融安网络科技有限公司 File transmission method, device, terminal equipment and storage medium
CN117221315B (en) * 2023-11-09 2024-02-09 深圳融安网络科技有限公司 File transmission method, device, terminal equipment and storage medium

Similar Documents

Publication Publication Date Title
CN106134160B (en) System and method for peer-to-peer communication
CN107249004B (en) Identity authentication method, device and client
US11108761B2 (en) Method, apparatus and system for remote control of intelligent device
CN113271296B (en) Login authority management method and device
CN111104675A (en) Method and device for detecting system security vulnerability
CN110839004A (en) Method and device for access authentication
CN112165480B (en) Information acquisition method and device and electronic equipment
KR20220160549A (en) Cluster access method, apparatus, electronic equipment and media
CN109450890B (en) Single sign-on method and device
US20220377064A1 (en) Method and system for managing a web security protocol
CN113438256B (en) Data transmission method, system and proxy server based on double-layer SSL
CN107634942B (en) Method and device for identifying malicious request
CN114238928A (en) Method and device for remote server management
CN112015383A (en) Login method and device
CN111726401A (en) File transmission method and device
CN111030900A (en) Authentication-free login method and device and electronic equipment
CN113055186B (en) Cross-system service processing method, device and system
EP3293924B1 (en) Message processing method and device
CN110048864B (en) Method and apparatus for authenticating an administrator of a device-specific message group
CN112825519B (en) Method and device for identifying abnormal login
CN110765445B (en) Method and device for processing request
CN112966286A (en) Method, system, device and computer readable medium for user login
CN113343155A (en) Request processing method and device
CN113760727A (en) Interface regression testing method and device
CN113763646A (en) Device control method, device, electronic device 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