-
Notifications
You must be signed in to change notification settings - Fork 9
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
Wildcard support #23
Comments
@ohdearaugustin Thanks for the issue report! This is an interesting one because the plugin itself doesn't pass the SSH opts (other than Maybe what is happening here is because you don't have I'm debating on the best way to "detect" that it should not overwrite the username and use a different or wildcard one. Could be a configuration option, or potentially parse the SSH config files for any wildcards that match the current host and check if a Open to suggestions! Will try and tinker with this today and early this week. |
https://github.com/libfuse/sshfs?tab=readme-ov-file#how-to-use With how SSHFS works under the hood, seems like parsing for the wildcard configuration and using the |
I have now tried it with sshfs itself and it seems like to work with the wildcard. I guess the best approach would be to not fallback on the local user in the lua script. This way we would not need to parse the whole ssh config in lua. Furthermore if no user is defined in the plugin or the ssh config sshfs automatically will fallback to the local user anyway. |
@ohdearaugustin Nice! Thanks for the PR and thanks for the experimentation. Will get that in and released now ❤️ |
The plugin doesn't consider wildcard in ssh/config.
I have following configuration:
The plugin then tries to connect to the host with my current username and ask for a password.
If I add the settings directly to the host like:
Everything works as expected and the key is also loaded from the ssh-agent. I need this kind of a setup as I have over 200 hosts in my configuration and the with the wildcard my config is already 1200 lines long.
Edit:
I guess the function parse_hosts_from_configs would needed to be extended to support this use-case.
The text was updated successfully, but these errors were encountered: