Skip to main content
Version: current

ssh-exec


system/ssh-exec

Type: Command

The ssh-exec command is a non-interactive SSH command, allowing you to execute commands remotely on a device through scripts and scheduler.

ArgumentTypeDescription
addressalt { ip: ipAddr , ipv6-address: composite { ip6: ip6Addr , interface: [ iface_enum] } }Remote host IPv4 or IPv6 address.
commandstringRemote command to execute.
userstringUsername for the remote host.
passwordstringPassword for the remote host. You should use SSH PKI authentication instead of plain text passwords.
portnum
src-addressalt { ip: ipAddr , ip6: ip6Addr }Source address to use when connecting. Supports both IPv4 and IPv6.
vrfenum
output-to-filestringWrite output to file instead of 'output' variable.
Read-only ArgumentTypeDescription
exit-codenumReturns 0 if the command execution succeeded.
outputstringReturns the output of the remotely executed command.