Class SshConfiguration
java.lang.Object
org.sentrysoftware.metricshub.extension.oscommand.OsCommandConfiguration
org.sentrysoftware.metricshub.extension.oscommand.SshConfiguration
- All Implemented Interfaces:
IConfiguration
Configuration class for SSH-based operations. It includes SSH-specific settings such as username, password,
private key, and sudo command configurations. It extends
OsCommandConfiguration by adding more
specific fields and validation logic pertinent to SSH configurations.-
Field Summary
Fields inherited from class org.sentrysoftware.metricshub.extension.oscommand.OsCommandConfiguration
DEFAULT_TIMEOUT -
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
SshConfiguration
public SshConfiguration(boolean useSudo, Set<String> useSudoCommands, String sudoCommand, Long timeout, String username, char[] password, String privateKey) Constructs an SshConfiguration with specific settings for SSH operations.- Parameters:
useSudo- Indicates whether sudo should be used for the commands.useSudoCommands- A set of commands that should be executed with sudo.sudoCommand- The sudo command to use.timeout- The default timeout for SSH operations.username- The SSH username.password- The SSH password.privateKey- The path to the SSH private key file.
-
-
Method Details
-
validateConfiguration
- Specified by:
validateConfigurationin interfaceIConfiguration- Overrides:
validateConfigurationin classOsCommandConfiguration- Throws:
InvalidConfigurationException
-
toString
- Overrides:
toStringin classOsCommandConfiguration
-