Jenkins configures remote server SSH Server process

Note: Using Alibaba Cloud lightweight application server, this article introduces how to configure the remote server in Jenkins. For Jenkins installation, refer to this article ;

Step 1: Start the service

First, start the Jenkins container, enter the Jenkins management background, and click 系统配置;

Insert image description here

Step 2: Configure SSH Server

After entering the system settings, scroll to the bottom, find Publish over SSHthe configuration, and fill in the SSH Server information: set a service name, IP address, and user name;

Insert image description here

Step 3: Fill in the password and secret key

Check the box below Use password authentication, or user a different keyand fill in the cloud server password and server secret key;

Insert image description here

Step 4: Get the secret key

I have read many articles saying that this secret key is set in the server. Actually no, this secret key is obtained from the console of the cloud service. For example, mine is Alibaba Cloud, find the server 控制台->远程链接->秘钥管理, and find your own key fingerprint;

Insert image description here

This is downloaded at the beginning of the setup. If you forgot to download it or don’t know where to put it after downloading it, you can delete it and reset it. After downloading, it will be a .pem file;

Insert image description here

Open it with an editor and the content is as follows:

Insert image description here

Copy this to jenkins;

Step 5: Test

After the setting is completed, click below Test configurationand test to see if it can pass. If it appears, it Successmeans success;

Insert image description here

Guess you like

Origin blog.csdn.net/qq_42108331/article/details/132446589