Horje
powershell ssh key permissions Code Example
powershell ssh key permissions
# Set Key File Variable:
  New-Variable -Name Key -Value "$env:UserProfile\.ssh\id_rsa"

# Remove Inheritance:
  Icacls $Key /c /t /Inheritance:d

# Set Ownership to Owner:
  # Key's within $env:UserProfile:
    Icacls $Key /c /t /Grant ${env:UserName}:F

   # Key's outside of $env:UserProfile:
     TakeOwn /F $Key
     Icacls $Key /c /t /Grant:r ${env:UserName}:F

# Remove All Users, except for Owner:
  Icacls $Key /c /t /Remove:g Administrator "Authenticated Users" BUILTIN\Administrators BUILTIN Everyone System Users

# Verify:
  Icacls $Key

# Remove Variable:
  Remove-Variable -Name Key




Shell

Related
remove remote origin xcode Code Example remove remote origin xcode Code Example
scaffold controller ef core Code Example scaffold controller ef core Code Example
awk print only range of lines Code Example awk print only range of lines Code Example
default: Box 'hashicorp/bionic64' could not be found. Attempting to find and install Code Example default: Box 'hashicorp/bionic64' could not be found. Attempting to find and install Code Example
initramfs ubuntu 20.04 Code Example initramfs ubuntu 20.04 Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
11