0

I am in the process of writing a declarative jenkinsfile to build a pipeline project. Some of the steps within a few of the stages will require some remote commands to be run. The remote ssh sites have been configured in the main jenkins configuration.

How can I declare these steps within my jenkinsfile? I know I can run shell commands locally using sh but it's the remote servers that i need to know about?

Rob Barnes
  • 23
  • 6

1 Answers1

0

You need to install ssh-agent plugin then you will be able to execute remote commands using ssh. Check this for examples

slashpai
  • 1,141
  • 7
  • 12