Log in to the server with the secret key and execute the shell script

When doing automation, sometimes it is inevitable to interact with the server. It happens that a project needs to execute commands to complete this test.

What I met yesterday was in the form of secret key. There were only secret key and user name. Baidu had no idea after looking for it for a long time (it was easier to log in to the server with account and password). Later, I saw a blog post and was inspired to change his code again and again. The result was really good

The code is as follows:

If you think it is helpful to you and solves your problem, please raise your rich hand and praise me in the comments...

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>