SSH plugin and SSH remote hosts configuration in Jenkins

Source: Internet
Author: User
Tags ssh ssh server

When building in Jenkins, you may need to ssh into a remote server to execute the necessary scripts before you perform the build. At this point, you need to install SSH Plugin and configure the following.

1. Install SSH Plugin in the Jenkins interface, System management, management plug-ins

Description, the purpose of SSH plugin is to support SSH to the remote server, and then execute the shell command.

2. In the Jenkins interface, the System Management->configure (config)->ssh remote hosts

Configure the server information for the remote connection to SSH, as shown in the following example: Hostname:ssh server address port:22 user name: Login username password/passphrase: login password


3. In the Jenkins interface, configure a job-> in the "Build environment" area tick execute shell script on remote host using SSH and make the following necessary settings:
SSH site: Select the SSH Pre build script set in step 2: scripts to be executed before building, such as./pre_test.sh Post Build script: Scripts to be executed after build, such as export paht=/root




Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.