GithubHelp home page GithubHelp logo

ssh-agent-plugin11's Introduction

SSH Agent Plugin

This plugin allows you to provide SSH credentials to builds via a ssh-agent in Jenkins.

This is convenient in some cases. Alternately, you can use the generic withCredentials step to bind an SSH private key to a temporary file and then pass that to commands that require it, for example using the -i option to ssh or scp.

Requirements

You need to have the ssh-agent executable installed on the agent.

Configuring

First you need to add some SSH Credentials to your instance:

Jenkins | Manage Jenkins | Manage Credentials

Note that only Private Key based credentials can be used.

Then configure your build to use the credentials:

And then your build will have those credentials available, e.g.

From a Pipeline job, use the sshagent step.

Jenkinsfile

      steps {
          sshagent(credentials: ['ssh-credentials-id']) {
            sh '''
                [ -d ~/.ssh ] || mkdir ~/.ssh && chmod 0700 ~/.ssh
                ssh-keyscan -t rsa,dsa example.com >> ~/.ssh/known_hosts
                ssh [email protected] ...
            '''
          }
      }

Version History

For new versions, see GitHub releases.

For old versions, see the old changelog.

ssh-agent-plugin11's People

Contributors

stephenc avatar jglick avatar recena avatar rantoniuk avatar mramonleon avatar onyimatics avatar kuisathaverat avatar pldi23 avatar mi-la avatar mcsage avatar warden avatar janvrany avatar alecharp avatar seryl avatar kohsuke avatar dependabot[bot] avatar ydubreuil avatar oleg-nenashev avatar jonsten avatar daniel-beck avatar alvarolobato avatar armfergom avatar daniel-beck-bot avatar duemir avatar iwarapter avatar jtnord avatar jeffromf avatar ndeloof avatar pboos avatar thomasgl-orange avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.