Skip to main content
Version: 7.26

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.
portnumTCP port the SSH server listens on. Default: 22.
known-hosts-ignoreboolskip host key validation
src-addressalt { ip: ipAddr , ip6: ip6Addr }Source address to use when connecting. Supports both IPv4 and IPv6.
vrfenumVRF to run the command over; the connection is made inside that routing table.
output-to-filestringWrite output to file instead of 'output' variable.
Read-only ArgumentTypeDescription
exit-codenumExit code reported by the remote command shell; 0 when the command ran. A connection or authentication failure aborts ssh-exec itself instead of returning.
outputstringReturns the output of the remotely executed command.