Class AbstractSshAutomation

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

public abstract class AbstractSshAutomation extends Object
  • Field Details

    • ssh

      protected com.sshtools.client.SshClient ssh
  • Method Details

    • call

      public final int call(com.sshtools.sequins.Progress progress) throws Exception
      Throws:
      Exception
    • readPassword

      protected String readPassword(String prompt)
    • readPassword

      protected String readPassword(String prompt, boolean useCommandPassword)
    • getCachedPasswordOrPrompt

      protected String getCachedPasswordOrPrompt(String prompt)
    • runCommand

      protected abstract int runCommand(com.sshtools.sequins.Progress progress)
    • beforeCommand

      protected void beforeCommand(com.sshtools.sequins.Progress progress)
    • afterCommand

      protected void afterCommand(com.sshtools.sequins.Progress progress) throws IOException, com.sshtools.common.ssh.SshException
      Throws:
      IOException
      com.sshtools.common.ssh.SshException
    • connect

      protected final com.sshtools.client.SshClient connect(com.sshtools.sequins.Progress progress) throws IOException, com.sshtools.common.ssh.SshException
      Throws:
      IOException
      com.sshtools.common.ssh.SshException
    • onConnected

      protected void onConnected(com.sshtools.client.SshClient ssh)
    • isRoot

      protected boolean isRoot()
    • getUsername

      protected String getUsername()
    • getPrompter

      protected Optional<com.sshtools.sequins.Prompter> getPrompter()
    • getHost

      protected String getHost()
    • getPort

      protected int getPort()
    • isAgentAuthentication

      protected boolean isAgentAuthentication()
    • isPasswordAuthentication

      protected boolean isPasswordAuthentication()
    • isDefaultIdentities

      protected boolean isDefaultIdentities()
    • getAgentSocket

      protected Optional<Path> getAgentSocket()
    • getIdentityFile

      protected Optional<Path> getIdentityFile()
    • getCommandName

      protected String getCommandName()
    • isVerboseProgress

      protected boolean isVerboseProgress()
    • getPassphraseSupplier

      protected Optional<com.sshtools.client.PassphrasePrompt> getPassphraseSupplier()
    • getPasswordSupplier

      protected Optional<Supplier<String>> getPasswordSupplier()
    • getAuthenticationTimeout

      protected long getAuthenticationTimeout()
    • getSsh

      protected com.sshtools.client.SshClient getSsh()