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

Fix/SSH Conf: Generated ProxyCommand line is missing quotes around path #1001

Merged
merged 1 commit into from
Apr 14, 2024

Conversation

landoncolburn
Copy link
Contributor

Fails to connect to DevPod on Windows over SSH since path for ProxyCommand in outputted .ssh/config is grabbed via os.Executable(), the default install location on Windows (C:\Program Files) has a space resulting in line:

  ProxyCommand C:\Program Files\.... ssh --stdio --context default --user devpod workspace-1"

Fixed by wrapping the path in escaped quotations

@shanman190
Copy link
Contributor

This one would be good for Windows users that don't happen to be using the OpenSSH build that ships internal to Windows 10/11. The internal Microsoft build hides this nuance, but other SSH builds such as the one that ships with Git Bash do not perform any tricks related to the handling of spaces in the path and error out instead.

@landoncolburn
Copy link
Contributor Author

This one would be good for Windows users that don't happen to be using the OpenSSH build that ships internal to Windows 10/11. The internal Microsoft build hides this nuance, but other SSH builds such as the one that ships with Git Bash do not perform any tricks related to the handling of spaces in the path and error out instead.

Ah that clears some stuff up! I didn't realize that the OpenSSH build handles path resolution differently than Git Bash one, but that makes sense why I was only experiencing this issue on some machines. All versions that I tested support the quoted path though, so this might be a good option even if just for legacy purposes.

@shanman190
Copy link
Contributor

Yep! The quoted variations are supported universally regardless of OS, so in my opinion this is still a good fix.

Copy link
Member

@pascalbreuninger pascalbreuninger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for the PR!

Also didn't know the default windows ssh executable handles whitespace in paths differently

@pascalbreuninger pascalbreuninger merged commit b230972 into loft-sh:main Apr 14, 2024
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants