Skip to content

Commit

Permalink
#731: fixup r13896, ssh default port is not the xpra port!
Browse files Browse the repository at this point in the history
git-svn-id: https://xpra.org/svn/Xpra/trunk@13945 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Oct 1, 2016
1 parent b8c9fbd commit 411699d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/xpra/scripts/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -1220,7 +1220,7 @@ def parse_vsock(vsock_str):

def parse_display_name(error_cb, opts, display_name):
desc = {"display_name" : display_name}
def parse_host_string(host):
def parse_host_string(host, default_port=DEFAULT_PORT):
"""
Parses [username[:password]@]host[:port]
and returns username, password, host, port
Expand All @@ -1229,7 +1229,7 @@ def parse_host_string(host):
upos = host.find("@")
username = None
password = None
port = DEFAULT_PORT
port = default_port
if upos>=0:
#HOST=username@host
username = host[:upos]
Expand Down Expand Up @@ -1308,7 +1308,7 @@ def parse_host_string(host):
is_putty = ssh_cmd.endswith("plink") or ssh_cmd.endswith("plink.exe")
desc["is_putty"] = is_putty

username, password, host, ssh_port = parse_host_string(host)
username, password, host, ssh_port = parse_host_string(host, 22)
if password and is_putty:
full_ssh += ["-pw", password]
if username:
Expand Down

0 comments on commit 411699d

Please sign in to comment.