backup windows terminal png
[webi-installers/.git] / ssh-utils / ssh-pubkey.ps1
index 3af6a590af3ffe7d67fb8187393574dc3b00405b..0951caa8de2ed7d073c1b150e4edbf77f24e33f2 100644 (file)
@@ -6,27 +6,27 @@
 if (!(Test-Path -Path "$Env:USERPROFILE/.ssh"))
 {
     New-Item -Path "$Env:USERPROFILE/.ssh" -ItemType Directory
-    & icacls "$Env:USERPROFILE/.ssh" /inheritance:r
-    & icacls "$Env:USERPROFILE/.ssh" /grant:r "%username%":"(F)"
+    #& icacls "$Env:USERPROFILE/.ssh" /inheritance:r
+    #& icacls "$Env:USERPROFILE/.ssh" /grant:r "$Env:USERNAME":"(F)"
 }
 
 if (!(Test-Path -Path "$Env:USERPROFILE/.ssh/config"))
 {
     New-Item -Path "$Env:USERPROFILE/.ssh/config" -ItemType "file" -Value ""
-    & icacls "$Env:USERPROFILE/.ssh/config" /inheritance:r
-    & icacls "$Env:USERPROFILE/.ssh/config" /grant:r "%username%":"(F)"
+    #& icacls "$Env:USERPROFILE/.ssh/config" /inheritance:r
+    #& icacls "$Env:USERPROFILE/.ssh/config" /grant:r "$Env:USERNAME":"(F)"
 }
 
-if (!(Test-Path -Path "$Env:USERPROFILE/.ssh/authorized_keys"))
-{
-    New-Item -Path "$Env:USERPROFILE/.ssh/authorized_keys" -ItemType "file" -Value ""
-    & icacls "$Env:USERPROFILE/.ssh/authorized_keys" /inheritance:r
-    & icacls "$Env:USERPROFILE/.ssh/authorized_keys" /grant:r "%username%":"(F)"
-}
+#if (!(Test-Path -Path "$Env:USERPROFILE/.ssh/authorized_keys"))
+#{
+#    New-Item -Path "$Env:USERPROFILE/.ssh/authorized_keys" -ItemType "file" -Value ""
+#    #& icacls "$Env:USERPROFILE/.ssh/authorized_keys" /inheritance:r
+#    #& icacls "$Env:USERPROFILE/.ssh/authorized_keys" /grant:r "$Env:USERNAME":"(F)"
+#}
 
 if (!(Test-Path -Path "$Env:USERPROFILE/.ssh/id_rsa"))
 {
-    & ssh-keygen -b 2048 -t rsa -f "$Env:USERPROFILE/.ssh/id_rsa" -q -N ""
+    & ssh-keygen -b 2048 -t rsa -f "$Env:USERPROFILE/.ssh/id_rsa" -q -N """"
     echo ""
 }