-
Notifications
You must be signed in to change notification settings - Fork 85
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
RFE: Support different connection options for GWs than for end points #466
Comments
You can just use different configs in your client's ssh_config using Host blocks? it's probably more practical than whatever configuration scheme we can come up with. (Note that for small clusters if you don't want to use ssh agent or put private keys on gateways you could just not use the gateway code and use gateways through the ProxyJump option -- that will use the initial client's agent/keys for both gateway and final connection at the cost of opening a distinct connection to the GW for each node, so it's not practical for large clusters, only for hard-to-access nodes. Enabling session multiplexing might make that slightly more resource efficient but can hang the first ssh through that node if later ones take time to finish and I wouldn't recommend that... Unfortunately to benefit from GW connection multiplexing there really is no other choice than giving GWs a private key or forwarding agent to GW - it might be possible to implement something similar to proxyjump by having a multiplexing ssh or port forwarding run as a service in the background but I feel it's out of scope for clush) |
The problems with changing the
SSH session multiplexing looks interesting, I did not know that feature, but seems indeed that it is not a silver bullet. The way I imagined this feature request is simply by having an extra section in the configuration or a new option to pass options just to GW nodes. So we have |
Well, if the point is just only enabling ssh agent on GWs, having an appropriate section that only enables it for gws seems good enough for me (yes it'll be enabled even when you ssh there without clush but they're gw so that looks like a valid usage for me). I just don't think it's worth adding the complexity of only applying some options to gw in this case, but other developers might be more open than me here - I'll defer to them :) I agree multiplexing isn't good enough for anything bigger than small clusters, there's a limit to how many multiplexed connections ssh will allow and it's just not a good 1-1 mapping to clush gw (there's a reason we implemented this in the first place!), I just brought it up because there really is no other way of skipping agent forwarding or similar (kerberos credentials forwarding?) as that was what you seemed to care about. |
I am not sure you can apply the suggested workaround (enabling forwarding for the GWs in You can override the default that So at the end you can't selectively enable agent forwarding. You either forward it for all the connections, or you disable it (default) for all the connections. I suppose that the security implications of enabling it blindly is the reason why |
So this issue kind of stalled. Is there something on our side we can do to push it forward? Would a PR be appreciated or is that something that the current team would not like? |
Sorry I had missed the previous reply.
|
Thanks for the answer. I think that if we can get rid of that hardcoded option, then we could implement the work around with On the other hand,
Regardless of that, how to deal with the hardcoded option remains open. One could think of moving it to |
Any feedback regarding how this could look like? |
I agree we need to have a way for users to have different options for their gateways from the options use to connect to leaf nodes (clients). Either they could do it with customer I don't like the second proposal as this specific case is not needed by most of our customers and i don't think adding a specific section will be useful.
|
IMO the 2n point is more elegant, but the 1st is more practical (less effort and risk of it stalling over a long period of time, since the implementation effort is larger) |
I'd like to make progress here, since it is likely that it will take some time until distros pick it up, etc. Would making a PR be welcomed? If so we could make one following the 1st approach, but making it opt-in via a config option (so the new release behaves 100% like the previous ones). Does this sound reasonable? |
It could be useful to support different connection options for GWs than for end points.
Example: large clusters with GWs, where the hierarchical setup is beneficial, but where one does not want to store private SSH keys on the GWs, or enable agent forwarding all the way to the compute nodes (just to the GWs).
Currently you need to relax your security by enabling agent forwarding everywhere, or have private keys in the GWs unnecessarily.
I am aware of the possibility of disabling agent forwarding in sshd_config, but this is an all or nothing switch that would affect all users that have access to the nodes. Since in most cases there is no practical use of enabling agent forwarding on the computes when running clush commands, I think separating the options used for the GWs from the options used for the computes, is a reasonable use case.
The text was updated successfully, but these errors were encountered: