|
|
@ -61,7 +61,7 @@ class Stream(mitogen.parent.Stream):
|
|
|
|
|
|
|
|
|
|
|
|
def construct(self, hostname, username=None, ssh_path=None, port=None,
|
|
|
|
def construct(self, hostname, username=None, ssh_path=None, port=None,
|
|
|
|
check_host_keys=True, password=None, identity_file=None,
|
|
|
|
check_host_keys=True, password=None, identity_file=None,
|
|
|
|
compression_level=6, ssh_args=None, **kwargs):
|
|
|
|
compression=True, ssh_args=None, **kwargs):
|
|
|
|
super(Stream, self).construct(**kwargs)
|
|
|
|
super(Stream, self).construct(**kwargs)
|
|
|
|
self.hostname = hostname
|
|
|
|
self.hostname = hostname
|
|
|
|
self.username = username
|
|
|
|
self.username = username
|
|
|
@ -69,7 +69,7 @@ class Stream(mitogen.parent.Stream):
|
|
|
|
self.check_host_keys = check_host_keys
|
|
|
|
self.check_host_keys = check_host_keys
|
|
|
|
self.password = password
|
|
|
|
self.password = password
|
|
|
|
self.identity_file = identity_file
|
|
|
|
self.identity_file = identity_file
|
|
|
|
self.compression_level = compression_level
|
|
|
|
self.compression = compression
|
|
|
|
if ssh_path:
|
|
|
|
if ssh_path:
|
|
|
|
self.ssh_path = ssh_path
|
|
|
|
self.ssh_path = ssh_path
|
|
|
|
if ssh_args:
|
|
|
|
if ssh_args:
|
|
|
@ -87,11 +87,8 @@ class Stream(mitogen.parent.Stream):
|
|
|
|
bits += ['-o', 'IdentitiesOnly yes']
|
|
|
|
bits += ['-o', 'IdentitiesOnly yes']
|
|
|
|
if self.identity_file:
|
|
|
|
if self.identity_file:
|
|
|
|
bits += ['-i', self.identity_file]
|
|
|
|
bits += ['-i', self.identity_file]
|
|
|
|
if self.compression_level:
|
|
|
|
if self.compression:
|
|
|
|
bits += [
|
|
|
|
bits += ['-o', 'Compression yes']
|
|
|
|
'-o', 'Compression yes',
|
|
|
|
|
|
|
|
'-o', 'CompressionLevel %d' % (self.compression_level,)
|
|
|
|
|
|
|
|
]
|
|
|
|
|
|
|
|
if not self.check_host_keys:
|
|
|
|
if not self.check_host_keys:
|
|
|
|
bits += [
|
|
|
|
bits += [
|
|
|
|
'-o', 'StrictHostKeyChecking no',
|
|
|
|
'-o', 'StrictHostKeyChecking no',
|
|
|
|