To remove permissions for all users except yourself, you can use icacls
with a wildcard for users, but exclude your own username.
Here's how to do it:
-
First, remove all other users' permissions:
icacls "C:\tools\shell\home\.ssh" /remove * /t
-
Then, restore full control to your user:
icacls "C:\tools\shell\home\.ssh" /grant dmitrii:F /t
This approach removes permissions for all users and then reassigns full control to you.