The instance-bash command is used to execute a bash/ash script on an Instances-cn, Instances-vm, or Instances-xvm machine via an SSH connection.

JSON Input Data Format
{
    "id": string,
    "ip": string,
    "port", integer,
    "username": string,
    "password": string,
    "script": string
}
id * Specifies the ID of the instance where the bash script will be executed.
ip * Specifies the IP address of the instance where the bash script will be executed.
port * Specifies the SSH port number for the connection.
username * Specifies the SSH user name for the connection.
password * Specifies the SSH user password for the connection.
script * Specifies the contents of the bash script.
* Indicates a mandatory field.

Code Snippets
Here are several code snippets provided for your direct use. Simply select your preferred tool/language by clicking on it.


Successful Response
{
    "result": "OK",
    "payload": "...the outpur of the command..."
}

Failed Response
{
    "result": "ERR",
    "message": "Error message ..."
}