- https://github.com/jenkinsci/ssh-steps-plugin
- Type: repo
- Source: GitHub · jenkinsci · Apache-2.0 (plugins.jenkins.io/ssh-steps)
TL;DR
The SSH Steps plugin gives Jenkins pipelines sshCommand, sshScript, sshPut, sshGet and sshRemove to run commands and move files on remote hosts.
What it does
Each step takes a remote map with name, host, user and one of password, identity or identityFile, plus optional port (default 22), knownHosts or allowAnyHosts, timeoutSec, retryCount, fileTransfer (sftp or scp), proxy/gateway and logging settings.
Key takeaways
- Run a command:
sshCommandreturns output and supportssudo,failOnErroranddryRun. - Run a script from the workspace with
sshScript(no arguments). - Copy files:
sshPutuploads andsshGetdownloads files or directories with optional filters;sshRemovedeletes. - Keep keys out of the script: bind a
sshUserPrivateKeycredential withwithCredentialsintoremote.userandremote.identityFile. - Mind host keys:
allowAnyHostsskips verification, so preferknownHostsin production.
Tools and concepts
| Item | Role in the page |
|---|---|
| Jenkins | Host for the plugin |
| Linux | Typical remote targets |
| Security | Credentials binding and host-key checking |
When to use
- When a pipeline must deploy or run commands over SSH.
- When you need the
remotemap options (timeouts, retries, scp vs sftp). - When binding private keys securely in a Jenkinsfile.
Caveats
- The page lists no release versions; check the plugin index for the current one.
Jenkins Linux DevOps Jenkins running multiple steps Jenkins pipeline Syntax