Published August 04, 2018 by

Send build artifacts over SSH in Jenkins

In this tutorial, we learn how to send build artifacts over SSH in a remote server in Jenkins.

Install the Plugin

Install 'Publish Over SSH Plugin' at Plug-in page.

Configure

1. Click Manage Jenkins in the sidebar then Configure System


2. Go to Publish over SSH section Click Add at SSH Servers


3. Enter any logical name to Name Enter IP Address or Hostname of the server to Hostname Enter the username to login to Username Enter any directory to Remote Directory where all the files are stored


4. Click Save at bottom of the page


Configuration in Job

In Jenkins Job Scroll down to the Build option and Add build step.

Select Send files or execute commands over SSH

Enter Source files path if you are writing*/ then Jenkins consider current job workspace 

Enter Exec command which you want to run on a remote server.


Click Save.

Run Job

Click Build Now