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

sshutil.go handles key paths inconsistently on Windows platform #3167

Open
arixmkii opened this issue Jan 28, 2025 · 0 comments
Open

sshutil.go handles key paths inconsistently on Windows platform #3167

arixmkii opened this issue Jan 28, 2025 · 0 comments

Comments

@arixmkii
Copy link

Description

Code in sshutil.go is different for path handling in different commands - ssh vs ssh-keygen:

It uses filepath for ssh-keygen

"-C", "lima", "-f", filepath.Join(configDir, filenames.UserPrivateKey))
but has path translation for ssh
privateKeyPath = ioutilx.CanonicalWindowsPath(privateKeyPath)

It doesn't look right to mix and match ssh tools from Windows installation and msys2/cygwin counterparts, so, they both should work identically (cygwin/msys2 does support implicit conversion, but if one uses wsl based tooling it will not). The idea is to make this behavior more strict - identify which tooling version is used as Windows adds market to the version output. Alternatively it could be a setting inside VM template as of which kind of tooling is expected - this will reduce overhead of calling ssh -V additionally every time.

I plan to work on a PR addressing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants