Xpra: Ticket #2437: Error at startup if non-default port in .ssh/config

When trying to connect an xpra server using the ssh protocol with ssh://myhost/100 (or any alternative syntax), if there is a non-default port regarding that host in the user's .ssh/config, like with :

Host myhost
Port 42

Then the xpra attach command fails with :

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/xpra/scripts/main.py", line 1012, in connect_or_fail
    return connect_to(display_desc, opts)
  File "/usr/lib/python3/dist-packages/xpra/scripts/main.py", line 1097, in connect_to
    return ssh_paramiko_connect_to(display_desc)
  File "/usr/lib/python3/dist-packages/xpra/net/ssh.py", line 336, in ssh_paramiko_connect_to
    conn.target = host_target_string("ssh", username, host, port, display)
  File "/usr/lib/python3/dist-packages/xpra/scripts/main.py", line 1083, in host_target_string
    target += ":%i" % port
TypeError: %i format: a number is required, not str

Tested with the Debian package from xpra.org version 3.0-r24070-1 .

Sun, 06 Oct 2019 08:12:17 GMT - kilobug: priority, component changed

Sun, 06 Oct 2019 08:31:53 GMT - Antoine Martin: status changed; resolution set

Thanks for reporting this, fixed in r24071.

Sat, 23 Jan 2021 05:51:15 GMT - migration script:

this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/2437