Skip to content
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

Add support for /etc/ssh/ssh_config #4083

Closed
BillyCroan opened this issue Dec 22, 2023 · 1 comment
Closed

Add support for /etc/ssh/ssh_config #4083

BillyCroan opened this issue Dec 22, 2023 · 1 comment
Labels
enhancement New feature or request network

Comments

@BillyCroan
Copy link

Is your feature request related to a problem? Please describe.
xpra does not use the right settings to connect to my predefined ssh hosts in /etc/ssh/ssh_config

Describe the solution you'd like
Utilize paramiko's support for system level configs. (/etc/ssh/ssh_config)

I think the fix would go here: https://github.com/Xpra-org/xpra/blob/master/xpra/net/ssh/paramiko_client.py#L213
but I'm not sure. I don't understand why it's under "nogssapi context"

Describe alternatives you've considered
I could symlink $HOME/.ssh/config to /etc/ssh/ssh_config but that might break other users of ssh. Maybe put ssh_config in /opt/ and link every user's to it, but I suspect ssh will complain about ownership of that file. probably would have a problem with the symlink into /etc/ssh as well come to think of it

Another workaround is using xpra with --ssh="/usr/bin/ssh" but I understand it is your intention to use paramiko instead of openssh, so I am requesting this support for global configs.

Additional context
I used to use just $HOME/.ssh/config, but it was inneficient and a source of errors to maintain /root/.ssh/config and other user .ssh configs in parallel and ssh has a global config area in /etc/ssh so I moved my ssh config to that.

Everything else worked. xpra didn't.

Paramiko looks like they already support system-level config but they have to be told to use it:
paramiko/paramiko#1748 (comment) |
paramiko/paramiko#363 |

@BillyCroan BillyCroan added the enhancement New feature or request label Dec 22, 2023
@totaam totaam added the network label Dec 23, 2023
totaam added a commit that referenced this issue Dec 23, 2023
distributions have had enough time to update their libraries
totaam added a commit that referenced this issue Dec 23, 2023
@totaam
Copy link
Collaborator

totaam commented Dec 23, 2023

nogssapi was needed before: #1646 (comment)
4b50a25 removes this workaround, we'll see if anything breaks.
Hopefully, nothing. I believe that we have removed support for the distributions that were shipping outdated paramiko versions with this compatibility bug.

As for parsing the global config, 1660cdf should do that.
Untested, let me know if that works or you - please post the -d ssh debug log if not.

@totaam totaam closed this as completed Jan 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request network
Projects
None yet
Development

No branches or pull requests

2 participants