alpacon websh
This command either opens a websh terminal for interacting with the specified server or executes a specified command directly on the server. It provides a terminal interface for managing and controlling the server remotely or for executing commands and retrieving their output directly. For executing commands, it is highly recommended to wrap the entire command string in quotes to ensure it is interpreted correctly on the remote server.
alpacon websh [flags] [SERVER NAME] [COMMAND]
Options
  -h, --help   help for websh
Flags
User and group control
-r- Run the websh terminal as the root user-u, --username [USER_NAME]- Specify the username under which the command should be executed-g, --groupname [GROUP_NAME]- Specify the group name under which the command should be executed
Environment variables
--env="KEY=VALUE"- Set the environment variable ‘KEY’ to ‘VALUE’ for the command--env="KEY"- Use the current shell’s value for the environment variable ‘KEY’
Session sharing
-s, --share- Share the current terminal to others via a temporary link--url [SHARED_URL]- Specify the URL of the shared session to join-p, --password [PASSWORD]- Specify the password required to access the shared session--read-only [true|false]- Set the shared session to read-only mode (default is false)
Note: All flags must be placed before the [SERVER_NAME].
Examples
Open a websh terminal
Open a websh terminal for a server:
alpacon websh [SERVER_NAME]
Open as root user:
alpacon websh -r [SERVER_NAME]
alpacon websh -u root [SERVER_NAME]
Open with specific user and group:
alpacon websh -u [USER_NAME] -g [GROUP_NAME] [SERVER_NAME]
Execute commands
Execute a command directly on a server:
alpacon websh [SERVER_NAME] [COMMAND]
Run a command as specific user/group:
alpacon websh -u [USER_NAME] -g [GROUP_NAME] [SERVER_NAME] [COMMAND]
Environment variables
Set environment variables for the command:
alpacon websh --env="KEY1=VALUE1" --env="KEY2=VALUE2" [SERVER NAME] [COMMAND]
Use current shell’s environment variable:
alpacon websh --env="KEY" [SERVER NAME] [COMMAND]
Share terminal session
Share the current terminal:
alpacon websh [SERVER NAME] --share
alpacon websh [SERVER NAME] --share --read-only true
Join an existing shared session:
alpacon websh join --url [SHARED_URL] --password [PASSWORD]