-
-
Notifications
You must be signed in to change notification settings - Fork 171
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
xpra 5.0 overrides ~/.ssh/config, legacy format conflates port & display #3778
Comments
With previous versions I was able to connect to a server through a gateway (specified in With the latest master, I had success like so: |
FYI: This syntax has been deprecated for a very long time.
Sounds simple, it's not.
A PR would be most welcome, otherwise I don't have time for things like this, of which there are many.
The username issue perhaps, I don't see another issue to fix, just use the new syntax. |
Fixed in the commits above. |
Consider a case in which the local system specifies a different user and/or port in
~/.ssh/config
like this:Given
xpra attach ssh:remotehost:51
, Xpra 4.4.3 would connect to remotehost on display 51 with SSH assembling the username and port on its own. Xpra 5.0 beta tries to connect to remotehost on the default display with the client's username on port 51. I expected the old behavior. Workaround: use the new syntax with an explicit username:xpra attach ssh://remoteuser@remotehost/51
Xpra 5.0 beta's error output helped diagnose the issue:
The first command uses the legacy connection string format, a command I used to run all the time. The second command updates it to use the new format. The port issue goes away but the user issue is still present. The third command explicitly states the remote user so Xpra doesn't provide the local username.
Issue 1: Xpra is unnecessarily supplying a username to SSH
This is true with either the legacy connection string format or the newer
://
format.Explicitly stating
-l username
overrides a username specified via SSH configuration. Don't do it unless the connection string explicitly names a user (ssh:USERNAME[:PASSWORD]@HOST:DISPLAY
orssh://USERNAME[:PASSWORD]@HOST[:SSH_PORT][/DISPLAY][?OPTIONS]
). SSH will default to the current username on its own.(Documentation bug: Since a colon is only needed given a password, the man page needs to put that colon inside the password's square brackets as I have. This affects all connection string templates in the man page.)
Issue 2: Xpra's legacy SSH connection string format favors ports over displays
(This only happens with the legacy connection string format.)
Xpra has wrongly concluded that 51 is a port number rather than a display number, but this connection string format doesn't actually support specifying a port.
The man page (identical for xpra 4.4.3 & 5.0) could be read as supporting ports in the legacy form:
If I read this correctly, the only way to specify a port is to use the new format, though #3599 appears to have broken that, reverting Xpra back to the
protocol:host:port
form.Xpra should not extract a port with this legacy syntax.
After fixing this bug, please update the documentation to be more clear, maybe something like:
System Information
(This issue was originally mentioned in #3755.)
The text was updated successfully, but these errors were encountered: