'Call execute() method of L{OpenSSHClientMixin} with an ssh option that
forces the exclusive use of the key exchange algorithm specified by
keyExchangeAlgo
@type keyExchangeAlgo: L{str}
@param keyExchangeAlgo: The key exchange algorithm to use
@return: L{defer.Deferred}'

def assertExecuteWithKexAlgorithm(self, keyExchangeAlgo):

    kexAlgorithms = []
    try:
        output = subprocess.check_output([which('ssh')[0], '-Q', 'kex'], stderr=subprocess.STDOUT)
        if (not isinstance(output, str)):
            output = output.decode('utf-8')
        kexAlgorithms = output.split()
    except:
        pass
    if (keyExchangeAlgo not in kexAlgorithms):
        raise unittest.SkipTest('{}    not    supported    by    ssh    client'.format(keyExchangeAlgo))
    d = self.execute('echo    hello', ConchTestOpenSSHProcess(), ('-oKexAlgorithms=' + keyExchangeAlgo))
    return d.addCallback(self.assertEqual, 'hello\n')
