java.lang.Object
com.sshteam.lib.AbstractSshAutomation
com.sshteam.lib.SshKeyCleanAutomation
- Direct Known Subclasses:
SshKeyDeployAutomation
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected com.sshtools.common.config.AdaptiveConfigurationprotected final booleanprotected Stringprotected final Stringprotected final intprotected Platformprotected com.sshtools.client.sftp.SftpClientprotected StringFields inherited from class com.sshteam.lib.AbstractSshAutomation
ssh -
Method Summary
Modifier and TypeMethodDescriptionprotected voidafterCommand(com.sshtools.sequins.Progress progress) protected booleancheckInstalled(com.sshtools.sequins.Progress progress) protected voiddoCommand(com.sshtools.sequins.Progress progress) protected Stringprotected Stringprotected Stringprotected StringgetHomeDirectory(Platform platform) protected Stringprotected Stringprotected com.sshtools.common.sshd.config.SshdConfigFileprotected Stringprotected com.sshtools.common.sshd.config.SshdConfigFileloadConfiguration(com.sshtools.sequins.Progress progress, String path) protected voidrestartService(com.sshtools.sequins.Progress progress) protected final intrunCommand(com.sshtools.sequins.Progress progress) protected voidrunInShell(Runnable task) protected voidsaveConfiguration(com.sshtools.sequins.Progress progress, com.sshtools.common.sshd.config.SshdConfigFile config, String configPath) protected intsudoWithExitCode(String cmd, boolean assertSuccess) protected intsudoWithExitCode(String cmd, boolean assertSuccess, String errorMessage) protected StringsudoWithOutput(String cmd, boolean assertSuccess) protected booleanuninstallDependencies(com.sshtools.sequins.Progress progress) Methods inherited from class com.sshteam.lib.AbstractSshAutomation
beforeCommand, call, connect, getAgentSocket, getAuthenticationTimeout, getCachedPasswordOrPrompt, getCommandName, getHost, getIdentityFile, getPassphraseSupplier, getPasswordSupplier, getPort, getPrompter, getSsh, getUsername, isAgentAuthentication, isDefaultIdentities, isPasswordAuthentication, isRoot, isVerboseProgress, onConnected, readPassword, readPassword
-
Field Details
-
sftp
protected com.sshtools.client.sftp.SftpClient sftp -
id
-
version
-
platform
-
adaptiveConfiguration
protected com.sshtools.common.config.AdaptiveConfiguration adaptiveConfiguration -
keyServer
-
keyServerPort
protected final int keyServerPort -
confirmConfigChanges
protected final boolean confirmConfigChanges
-
-
Method Details
-
runCommand
protected final int runCommand(com.sshtools.sequins.Progress progress) - Specified by:
runCommandin classAbstractSshAutomation
-
runInShell
- Throws:
IOException
-
doCommand
protected void doCommand(com.sshtools.sequins.Progress progress) throws IOException, com.sshtools.common.ssh.SshException, com.sshtools.client.shell.ShellTimeoutException, com.sshtools.common.sftp.SftpStatusException, com.sshtools.client.sftp.TransferCancelledException - Throws:
IOExceptioncom.sshtools.common.ssh.SshExceptioncom.sshtools.client.shell.ShellTimeoutExceptioncom.sshtools.common.sftp.SftpStatusExceptioncom.sshtools.client.sftp.TransferCancelledException
-
afterCommand
protected void afterCommand(com.sshtools.sequins.Progress progress) - Overrides:
afterCommandin classAbstractSshAutomation
-
checkInstalled
protected boolean checkInstalled(com.sshtools.sequins.Progress progress) -
getInstallPath
-
uninstallDependencies
protected boolean uninstallDependencies(com.sshtools.sequins.Progress progress) throws IOException, com.sshtools.common.ssh.SshException, com.sshtools.client.shell.ShellTimeoutException - Throws:
IOExceptioncom.sshtools.common.ssh.SshExceptioncom.sshtools.client.shell.ShellTimeoutException
-
getTeamConfigPath
-
getTeamConfig
protected com.sshtools.common.sshd.config.SshdConfigFile getTeamConfig() throws IOException, com.sshtools.common.ssh.SshException, com.sshtools.client.shell.ShellTimeoutException- Throws:
IOExceptioncom.sshtools.common.ssh.SshExceptioncom.sshtools.client.shell.ShellTimeoutException
-
getSshdConfigPath
protected String getSshdConfigPath() throws com.sshtools.client.shell.ShellTimeoutException, com.sshtools.common.ssh.SshException, IOException- Throws:
com.sshtools.client.shell.ShellTimeoutExceptioncom.sshtools.common.ssh.SshExceptionIOException
-
loadConfiguration
protected com.sshtools.common.sshd.config.SshdConfigFile loadConfiguration(com.sshtools.sequins.Progress progress, String path) throws IOException, com.sshtools.common.ssh.SshException, com.sshtools.client.shell.ShellTimeoutException - Throws:
IOExceptioncom.sshtools.common.ssh.SshExceptioncom.sshtools.client.shell.ShellTimeoutException
-
saveConfiguration
protected void saveConfiguration(com.sshtools.sequins.Progress progress, com.sshtools.common.sshd.config.SshdConfigFile config, String configPath) throws com.sshtools.common.sftp.SftpStatusException, com.sshtools.common.ssh.SshException, IOException, com.sshtools.client.shell.ShellTimeoutException - Throws:
com.sshtools.common.sftp.SftpStatusExceptioncom.sshtools.common.ssh.SshExceptionIOExceptioncom.sshtools.client.shell.ShellTimeoutException
-
restartService
protected void restartService(com.sshtools.sequins.Progress progress) throws IOException, com.sshtools.common.ssh.SshException, com.sshtools.client.shell.ShellTimeoutException - Throws:
IOExceptioncom.sshtools.common.ssh.SshExceptioncom.sshtools.client.shell.ShellTimeoutException
-
getHomeDirectory
protected String getHomeDirectory(Platform platform) throws IOException, com.sshtools.common.ssh.SshException, com.sshtools.client.shell.ShellTimeoutException - Throws:
IOExceptioncom.sshtools.common.ssh.SshExceptioncom.sshtools.client.shell.ShellTimeoutException
-
sudoWithOutput
protected String sudoWithOutput(String cmd, boolean assertSuccess) throws IOException, com.sshtools.common.ssh.SshException, com.sshtools.client.shell.ShellTimeoutException - Throws:
IOExceptioncom.sshtools.common.ssh.SshExceptioncom.sshtools.client.shell.ShellTimeoutException
-
sudoWithExitCode
protected int sudoWithExitCode(String cmd, boolean assertSuccess) throws IOException, com.sshtools.common.ssh.SshException, com.sshtools.client.shell.ShellTimeoutException - Throws:
IOExceptioncom.sshtools.common.ssh.SshExceptioncom.sshtools.client.shell.ShellTimeoutException
-
sudoWithExitCode
protected int sudoWithExitCode(String cmd, boolean assertSuccess, String errorMessage) throws IOException, com.sshtools.common.ssh.SshException, com.sshtools.client.shell.ShellTimeoutException - Throws:
IOExceptioncom.sshtools.common.ssh.SshExceptioncom.sshtools.client.shell.ShellTimeoutException
-
execute
protected String execute(String cmd) throws IOException, com.sshtools.common.ssh.SshException, com.sshtools.client.shell.ShellTimeoutException - Throws:
IOExceptioncom.sshtools.common.ssh.SshExceptioncom.sshtools.client.shell.ShellTimeoutException
-
execute
protected String execute(String cmd, boolean assertSuccess, String errorMessage) throws IOException, com.sshtools.common.ssh.SshException, com.sshtools.client.shell.ShellTimeoutException - Throws:
IOExceptioncom.sshtools.common.ssh.SshExceptioncom.sshtools.client.shell.ShellTimeoutException
-
getConfig
-