Skip to content

Understanding return codes from the vSSH CLI

Atanas Chuchev edited this page Sep 12, 2022 · 3 revisions

Apache 2.0 License Community Supported Compatible with TPP 21.4+
To report a problem or share an idea, use Issues; and if you have a suggestion for fixing the issue, please include those details, too. Got questions or want to discuss something with our team? Join us on Slack!

Understanding return codes from the vSSH CLI

The return code is code sent after running a vSSH CLI command which describes the status of the command. You can use the echo command to display the code sent from the last vSSH CLI command and use these codes to determine if a command was successful or if it failed, and why a command may have an error. In addition to the return codes, you can view more details about a failure by running your commands when passing --debug flag. This will produce a detailed report of the steps the vSSH CLI uses to process the command, and what the result of each step was.

To determine the return code of an vSSH CLI command, run one of the following commands immediately after running the CLI command.

Linux and macOS

$ echo $?
0

Windows PowerShell

PS> echo $lastexitcode
0

Windows Command Prompt

C:\> echo %errorlevel%
0

The following are the return code values that can be returned at the end of running an vSSH CLI command.

Code Description
0 Indicates that there were no errors generated by the vSSH CLI and Venafi service the request was sent to.
1 The command failed. There were errors generated by the vSSH CLI or by the Venafi service to which the request was sent.
2 Command syntax was invalid, missing required subcommands or arguments, using unknown commands or arguments, an unknown parameter was provided, or a parameter value was incorrect and prevented the command from running.
3 The command successfully parsed, and a request made to the specified service, but the service returned an authentication error. This will generally indicate incorrect credentials or service address.
4 The command was interrupted by the user (Ctrl+C).
5 This is applicable only to vssh certificate renew command. The code indicates that renewal of the specified certificate was not performed.