Summary of the invention
The shortcoming of prior art in view of the above, the object of the present invention is to provide a kind of method of testing and system of carrying out debarkation authentication based on SSH agreement, manually carrying out debarkation authentication test for solving in prior art, complex operation, inefficient problem.
For achieving the above object and other relevant objects, the invention provides a kind of method of testing of carrying out debarkation authentication based on SSH agreement, for subscriber equipment, comprise the following steps: generate logon information pair according to the create-rule preset, and at least one logon information of described logon information centering is sent to equipment under test, preserved for described equipment under test; Based on SSH agreement, at least another logon information of described logon information centering is sent to described equipment under test, perform the right authentication test program of corresponding described logon information for described equipment under test; Obtain the detecting information that described equipment under test performs authentication test program.
Preferably, the described create-rule according to presetting generates the right mode of logon information and comprises: according to the order of the right create-rule of each logon information of correspondence preset, generate corresponding logon information pair successively.
Preferably, also comprise: in obtained detecting information, comprise abnormal information, send halt instruction to described equipment under test.
Based on above-mentioned purpose, present invention also offers a kind of method of testing of carrying out debarkation authentication based on SSH agreement, for equipment under test, comprise: obtain and preserve at least one logon information of the logon information centering generated from subscriber equipment, and based on obtained logon information to determining corresponding authentication test program; Obtain logon information centering at least another logon information generated from described subscriber equipment, and perform determined authentication test program and the detecting information recorded in implementation; Described detecting information is fed back to described subscriber equipment.
Preferably, described mode detecting information being fed back to described subscriber equipment comprises: real-time feeds back to described subscriber equipment by recorded detecting information, and stops performing described authentication test program based on the halt instruction from described subscriber equipment; Or, based on the abnormal information in recorded detecting information, stop performing described authentication test program, and current recorded detecting information fed back to described subscriber equipment.
Based on above-mentioned purpose, the present invention also provides a kind of subscriber equipment for testing based on the debarkation authentication of SSH agreement, comprising: generating process module automatically, for generating logon information pair according to the create-rule preset; First communication module, at least one logon information of described logon information centering being sent to equipment under test based on SSH agreement, is preserved for described equipment under test; And at least another logon information of described logon information centering is sent to described equipment under test, perform the right authentication test program of corresponding described logon information for described equipment under test, and obtain the detecting information that described equipment under test performs authentication test program.
Preferably, described first communication module also comprises abnormal information for working as in obtained detecting information, sends halt instruction to described equipment under test.
Preferably, described automatic generating process module is used for, according to the order of the right create-rule of each logon information of correspondence preset, generating corresponding logon information pair successively.
Based on above-mentioned purpose, the present invention also provides a kind of equipment under test for testing based on the debarkation authentication of SSH agreement, comprising: second communication module, for obtaining and preserving at least the first logon information of the logon information centering generated from subscriber equipment; Test module, for based on obtained logon information to determining corresponding authentication test program; Described second communication module is also for obtaining logon information centering second logon information generated from described subscriber equipment; Described test module, also for performing determined authentication test program and the detecting information recorded in implementation; Described second communication module is also for feeding back to described subscriber equipment by described detecting information.
Preferably, also comprise: stopping modular; Recorded detecting information is fed back to described subscriber equipment for real-time by described stopping modular, and stops performing described authentication test program based on the halt instruction from described subscriber equipment; Or described stopping modular is used for based on the abnormal information in recorded detecting information, stops performing described authentication test program, and current recorded detecting information is fed back to described subscriber equipment.
Based on above-mentioned purpose, the present invention also provides a kind of system for testing based on the debarkation authentication of SSH agreement, comprising: as above arbitrary described subscriber equipment, and as above arbitrary described equipment under test.
As mentioned above, method of testing and system of carrying out debarkation authentication based on SSH agreement of the present invention, there is following beneficial effect: by automatically generating logon information pair, tester can be convenient to and carry out batch testing, without the need to manual operation, thus avoid the shortcomings such as the testing efficiency manually participating in bringing is low, error rate is high; In addition, when detecting information occurs abnormal, stop test in time, be conducive to tester and process in time; Further, test according to default debarkation authentication order, can be consistent with actual operation, be conducive to by test result for true traffic-operating period provides data supporting.
Embodiment
Below by way of specific instantiation, embodiments of the present invention are described, those skilled in the art the content disclosed by this instructions can understand other advantages of the present invention and effect easily.The present invention can also be implemented or be applied by embodiments different in addition, and the every details in this instructions also can based on different viewpoints and application, carries out various modification or change not deviating under spirit of the present invention.It should be noted that, when not conflicting, the feature in following examples and embodiment can combine mutually.
It should be noted that, the diagram provided in following examples only illustrates basic conception of the present invention in a schematic way, then only the assembly relevant with the present invention is shown in graphic but not component count, shape and size when implementing according to reality is drawn, it is actual when implementing, and the kenel of each assembly, quantity and ratio can be a kind of change arbitrarily, and its assembly layout kenel also may be more complicated.
Refer to Fig. 1, the invention provides a kind of method of testing of carrying out debarkation authentication based on SSH agreement.Described method of testing performs primarily of subscriber equipment and equipment under test.Wherein, described subscriber equipment is connected by network serial line interface with equipment under test.Wherein, prestored the authentication test program of corresponding various debarkation authentication in equipment under test.Test for the ease of the functions such as verification process under the verification process to described equipment under test, large traffic environment and performance, this method performs following steps:
In step sl, described subscriber equipment generates logon information pair according to the create-rule preset, and at least one logon information of described logon information centering is sent to equipment under test.
Wherein, described create-rule is relevant to the verification process that will test.Such as, the verification process that test comprises: user name cipher authentication test, then described create-rule be according to preset user name length and Password Length stochastic generation user name, password rule.And for example, the verification process that test comprises: key authentication is tested, then described create-rule is the rule that the key generator selecting to preset generates PKI, private key.For another example, the verification process that test comprises: key authentication test and version authentication test, then described create-rule comprises: select the key generator preset to generate PKI and private key, and generate the rule of version number.Wherein, described key generator comprises: puttygen instrument etc.
A create-rule selected by tester or the create-rule of multiple selected order, described subscriber equipment generates at least one logon information pair.Wherein, described logon information is to comprising: username and password to and/or PKI and private key equity.
Also according to generated logon information pair, at least one logon information is wherein sent to equipment under test.
Such as, described PKI to being PKI and private key pair, is then sent to equipment under test by described logon information.
And for example, described username and password to being username and password pair, is then all sent to described equipment under test by described logon information.
At this, for the ease of equipment under test selective authenticate test procedure, corresponding logon information type also uploaded by described subscriber equipment when uploading each logon information.Wherein, described logon information type comprises: password type and Key Tpe.
Described subscriber equipment by serial line interface by described logon information to sending to described equipment under test.
Preferably, described subscriber equipment can the multiple debarkation authentication of follow-on test.So, in this step, described subscriber equipment according to the order of the right create-rule of each logon information of correspondence preset, can also generate corresponding logon information pair, and at least one logon information of each generated logon information centering is sent to equipment under test successively.After described equipment under test and described subscriber equipment perform follow-up step S2-S5, then send at least one logon information of logon information centering of follow-up generation.By that analogy, until complete the test of all debarkation authentications.
In step s 2, described equipment under test preserves at least one logon information of the logon information centering generated from subscriber equipment, and based on obtained logon information to determining corresponding authentication test program.
Particularly, described equipment under test determines corresponding authentication test program by least one analyzed in the form of described logon information, quantity and the log-on message type that obtains.Such as, the logon information obtained is text formatting, then determine that corresponding authentication test program is cipher authentication test procedure.The quantity of the logon information obtained is two, then determine that corresponding authentication test program is key authentication test procedure.
In step s3, at least another logon information of described logon information centering is sent to described equipment under test based on SSH agreement by described subscriber equipment.
Particularly, described subscriber equipment now starts to carry out debarkation authentication test, simulates normal user's landfall process, and the logon information of transmission required when logging in is sent to described equipment under test.Such as, described subscriber equipment utilizes SSH agreement that username and password is all sent to equipment under test, then described equipment under test performs step S4.
In step s 4 which, described equipment under test performs determined authentication test program and the detecting information recorded in implementation.
Particularly, described equipment under test performs determined authentication test program, and according to the log recording point in described authentication test program, record test process and test result.Wherein, described test process includes but not limited to: other test processs etc. that will check that normal stage detecting information, abnormal stage detecting information, tester preset.Described test result includes but not limited to: whether test success ratio, test are passed through.
In step s 5, the detecting information comprising test process and test result is fed back to described subscriber equipment by described equipment under test.So, tester can direct checkout information on a user device.
In order to provide the detecting information with abnormality test situation in time, described equipment under test is feedback test information in the following ways.
1) real-time recorded detecting information is fed back to described subscriber equipment, and stop performing described authentication test program based on the halt instruction from described subscriber equipment.
Particularly, what described equipment under test was real-time feeds back to subscriber equipment by recorded new detecting information, is resolved by described subscriber equipment, if when to be resolved to received detecting information be abnormal information, then send halt instruction.Described equipment under test, based on described halt instruction, stops continuing to perform corresponding authentication test program.
2) described equipment under test is based on the abnormal information in recorded detecting information, stops performing described authentication test program, and current recorded detecting information is fed back to described subscriber equipment.
Particularly, described equipment under test, in the process of record detecting information, detects the mark with abnormal information, monitors abnormal information if detect, then detect that the detecting information between abnormal information is preserved by from execution authentication test program large-size screen monitors, and stop the execution of corresponding authentication test program.Again obtained detecting information is sent to subscriber equipment.Thus, tester obtains the ruuning situation of authentication test program by monitor user ' equipment.
Refer to Fig. 2, the present invention also provides a kind of system of carrying out debarkation authentication test based on SSH agreement.Described test macro comprises: subscriber equipment and equipment under test.Wherein, described subscriber equipment is connected by network serial line interface with equipment under test.Wherein, prestored the authentication test program of corresponding various debarkation authentication in equipment under test.Test for the ease of the functions such as verification process under the verification process to described equipment under test, large traffic environment and performance, described subscriber equipment 1 comprises: generating process module 11, first communication module 12 automatically; Described equipment under test 2 comprises: second communication module 21 and test module 22.
Described automatic generating process module 11 is for generating logon information pair according to the create-rule preset.
Wherein, described create-rule is relevant to the verification process that will test.Such as, the verification process that test comprises: user name cipher authentication test, then described create-rule be according to preset user name length and Password Length stochastic generation user name, password rule.And for example, the verification process that test comprises: key authentication is tested, then described create-rule is the rule that the key generator selecting to preset generates PKI, private key.For another example, the verification process that test comprises: key authentication test and version authentication test, then described create-rule comprises: select the key generator preset to generate PKI and private key, and generate the rule of version number.Wherein, described key generator comprises: puttygen instrument etc.
A create-rule selected by tester or the create-rule of multiple selected order, described subscriber equipment 1 generates at least one logon information pair.Wherein, described logon information is to comprising: username and password to and/or PKI and private key equity.
Also according to generated logon information pair, at least one logon information is wherein passed to described first communication module 12, so that it is sent to equipment under test 2.
Such as, described PKI to being PKI and private key pair, is then sent to equipment under test 2 by described logon information.
And for example, described username and password to being username and password pair, is then all sent to described equipment under test 2 by described logon information.
At this, for the ease of equipment under test 2 selective authenticate test procedure, described automatic generating process module 11 also uploads corresponding logon information type when uploading each logon information.Wherein, described logon information type comprises: password type and Key Tpe.
Described first communication module 12 by serial line interface by described logon information to sending to described equipment under test 2.
Preferably, described subscriber equipment 1 can the multiple debarkation authentication of follow-on test.So the order of the create-rule that described automatic generating process can also be right according to each logon information of correspondence preset, generates corresponding logon information pair successively, and at least one logon information of each generated logon information centering is sent to equipment under test 2.After each module in described equipment under test 2 with described subscriber equipment 1 executes and once tests, described automatic generating process module 11 sends at least one logon information of the logon information centering of follow-up generation again by described first communication module 12.By that analogy, until complete the test of all debarkation authentications.
Described second communication module 21 is for preserving at least one logon information of the logon information centering provided from described first communication module 12.
Described test module 22 for based on obtained logon information to determining corresponding authentication test program.
Particularly, described test module 22 determines corresponding authentication test program by least one analyzed in the form of described logon information, quantity and the log-on message type that obtains.Such as, the logon information obtained is text formatting, then determine that corresponding authentication test program is cipher authentication test procedure.The quantity of the logon information obtained is two, then determine that corresponding authentication test program is key authentication test procedure.
Described first communication module 12 is also for sending to described equipment under test 2 based on SSH agreement by least another logon information of described logon information centering.
Particularly, described first communication module 12 now starts to carry out debarkation authentication test, simulates normal user's landfall process, and the logon information of transmission required when logging in is sent to described equipment under test 2.Such as, described first communication module 12 utilizes SSH agreement that username and password is all sent to equipment under test 2, then the test module 22 in described equipment under test 2 continues to perform.
Described test module 22 is also for performing determined authentication test program and the detecting information recorded in implementation.
Particularly, described test module 22 performs determined authentication test program, and according to the log recording point in described authentication test program, record test process and test result.Wherein, described test process includes but not limited to: other test processs etc. that will check that normal stage detecting information, abnormal stage detecting information, tester preset.Described test result includes but not limited to: whether test success ratio, test are passed through.
Described second communication module 21 is also for feeding back to described subscriber equipment 1 by the detecting information comprising test process and test result.So, tester can direct checkout information on subscriber equipment 1.
In order to provide the detecting information with abnormality test situation in time, described equipment under test 2 also comprises: stopping modular.(not giving diagram)
Described stopping modular be used to indicate described second communication module 21 real-time recorded detecting information is fed back to described subscriber equipment 1, and based on from described subscriber equipment 1 halt instruction stop perform described authentication test program.
Particularly, described stopping modular indicate described second communication module 21 real-time recorded new detecting information is fed back to subscriber equipment 1, resolved by the analysis module (not giving diagram) in described subscriber equipment 1, if when to be resolved to received detecting information be abnormal information, then send halt instruction.Described stopping modular, based on described halt instruction, stops continuing to perform corresponding authentication test program.
Described stopping modular is used for based on the abnormal information in recorded detecting information, stops performing described authentication test program, and current recorded detecting information is fed back to described subscriber equipment 1.
Particularly, described stopping modular, in the process of record detecting information, detects the mark with abnormal information, monitors abnormal information if detect, then detect that the detecting information between abnormal information is preserved by from execution authentication test program large-size screen monitors, and stop the execution of corresponding authentication test program.Again obtained detecting information is sent to subscriber equipment 1.Thus, tester obtains the ruuning situation of authentication test program by monitor user ' equipment 1.
In sum, the present invention, by automatically generating logon information pair, can be convenient to tester and carry out batch testing, without the need to manual operation, thus avoid the shortcomings such as the testing efficiency manually participating in bringing is low, error rate is high; In addition, when detecting information occurs abnormal, stop test in time, be conducive to tester and process in time; Further, test according to default debarkation authentication order, can be consistent with actual operation, be conducive to by test result for true traffic-operating period provides data supporting.So the present invention effectively overcomes various shortcoming of the prior art and tool high industrial utilization.
Above-described embodiment is illustrative principle of the present invention and effect thereof only, but not for limiting the present invention.Any person skilled in the art scholar all without prejudice under spirit of the present invention and category, can modify above-described embodiment or changes.Therefore, such as have in art usually know the knowledgeable do not depart from complete under disclosed spirit and technological thought all equivalence modify or change, must be contained by claim of the present invention.