Execute SSH commands on a remote server
step
Executes a series of SSH commands directly on a remote server.
Specification
username
Required
string
Username to use
port
Optional
number
Port to use
knownHosts
Optional
string
An SSH known_hosts file to use for host key checking
strictHostKeyChecking
Optional
boolean
Whether or not to check the host key against known_hosts
on[]
Required
array
An array of hosts to loop over and perform input commands on
input[]
Required
array
An array of commands to run on each host
Example step configuration
name: ssh
image: relaysh/ssh-step-exec
spec:
connection: ${connections.ssh.my-ssh-connection}
username: ${parameters.username}
port: 22
knownHosts: >
${secrets.knownHosts}
on:
- ${parameters.hostname}
input:
- ${parameters.command}