Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

powershell ssh key permissions

# Set Key File Variable:
  New-Variable -Name Key -Value "$env:UserProfile.sshid_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" BUILTINAdministrators BUILTIN Everyone System Users

# Verify:
  Icacls $Key

# Remove Variable:
  Remove-Variable -Name Key
Comment

PREVIOUS NEXT
Code Example
Shell :: full stack roadmap github 
Shell :: curl-tomcat 
Shell :: list all services linux 
Shell :: shell script for creating a pod using helm 
Shell :: linux download file from server to local machine 
Shell :: setup macbook for development 
Shell :: select an object based a field which is like a string jq 
Shell :: install ecryptfs in linux 
Shell :: alternative echo linux 
Shell :: fish shell ssh agent autostart 
Shell :: start automount daemon aix 
Shell :: mark drive as faulty mdadm linux 
Shell :: homebrew install nasm 
Shell :: Drupal import db ftom backup 
Shell :: configure rest api for docker in windows 
Shell :: yarn not found node version 14.17.4 
Shell :: update aur packages archlinux 
Shell :: scala run shell command 
Shell :: dgram i node 
Shell :: $FOO, or val if unset (or null) 
Shell :: npm uninstall ngrok npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! 
Shell :: fugitive select branch 
Shell :: exiting nano 
Shell :: linux zip current directory 
Shell :: install protobuf windows 
Shell :: grep search match 
Shell :: Unit Tests 
Shell :: how to tell if i have cuda installed 
Shell :: how to curl a service inside a pod in kubernetes? 
Shell :: greeper contributor coin 
ADD CONTENT
Topic
Content
Source link
Name
2+3 =