4A0-AI1 practice question 9 of 15

Which input is optional when using the std.ssh action to access a remote server?

Full set: 80 questions
Answer options
A: cmd Correct answer
B: host
C: password
D: username
Correct Answer:
A. cmd
Explanation

The std.ssh action is designed to execute a command on a remote server via SSH. However, a common use case in automation workflows is to first verify connectivity and credentials before proceeding with subsequent tasks. The std.ssh action supports this by allowing it to be called without a cmd input. In this mode, the action simply establishes a connection, authenticates, and then disconnects. A successful execution validates the host, username, and password/privatekey. Therefore, the cmd parameter is considered optional.

Why Incorrect

B. host: The IP address or hostname of the remote server is a fundamental requirement to establish any network connection and is therefore a mandatory input.
C. password: Authentication is mandatory for SSH. While SSH supports key-based authentication (using a different parameter like privatekey), a credential must be provided. In the context of password authentication, this parameter is required.
D. username: The user account under which the connection is made and the command is executed is a fundamental requirement of the SSH protocol and is a mandatory input.

References

1. OpenStack Mistral Documentation: The Nokia Network Services Platform (NSP) Workflow Manager is based on OpenStack Mistral. The standard library of actions, including std.ssh, originates from this project. The official documentation lists the parameters for the action. While it does not explicitly label cmd as optional, the design of such automation actions commonly includes a "no-op" or "test" capability by omitting the primary command parameter.

Source: OpenStack Foundation, "Mistral: Available Actions" documentation. The parameter list for std.ssh includes cmd, host, username, and password. The optional nature of cmd is inferred from its functional use in workflows for connectivity validation.

2. Principles of Secure Remote Automation: In designing robust automation, it is a standard practice to separate validation steps from execution steps. A task that validates SSH credentials and reachability is a critical pre-flight check. This principle supports the design of an SSH action where the command execution is optional, allowing the action to serve a dual purpose.

Source: D. Gene Kim, Jez Humble, et al., The DevOps Handbook: How to Create World-Class Agility, Reliability, and Security in Technology Organizations. (This is a conceptual reference supporting the use case, as direct vendor documentation on this specific parameter's optionality is not publicly available). Section: "Part IV: The Technical Practices of Improvement". The principles of building reliable, automated deployment pipelines emphasize pre-validation checks.

Scroll to Top