-
Notifications
You must be signed in to change notification settings - Fork 78
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
Have a way to utilize the system's SSH executable #563
Comments
What makes you think that the user's SSH config file isn't picked up by k0sctl? It certainly picks it up on my machine. |
the only thing it pick up is the Identityfile line... |
It appears there might be a potential discrepancy between the request for additional SSH config keyword support and the use of the system's SSH executable.
Thank you! |
I agree you should just be able to do something like: spec:
hosts:
- ssh:
address: host01
role: controller
- address: host02
role: worker
ssh:
address: host02 and all the other ssh details (user, address, port, keypath) would come from ssh config. I did something like this in k0sproject/rig#88 but it started getting so messy that I put it aside and started a big revamp of the whole thing in k0sproject/rig#92 but I haven't touched it in a while. Using the system's ssh client would have its pros and cons. Maybe it could be added as a new protocol, so you would have: spec:
hosts:
- sshClient:
address: host01
role: controller
- address: host02
role: worker
ssh:
address: host02 It could be a pretty simple addition at least as long as it wouldn't be expected to work on windows. |
my use case is we have lots of k8s clusters with tons of hosts and dynamic ssh certificates with 2FA and what not... those hosts have different ssh config for almost all clusters, we use pretty much all ssh config parameters possible :) The problem is managing complexity: Ssh does an excelent job picking the config from this file. just leave ssh do his job :) |
Each connection (there can sometimes be multiple per host) will eat up some 5-10mb of memory for each ssh binary and pty though, so having a lot of hosts may become a problem. |
I think I'm going to experiment with adding a secondary ssh protocol handler that uses the system ssh, it should be pretty simple, and if it's "marked" experimental, it's not a big issue to throw it out if it ends up causing more problems than it solves. |
Did you try it out yet? |
yeah!! reinstalled dev cluster (~15 nodes) with this. We could reduce ansible lines by 200+. |
Just want to add that switching from Very valuable addition! Thanks! |
i want to just specify the host on the k0sconfig.yaml and leave the ssh config where it belongs
~/.ssh/config
so not use any ssh wrapper but the native ssh on my machine.
The text was updated successfully, but these errors were encountered: