-
Notifications
You must be signed in to change notification settings - Fork 310
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
Support $HOME environment variable in "remote.SSH.configFile" #1146
Comments
We use node's |
@roblourens I've been thinking about this for a while, but why does Remote SSH use ~/.ssh and private key files? Why not just have some JSON configuration where you place the keys instead? SSH client doesn't work very well on Windows. Even the Windows version of SSH. I get lots of UNPROTECTED PRIVATE KEY FILE errors. Yes, I did follow the instructions to fix permissions but my key structure is unique, so the out-of-the-box command you provide in your documentation doesn't work for me. If configuration was in JSON settings, there would be no permission concerns. You could also make SSH work with hardware security keys without crazy hacks. Everything about this extension is just difficult to use because it feels like Remote SSH is trying to bastardize SSH to work on Windows when it was designed for Linux. The reality is, permission requirements on Windows are less intuitive compared to linux. On linux, it's a straightforward matter of |
Permissions concerns would still be there, you would just be moving them to a different file. This seems like a comment about ssh on windows, not the ssh extension. We are just invoking whatever ssh binary is present. |
Right but it wouldn't be the SSH executable checking and enforcing those permissions since the configuration would then be managed by the extension itself. Somehow the SSHFS extension does this and it works much better IMHO. I did try the Git for Windows |
The sshfs extension doesn't use ssh.exe at all and has made some different design decisions which make sense for their case, but not ours. |
Why was this marked "out of scope"? On 8/15/2019 you said:
|
I also think that supporting $HOME environment variable in "remote.SSH.configFile" is a great idea! I'm setting up a multi-user build environment on a remote Windows VM, and having this feature would really help simplify per user configuration. |
I just notice that environment variables in the ssh config file are not honored. At least with ssh-config file env variables, we could have gotten around this problem using openssh v8.4 and above. I agree with @2Torr that this is a huge need beyond the textbook use case. The cited reason for closing it is tangential to the core problem. Please reconsider reopening this issue. Thanks in advance. |
+1 to consider re-opening. |
On my machine, I have a
HOME
environment variable set which points to my linux home directory (this is mostly for Git Bash):I want the SSH Remote extension to use this path to find my
~/.ssh/config
file, which does exist. However, it doesn't offer that in the list (it treats~
asC:\users\myname
). I tried to set the setting like so:Which should resolve to
C:\Development\Home\.ssh\config
, but it doesn't seem to recognize it. I think maybe environment variable support is lacking in this specific setting. I get this error:How can I get the Remote SSH extension to recognize and use my
.ssh/config
in a cross-platform way? I sync myHOME
directory as well as my VS Code settings across my work machines. I have myHOME
path set differently on each machine. So it's important to be able to configure this extension to find my hosts, keys, and other configuration consistently across these platforms.The text was updated successfully, but these errors were encountered: