Class SshKeyCleanAutomation

java.lang.Object
com.sshteam.lib.AbstractSshAutomation
com.sshteam.lib.SshKeyCleanAutomation
Direct Known Subclasses:
SshKeyDeployAutomation

public class SshKeyCleanAutomation extends AbstractSshAutomation
  • Field Details

    • sftp

      protected com.sshtools.client.sftp.SftpClient sftp
    • id

      protected String id
    • version

      protected String version
    • platform

      protected Platform platform
    • adaptiveConfiguration

      protected com.sshtools.common.config.AdaptiveConfiguration adaptiveConfiguration
    • keyServer

      protected final String 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:
      runCommand in class AbstractSshAutomation
    • runInShell

      protected void runInShell(Runnable task) throws IOException
      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:
      IOException
      com.sshtools.common.ssh.SshException
      com.sshtools.client.shell.ShellTimeoutException
      com.sshtools.common.sftp.SftpStatusException
      com.sshtools.client.sftp.TransferCancelledException
    • afterCommand

      protected void afterCommand(com.sshtools.sequins.Progress progress)
      Overrides:
      afterCommand in class AbstractSshAutomation
    • checkInstalled

      protected boolean checkInstalled(com.sshtools.sequins.Progress progress)
    • getInstallPath

      protected String getInstallPath()
    • uninstallDependencies

      protected boolean uninstallDependencies(com.sshtools.sequins.Progress progress) throws IOException, com.sshtools.common.ssh.SshException, com.sshtools.client.shell.ShellTimeoutException
      Throws:
      IOException
      com.sshtools.common.ssh.SshException
      com.sshtools.client.shell.ShellTimeoutException
    • getTeamConfigPath

      protected String getTeamConfigPath()
    • getTeamConfig

      protected com.sshtools.common.sshd.config.SshdConfigFile getTeamConfig() throws IOException, com.sshtools.common.ssh.SshException, com.sshtools.client.shell.ShellTimeoutException
      Throws:
      IOException
      com.sshtools.common.ssh.SshException
      com.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.ShellTimeoutException
      com.sshtools.common.ssh.SshException
      IOException
    • 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:
      IOException
      com.sshtools.common.ssh.SshException
      com.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.SftpStatusException
      com.sshtools.common.ssh.SshException
      IOException
      com.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:
      IOException
      com.sshtools.common.ssh.SshException
      com.sshtools.client.shell.ShellTimeoutException
    • getHomeDirectory

      protected String getHomeDirectory(Platform platform) throws IOException, com.sshtools.common.ssh.SshException, com.sshtools.client.shell.ShellTimeoutException
      Throws:
      IOException
      com.sshtools.common.ssh.SshException
      com.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:
      IOException
      com.sshtools.common.ssh.SshException
      com.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:
      IOException
      com.sshtools.common.ssh.SshException
      com.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:
      IOException
      com.sshtools.common.ssh.SshException
      com.sshtools.client.shell.ShellTimeoutException
    • execute

      protected String execute(String cmd) throws IOException, com.sshtools.common.ssh.SshException, com.sshtools.client.shell.ShellTimeoutException
      Throws:
      IOException
      com.sshtools.common.ssh.SshException
      com.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:
      IOException
      com.sshtools.common.ssh.SshException
      com.sshtools.client.shell.ShellTimeoutException
    • getConfig

      protected String getConfig(String key, String defaultValue)