Send a command to a remote server using SSH.
type: "io.kestra.plugin.fs.ssh.Command"
Run SSH command using password authentication
id: fs_ssh_command
namespace: company.team
tasks:
- id: command
type: io.kestra.plugin.fs.ssh.Command
host: localhost
port: "22"
authMethod: PASSWORD
username: foo
password: pass
commands:
- ls
Run SSH command using public key authentication (must be an OpenSSH private key)
id: fs_ssh_command
namespace: company.team
tasks:
- id: command
type: io.kestra.plugin.fs.ssh.Command
host: localhost
port: "22"
authMethod: PUBLIC_KEY
username: root
privateKey: "{{ secret('SSH_RSA_PRIVATE_KEY') }}"
commands:
- touch kestra_was_here
Run SSH command using the local OpenSSH configuration
id: ssh
namespace: company.team
tasks:
- id: ssh
type: io.kestra.plugin.fs.ssh.Command
authMethod: OPEN_SSH
useOpenSSHConfig: true
host: localhost
password: pass.
commands:
- echo "Hello World"
YES
1
The list of commands to run on the remote server
NO
false
Enable the disabled by default RSA/SHA1 algorithm
YES
PASSWORD
PASSWORD
PUBLIC_KEY
OPEN_SSH
Authentication method
YES
Environment variables to pass to the SSH process.
YES
Hostname of the remote server
YES
~/.ssh/config
OpenSSH configuration directory in case the authentication method is OPEN_SSH
.
YES
Password on the remote server, required for password auth method
YES
22
Port of the remote server
YES
Private SSH Key to authenticate, required for pubkey auth method
YES
Passphrase used in order to unseal the private key, optional for pubkey auth method
YES
no
Whether to check if the host public key could be found among known host, one of 'yes', 'no', 'ask'
YES
Username on the remote server, required for password auth method
NO
Not used anymore, will be removed soon
0
The exit code of the entire flow execution.
The output files' URIs in Kestra's internal storage.
The value extracted from the output of the executed commands
.