Class SshTestBase


public abstract class SshTestBase extends SshBasicTestBase
The ssh tests. Concrete subclasses can re-use these tests by implementing the abstract operations from SshTestHarness. This gives a way to test different ssh clients against a unified test suite.
  • Field Details

    • KEY_RESOURCES

      public static String[] KEY_RESOURCES
  • Constructor Details

    • SshTestBase

      public SshTestBase()
  • Method Details

    • testSshWithoutConfig

      public void testSshWithoutConfig() throws Exception
      Throws:
      Exception
    • testSingleCommand

      public void testSingleCommand() throws Exception
      Throws:
      Exception
    • testSingleCommandWithTimeoutExpired

      public void testSingleCommandWithTimeoutExpired() throws Exception
      Throws:
      Exception
    • testSshWithGlobalIdentity

      public void testSshWithGlobalIdentity() throws Exception
      Throws:
      Exception
    • testSshWithDefaultIdentity

      public void testSshWithDefaultIdentity() throws Exception
      Throws:
      Exception
    • testSshWithConfigEncryptedUnusedKey

      public void testSshWithConfigEncryptedUnusedKey() throws Exception
      Throws:
      Exception
    • testSshWithConfigEncryptedUnusedKeyInConfigLast

      public void testSshWithConfigEncryptedUnusedKeyInConfigLast() throws Exception
      Throws:
      Exception
    • isJsch

      private boolean isJsch()
    • testSshWithConfigEncryptedUnusedKeyInConfigFirst

      public void testSshWithConfigEncryptedUnusedKeyInConfigFirst() throws Exception
      Throws:
      Exception
    • testSshEncryptedUsedKeyCached

      public void testSshEncryptedUsedKeyCached() throws Exception
      Throws:
      Exception
    • testSshEncryptedUsedKeyWrongPassword

      public void testSshEncryptedUsedKeyWrongPassword() throws Exception
      Throws:
      Exception
    • testSshEncryptedUsedKeySeveralPassword

      public void testSshEncryptedUsedKeySeveralPassword() throws Exception
      Throws:
      Exception
    • testSshWithoutKnownHosts

      public void testSshWithoutKnownHosts() throws Exception
      Throws:
      Exception
    • testSshWithoutKnownHostsWithProviderAsk

      public void testSshWithoutKnownHostsWithProviderAsk() throws Exception
      Throws:
      Exception
    • testSshWithoutKnownHostsWithProviderAcceptNew

      public void testSshWithoutKnownHostsWithProviderAcceptNew() throws Exception
      Throws:
      Exception
    • testSshWithoutKnownHostsDeny

      public void testSshWithoutKnownHostsDeny() throws Exception
      Throws:
      Exception
    • testSshModifiedHostKeyDeny

      public void testSshModifiedHostKeyDeny() throws Exception
      Throws:
      Exception
    • testSshModifiedHostKeyWithProviderDeny

      public void testSshModifiedHostKeyWithProviderDeny() throws Exception
      Throws:
      Exception
    • checkKnownHostsModifiedHostKey

      private void checkKnownHostsModifiedHostKey(File backup, File newFile, String wrongKey) throws IOException
      Throws:
      IOException
    • testSshModifiedHostKeyAllow

      public void testSshModifiedHostKeyAllow() throws Exception
      Throws:
      Exception
    • testSshModifiedHostKeyAsk

      public void testSshModifiedHostKeyAsk() throws Exception
      Throws:
      Exception
    • testSshCloneWithConfigAndPush

      public void testSshCloneWithConfigAndPush() throws Exception
      Throws:
      Exception
    • testSftpWithConfig

      public void testSftpWithConfig() throws Exception
      Throws:
      Exception
    • testSftpCloneWithConfigAndPush

      public void testSftpCloneWithConfigAndPush() throws Exception
      Throws:
      Exception
    • testSshWithConfigWrongKey

      public void testSshWithConfigWrongKey() throws Exception
      Throws:
      Exception
    • testSshWithWrongUserNameInConfig

      public void testSshWithWrongUserNameInConfig() throws Exception
      Throws:
      Exception
    • testSshWithWrongPortInConfig

      public void testSshWithWrongPortInConfig() throws Exception
      Throws:
      Exception
    • testSshWithAliasInConfig

      public void testSshWithAliasInConfig() throws Exception
      Throws:
      Exception
    • testSshWithUnknownCiphersInConfig

      public void testSshWithUnknownCiphersInConfig() throws Exception
      Throws:
      Exception
    • testSshWithUnknownHostKeyAlgorithmsInConfig

      public void testSshWithUnknownHostKeyAlgorithmsInConfig() throws Exception
      Throws:
      Exception
    • testSshWithUnknownKexAlgorithmsInConfig

      public void testSshWithUnknownKexAlgorithmsInConfig() throws Exception
      Throws:
      Exception
    • testSshWithMinimalHostKeyAlgorithmsInConfig

      public void testSshWithMinimalHostKeyAlgorithmsInConfig() throws Exception
      Throws:
      Exception
    • testSshWithUnknownAuthInConfig

      public void testSshWithUnknownAuthInConfig() throws Exception
      Throws:
      Exception
    • testSshWithNoMatchingAuthInConfig

      public void testSshWithNoMatchingAuthInConfig() throws Exception
      Throws:
      Exception
    • testRsaHostKeySecond

      public void testRsaHostKeySecond() throws Exception
      Throws:
      Exception
    • testEcDsaHostKey

      public void testEcDsaHostKey() throws Exception
      Throws:
      Exception
    • testPasswordAuth

      public void testPasswordAuth() throws Exception
      Throws:
      Exception
    • testPasswordAuthSeveralTimes

      public void testPasswordAuthSeveralTimes() throws Exception
      Throws:
      Exception
    • testPasswordAuthWrongPassword

      public void testPasswordAuthWrongPassword() throws Exception
      Throws:
      Exception
    • testPasswordAuthNoPassword

      public void testPasswordAuthNoPassword() throws Exception
      Throws:
      Exception
    • testPasswordAuthCorrectPasswordTooLate

      public void testPasswordAuthCorrectPasswordTooLate() throws Exception
      Throws:
      Exception
    • testKeyboardInteractiveAuth

      public void testKeyboardInteractiveAuth() throws Exception
      Throws:
      Exception
    • testKeyboardInteractiveAuthSeveralTimes

      public void testKeyboardInteractiveAuthSeveralTimes() throws Exception
      Throws:
      Exception
    • testKeyboardInteractiveAuthWrongPassword

      public void testKeyboardInteractiveAuthWrongPassword() throws Exception
      Throws:
      Exception
    • testKeyboardInteractiveAuthNoPassword

      public void testKeyboardInteractiveAuthNoPassword() throws Exception
      Throws:
      Exception
    • testKeyboardInteractiveAuthCorrectPasswordTooLate

      public void testKeyboardInteractiveAuthCorrectPasswordTooLate() throws Exception
      Throws:
      Exception
    • testSshKeys

      public void testSshKeys(String keyName) throws Exception
      Throws:
      Exception