'Connects to the SSH server started in L{ConchServerSetupMixin.setUp} by
running the \'ssh\' command line tool.
@type remoteCommand: str
@param remoteCommand: The command (with arguments) to run on the
remote end.
@type process: L{ConchTestOpenSSHProcess}
@type sshArgs: str
@param sshArgs: Arguments to pass to the \'ssh\' process.
@return: L{defer.Deferred}'

def execute(self, remoteCommand, process, sshArgs=''):

    d = getProcessValue(which('ssh')[0], ('-o', 'PubkeyAcceptedKeyTypes=ssh-dss', '-V'))
    def hasPAKT(status):
        if (status == 0):
            opts = '-oPubkeyAcceptedKeyTypes=ssh-dss    '
        else:
            opts = ''
        process.deferred = defer.Deferred()
        cmdline = (((('ssh    -2    -l    testuser    -p    %i    -F    /dev/null    -oUserKnownHostsFile=kh_test    -oPasswordAuthentication=no    -oHostKeyAlgorithms=ssh-rsa    -a    -i    dsa_test    ' + opts) + sshArgs) + '    127.0.0.1    ') + remoteCommand)
        port = self.conchServer.getHost().port
        cmds = (cmdline % port).split()
        encodedCmds = []
        for cmd in cmds:
            if isinstance(cmd, unicode):
                cmd = cmd.encode('utf-8')
            encodedCmds.append(cmd)
        reactor.spawnProcess(process, which('ssh')[0], encodedCmds)
        return process.deferred
    return d.addCallback(hasPAKT)
