Este conteúdo não está disponível no idioma selecionado.
2.3. Running the CLI
Start the CLI application with the following command:
Copy to Clipboard
Copied!
Toggle word wrap
Toggle overflow
rhsc-shell
# rhsc-shell
The
rhsc-shell application is an interactive shell for Red Hat Storage Console.
Users connect automatically to Red Hat Storage Console using the following additional options.
Copy to Clipboard
Copied!
Toggle word wrap
Toggle overflow
rhsc-shell -c -l "https://[server]/api" -P [port] -u "[user@domain]" -A "[certificate]"
# rhsc-shell -c -l "https://[server]/api" -P [port] -u "[user@domain]" -A "[certificate]"
Replace the following values:
server- The hostname or IP address of the Red Hat Storage Console. The CLI connects to the Red Hat Storage Console via the REST API.user@domain- The user name and directory service domain for the user logging into Red Hat Storage Console.certificate- The path of the Certificate Authority file.
The shell will prompt you for the password, and, if not already provided, the username and the URL for the Red Hat Storage Console.
Note
The certificate is the only mandatory option; the other options used in this example will be prompted by the shell. Also, instead of specifying the certificate, you can use the
--insecure option to connect without a certificate. However, this is not recommended as it may allow man-in-the-middle (MITM) attackers to spoof the identity of the server.
| Command Options | Description |
|---|---|
| -h, --help | Show help for rhsc-shell. |
| -d, --debug | Enables debugging. |
| -l URL, --url=URL | Specifies the API entry point URL. |
| -u USERNAME, --username=USERNAME | Connect as this user. |
| -K KEY_FILE, --key-file=KEY_FILE | Specify key file. |
| -C CERT_FILE, --cert-file=CERT_FILE | Specify certificate file. |
| -A CA_FILE, --ca-file=CA_FILE | Specify server Certificate Authority file. |
| -I, --insecure | Allow the CLI to connect via SSL without certification. This option should be used with caution, as it may allow man-in-the-middle (MITM) attackers to spoof the identity of the server. |
|
-F, --filter
| Enable filtering based upon user permissions. |
| -P PORT, --port=PORT | Specify port. |
| -T TIMEOUT, --timeout=TIMEOUT | Specify timeout. |
-c, --connect | Automatically connect. |
|
-f FILE, --file=FILE
| Read commands from FILE instead of stdin. |
Note
Although users can use the
--file option to call a file that includes their password information, this practice is not recommended for security reasons. Users with a non-interactive shell can connect to the Red Hat Storage Console from within the shell, where the --password option can be used.