~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/ssh.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-04-29 07:14:39 UTC
  • mfrom: (4310.1.1 integration)
  • Revision ID: pqm@pqm.ubuntu.com-20090429071439-f7089qmxwc51k9rx
(vila) Respect ~/.ssh/config usernames for bzr+ssh connections
        (#367726)

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
"""Foundation SSH support for SFTP and smart server."""
19
19
 
20
20
import errno
 
21
import getpass
21
22
import os
22
23
import socket
23
24
import subprocess
461
462
    # paramiko requires a username, but it might be none if nothing was
462
463
    # supplied.  If so, use the local username.
463
464
    if username is None:
464
 
        username = auth.get_user('ssh', host, port=port)
465
 
 
 
465
        username = auth.get_user('ssh', host, port=port,
 
466
                                 default=getpass.getuser())
466
467
    if _use_ssh_agent:
467
468
        agent = paramiko.Agent()
468
469
        for key in agent.get_keys():