ssh-agent-plugin | plugin allows you to provide SSH credentials | SSH Utils library
kandi X-RAY | ssh-agent-plugin Summary
kandi X-RAY | ssh-agent-plugin Summary
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.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Check to see if there are any private keys in the build
- Create an SSHAgentEnvironment
- Gets the credentials
- Returns a description of a standard username
- Initialize the agent
- Returns true if not found
- Initialize a SSH agent
- Get the credentials for the user
- Parse the ssh - agent output
- Parses the output from the ssh - agent output
- Add an identity to the agent
- Creates a script to delete the ssh_ASKPASSphrase
- Clean up the SSHAgent
- Purges all existing sockets
- Checks if ssh - agent is installed
- Start the remote agent
- Gets the value of the credential holders
- Stops the build
- Resolves legacy data format
- Gets the user id
- Stops ssh - agent command
ssh-agent-plugin Key Features
ssh-agent-plugin Examples and Code Snippets
steps {
sshagent(credentials: ['ssh-credentials-id']) {
sh '''
[ -d ~/.ssh ] || mkdir ~/.ssh && chmod 0700 ~/.ssh
ssh-keyscan -t rsa,dsa example.com >> ~/.ssh/known_hosts
Community Discussions
Trending Discussions on ssh-agent-plugin
QUESTION
I am using SSH Agent Plugin version 1.17 with Jenkins version 2.190.3
When I create credentials using Jenkins -> Credentials -> System -> Global credentials (unrestricted) -> Add Credentials
But when I create jenkins job type Freestyle project, I don't see credentials in ssh agent drop down.
Please advise what I am missing
Ref:
https://wiki.jenkins.io/display/JENKINS/SSH+Agent+Plugin
https://support.cloudbees.com/hc/en-us/articles/360029470091-How-to-use-the-SSH-Agent-Plugin
Jenkins plugin ssh-agent showing "ERROR: Failed to run ssh-add"
Update:
Issue is open for credentials (username/password) https://issues.jenkins-ci.org/browse/JENKINS-59807 but good thing is that it works with private key :)
...ANSWER
Answered 2020-Jan-07 at 20:59You have to select Kind as SSH Username with private key
to be able to specific use credentials in ssh agent:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install ssh-agent-plugin
You can use ssh-agent-plugin like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the ssh-agent-plugin component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page