Execute a command directly on a remote server, in a service, or in a existing container. To do this it:
- Opens the firewall for SSH from your IP address temporarily (20 minutes)
- Starts a SSH session
- Executes the command specified and returns its output.
You need to add your public (local) SSH key to your Cloud 66 account before running this command. You also need to have “shell to server” rights on the application to use this command.
You can use either the server name (e.g.
lion) or the server IP (e.g.
18.104.22.168) or the server role (e.g.
web). If a role is specified the command will connect to the first server with that role.
This command is only supported on Linux and OS X clients (for Windows you can run this in a virtual machine if necessary)
$ cx run --stack <application name> [--server <server name> | <IP address>] [--service <service name>] [--container <container name>] [--interactive] '<commands>'