0

First a short introduction what I was trying to do and how my issue showed up.

When i configure a ssh hosts in .ssh/config I have the issue that the permissions seem to be wrong on the config-file such that I get the error message Bad owner or permissions on C:\\Users\\My Name/.ssh/config when i try to use ssh with a config-file present.

I already tried everything mentioned in this post: Windows SSH: Permissions for 'private-key' are too open

Nothing worked. When I tried the tip of using the following commands

icacls config /inheritance:r
icacls config /grant:r "%username%":"(R)"

to remove all permissions beside mine, I lost access to the file myself and instead of my username some S-1-5-21-... shows up in the file permissions. My guess is that this is the root cause of the ssh issues I was seeing previously.

So %Username% (which expands to my real username) seems to be mapped to some spurious SID . Does anybody have any clue why this is so and how I can fix it?

One thing I did previously was logging into a windows account once without knowing that is would break my local user. So I immediately undid this and reverted to a local user. The only thing left from this experiment is that the user folder is still has my full name an not the name of the local user.

6
  • Most likely the shown SID belongs to your account just for an unknown reason Windows has stopped resolving it to your user name. Is it possible that you had deleted and recreated your user account?
    – Robert
    Commented Nov 8, 2020 at 19:51
  • Why not delete the file and recreate it with default permissions, rather than trying to fix it?
    – harrymc
    Commented Nov 8, 2020 at 19:52
  • @Robert: Well kind of as I said, I accidentally converted the local account to the windows account. I assume that strange things happened then with the identity
    – Ferio
    Commented Nov 9, 2020 at 15:51
  • @harrymc I recreated the file many times...
    – Ferio
    Commented Nov 9, 2020 at 15:52
  • what I notices is that with a new user account everything works, something is broken with the current user...
    – Ferio
    Commented Nov 9, 2020 at 15:52

0

You must log in to answer this question.

Browse other questions tagged .