/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/transport/ssh.py

  • Committer: John Arbash Meinel
  • Date: 2010-11-05 20:54:32 UTC
  • mfrom: (5526 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5527.
  • Revision ID: john@arbash-meinel.com-20101105205432-rmyozu8sthyhmri8
Merge bzr.dev to resolve bzr-2.3.txt (aka NEWS)

Show diffs side-by-side

added added

removed removed

Lines of Context:
126
126
        elif 'SSH Secure Shell' in version:
127
127
            trace.mutter('ssh implementation is SSH Corp.')
128
128
            vendor = SSHCorpSubprocessVendor()
 
129
        elif 'lsh' in version:
 
130
            trace.mutter('ssh implementation is GNU lsh.')
 
131
            vendor = LSHSubprocessVendor()
129
132
        # As plink user prompts are not handled currently, don't auto-detect
130
133
        # it by inspection below, but keep this vendor detection for if a path
131
134
        # is given in BZR_SSH. See https://bugs.launchpad.net/bugs/414743
403
406
                                  command=None):
404
407
        args = [self.executable_path,
405
408
                '-oForwardX11=no', '-oForwardAgent=no',
406
 
                '-oClearAllForwardings=yes', '-oProtocol=2',
 
409
                '-oClearAllForwardings=yes',
407
410
                '-oNoHostAuthenticationForLocalhost=yes']
408
411
        if port is not None:
409
412
            args.extend(['-p', str(port)])
439
442
register_ssh_vendor('sshcorp', SSHCorpSubprocessVendor())
440
443
 
441
444
 
 
445
class LSHSubprocessVendor(SubprocessVendor):
 
446
    """SSH vendor that uses the 'lsh' executable from GNU"""
 
447
 
 
448
    executable_path = 'lsh'
 
449
 
 
450
    def _get_vendor_specific_argv(self, username, host, port, subsystem=None,
 
451
                                  command=None):
 
452
        args = [self.executable_path]
 
453
        if port is not None:
 
454
            args.extend(['-p', str(port)])
 
455
        if username is not None:
 
456
            args.extend(['-l', username])
 
457
        if subsystem is not None:
 
458
            args.extend(['--subsystem', subsystem, host])
 
459
        else:
 
460
            args.extend([host] + command)
 
461
        return args
 
462
 
 
463
register_ssh_vendor('lsh', LSHSubprocessVendor())
 
464
 
 
465
 
442
466
class PLinkSubprocessVendor(SubprocessVendor):
443
467
    """SSH vendor that uses the 'plink' executable from Putty."""
444
468