-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Bad Owner or Permissions on username\.ssh\config file #3210
Comments
@Chuxel Seems microsoft/vscode-remote-release#119 still not fix 😭 |
@mashirozx The issue you reference was in fact resolved with this script, so if the script isn't running, that's something else. Are you using the Windows OpenSSH client in Windows 10 1803+? If not, you can try to manually set the permissions on |
@Chuxel Actually I solved this problem in vscode-remote by modifying |
@mashirozx I'd rather not include something without an understanding of what the problem was to begin with - the configFile is covered elsewhere. This seems to be a signature error which shouldn't be possible. The only thing I can think of is you are on Home instead of Pro or Enterprise. This is the first time this error has been reported, so something strange is going on. |
@Chuxel Maybe this should be a new issue in https://github.com/PowerShell/Win32-OpenSSH/? 😂 |
@Chuxel Actually there is also an issue relate to the Windows version (I guess) PowerShell/Win32-OpenSSH#1445 |
Yeah that looks like the issue! Let's close this as a upstream duplicate of that problem. Since its not related to VS Code. |
@Chuxel I also encountered this problem. Is it because of the path? |
@hacksut3l I fixed this by setting the path in my ssh config file to For example:
|
@mmmeff That is the problem!:+1: |
@mmmeff Spent 2 hours finding the issue, then came across this. Worked like a charm! |
Can confirm guys, the solution of @mmmeff is working. Should not we open another issue to fix it since by default the extension does not work. |
Those who are using recent Windows 10 (18.03+ Update and above) will be having OpenSSH installed. You need to uninstall that feature by going to "manage optional features" in Apps and Features menu from Settings. Once uninstalled, install/keep the Git for Windows. It will solve the problem.
No file permissions issue hereafter. enjoy. P.S. I ran into this issue while doing the Windows Update to 1803 and solved by uninstalling openSSH |
This fixed the same issue for me - microsoft/vscode-remote-release#119 |
I suddenly encountered this issue after login Windows with another account and then login back. Before that I didn't touch the default path of .ssh/config |
I believe this issue should be re-opened since the default configuration is broken. This should just work out of the box. |
On my system the issue was resolved by:
|
For me this was caused by the default ssh client. I got the same error when I used ssh through cmd.exe. What solved it was using a different ssh client, e.g. the git bash ssh client. Add the following entry to your settings.json file: |
@MrMarshall Thanks, now run OK! |
I just fix this problem. Let me tell you the real reason: Don't use Putty Key Generator! After OpenSSH was built in Windows 10, VSCode will always use the standard key format. Open your terminal, use the command Then use your file manager or cd in Terminal to find out the default SSH folder on Windows 10 VSCode will use the default folder The last thing to do is upload the Make sure your
If you want to save the private key in a special folder to let many programs use at the same time and manage them easily, just add a new keyword Sometimes |
I think I found an alternative solution to this issue in this Stackoverflow answer: https://stackoverflow.com/a/58275268/345722 |
This took me forever to figure out. First I had to use the suggestion from here: #3210 (comment) I then also had to change the permissions on the key file I was using, described here: https://superuser.com/a/1296046/302150 Ultimately this was way too hard to figure out, I've wasted hours. If you for some reason can't fix the fact that the default path doesn't work at all, you could at least provide error messages that actually explain the problem and tell us how to fix it. |
Happened to me right after IT Support logged in as Admin. Removing them (and disabling inheritance) using Security dialog on |
Solved for me adding absolute path to ssh config file in vs code ssh settings. |
In my case, the file permission was indeed corrupted. I tried to manually fix the permission on the file but did not work. I guess there are hidden permission properties I ended up creating a new file and copy over the content... |
I'm on ubuntu and my terminal was working perfectly fine with git and the ssh config file. I was able to clone as well as push code. But the vs code integrated terminal kept giving the "Bad owner or permissions" error. None of the above-stated solutions was helpful to me as I'm on Ubuntu. Therefore I found this. Basically, I just ran the 2 commands given below
|
Got this error while trying to connect into a server that uses a pubkey. |
@mmef solution (#3210 (comment)) works for me (SSH Win -> Nix) with the following notes:
|
When using vscode-remote it shows
C:\\Users\\username/.ssh/config
.Tried to fix following the doc at https://github.com/microsoft/vscode-docs/blob/master/docs/remote/troubleshooting.md#fixing-ssh-file-permission-errors
But the command seems not work for me:
The text was updated successfully, but these errors were encountered: