'If the SSH server does not accept any of the specified SSH keys, the
specified password is tried.'

def test_authenticationFallback(self):

    badKey = Key.fromString(privateRSA_openssh)
    self.setupKeyChecker(self.portal, {self.user: privateDSA_openssh})
    endpoint = SSHCommandClientEndpoint.newConnection(self.reactor, '/bin/ls    -l', self.user, self.hostname, self.port, keys=[badKey], password=self.password, knownHosts=self.knownHosts, ui=FixedResponseUI(False))
    factory = Factory()
    factory.protocol = Protocol
    connected = endpoint.connect(factory)
    self.factory.attemptsBeforeDisconnect += 1
    (server, client, pump) = self.connectedServerAndClient(self.factory, self.reactor.tcpClients[0][2])
    pump.pump()
    errors = self.flushLoggedErrors(ConchError)
    self.assertIn('unknown    channel', (errors[0].value.data, errors[0].value.value))
    self.assertEqual(1, len(errors))
    f = self.failureResultOf(connected)
    f.trap(ConchError)
    self.assertEqual('unknown    channel', f.value.value)
    self.assertTrue(client.transport.disconnecting)
