'If L{SSHCommandClientEndpoint} is initialized with any private keys, it
will try to use them to authenticate with the SSH server.'

def test_publicKeyAuthentication(self):

    key = Key.fromString(privateDSA_openssh)
    self.setupKeyChecker(self.portal, {self.user: privateDSA_openssh})
    self.realm.channelLookup['session'] = WorkingExecSession
    endpoint = SSHCommandClientEndpoint.newConnection(self.reactor, '/bin/ls    -l', self.user, self.hostname, self.port, keys=[key], knownHosts=self.knownHosts, ui=FixedResponseUI(False))
    factory = Factory()
    factory.protocol = Protocol
    connected = endpoint.connect(factory)
    (server, client, pump) = self.connectedServerAndClient(self.factory, self.reactor.tcpClients[0][2])
    protocol = self.successResultOf(connected)
    self.assertIsNotNone(protocol.transport)
