You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by jb...@apache.org on 2017/09/03 22:38:27 UTC

[geode-native] branch develop updated: GEODE-3559: Use updated OpenSSH.

This is an automated email from the ASF dual-hosted git repository.

jbarrett pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode-native.git


The following commit(s) were added to refs/heads/develop by this push:
     new 69109ff  GEODE-3559: Use updated OpenSSH.
69109ff is described below

commit 69109ffc16270585ff77abe90d559d06ece86c8b
Author: Jacob Barrett <jb...@pivotal.io>
AuthorDate: Mon Jul 24 13:53:14 2017 -0700

    GEODE-3559: Use updated OpenSSH.
    
    - Updates permisions on downloaded authorized_keys.
    - Remove Windows 2012 related files.
    - Remove unused file.
---
 packer/build-windows.json                    |  28 +++----
 packer/windows-2012-base.json                |  80 --------------------
 packer/windows-2012-r2-base.json             |   7 +-
 packer/windows-2012-r2-vs-2015.json          |  18 ++---
 packer/windows-2012-vs-2013.json             |  64 ----------------
 packer/windows-2012-vs-2015.json             |  70 ------------------
 packer/windows-2012-vs-2017.json             |  64 ----------------
 packer/windows/buildenv.bat                  |  25 -------
 packer/windows/init-ssh.ps1                  |  18 ++++-
 packer/windows/init-user-build.ps1           |  22 ++++--
 packer/windows/install-cygwin.ps1            |  37 ----------
 packer/windows/install-gnuwin.ps1            |  22 ------
 packer/windows/install-ssh.ps1               |  30 ++------
 packer/windows/install-vs-2013-community.ps1 |  26 -------
 packer/windows/install-vs-2015-community.ps1 |  26 -------
 packer/windows/install-vs-2017-community.ps1 |  21 ------
 packer/windows/install-windows-8-wmf-5.ps1   |  21 ------
 packer/windows/run-sshd-as-build.ps1         | 106 ---------------------------
 packer/windows/sshd-recovery.bat             |  19 -----
 19 files changed, 56 insertions(+), 648 deletions(-)

diff --git a/packer/build-windows.json b/packer/build-windows.json
index 8acd8b4..4792ca5 100644
--- a/packer/build-windows.json
+++ b/packer/build-windows.json
@@ -22,8 +22,10 @@
         "version":"{{user `version`}}",
         "source_ami":"{{user `source_ami`}}"
       },
-      "communicator":"winrm",
-      "winrm_username":"Administrator",
+      "communicator":"ssh",
+      "ssh_username":"Administrator",
+      "ssh_handshake_attempts":100,
+      "ssh_timeout":"15m",
       "launch_block_device_mappings":[
         {
           "device_name":"/dev/sda1",
@@ -36,11 +38,6 @@
   "provisioners":[
     {
       "pause_before":"30s",
-      "type":"file",
-      "source":"{{user `gemfire_archive`}}",
-      "destination":"gemfire.tar.gz"
-    },
-    {
       "type":"powershell",
       "inline":[
         "Install-WindowsFeature -name NET-Framework-Core"
@@ -56,26 +53,26 @@
         "choco install doxygen.install --allowEmptyChecksums -confirm",
         "choco install nunit.install --version 2.6.4 -confirm",
         "choco install netfx-4.5.2-devpack --allowEmptyChecksums -confirm",
-        "choco install nsis -confirm"
+        "choco install nsis -confirm",
+        "choco install patch -confirm",
+        "choco install gnuwin32-coreutils.portable -confirm"
       ]
     },
     {
       "type":"file",
-      "source":"windows/Packer.psm1",
-      "destination":"Documents/WindowsPowerShell/Modules/Packer/Packer.psm1"
+      "source":"{{user `gemfire_archive`}}",
+      "destination":"gemfire.tar.gz"
     },
     {
       "type":"powershell",
       "scripts":[
-        "windows/install-gnuwin.ps1",
         "windows/install-gemfire.ps1"
       ]
     },
     {
       "type":"powershell",
       "scripts":[
-        "windows/add-user-build.ps1",
-        "windows/run-sshd-as-build.ps1"
+        "windows/add-user-build.ps1"
       ]
     },
     {
@@ -84,11 +81,6 @@
       "destination":"C:/Users/build/init-user-build.ps1"
     },
     {
-      "type":"file",
-      "source":"windows/buildenv.bat",
-      "destination":"C:/Users/build/buildenv.bat"
-    },
-    {
       "type":"powershell",
       "scripts":[
         "windows/cleanup.ps1"
diff --git a/packer/windows-2012-base.json b/packer/windows-2012-base.json
deleted file mode 100644
index 6a719e0..0000000
--- a/packer/windows-2012-base.json
+++ /dev/null
@@ -1,80 +0,0 @@
-{
-  "variables":{
-    "region":"us-west-2",
-    "source_ami":"ami-990acff9",
-    "source_image_name":"X.vmx",
-    "image_name":"windows-2012-base"
-  },
-  "builders":[
-    {
-      "type":"amazon-ebs",
-      "instance_type":"t2.large",
-      "ami_name":"native-{{user `version`}}-{{user `image_name`}} {{timestamp}}",
-      "access_key":"{{user `aws_access_key`}}",
-      "secret_key":"{{user `aws_secret_key`}}",
-      "region":"{{user `region`}}",
-      "source_ami":"{{user `source_ami`}}",
-      "subnet_id":"{{user `subnet_id`}}",
-      "vpc_id":"{{user `vpc_id`}}",
-      "tags":{
-        "team":"native",
-        "version":"{{user `version`}}",
-        "source_ami":"{{user `source_ami`}}"
-      },
-      "communicator":"winrm",
-      "winrm_username":"Administrator",
-      "user_data_file":"windows/winrm.cloud-init"
-    }
-  ],
-  "provisioners":[
-    {
-      "pause_before":"30s",
-      "type":"file",
-      "source":"windows/Packer.psm1",
-      "destination":"Documents/WindowsPowerShell/Modules/Packer/Packer.psm1"
-    },
-    {
-      "type":"powershell",
-      "scripts":[
-        "windows/install-windows-8-wmf-5.ps1"
-      ]
-    },
-    {
-      "type":"powershell",
-      "scripts":[
-        "windows/install-chocolatey.ps1"
-      ]
-    },
-    {
-      "type":"file",
-      "source":"windows/init-ssh.ps1",
-      "destination":"$Env:ProgramFiles/Amazon/Ec2ConfigService/Scripts/init-ssh.ps1"
-    },
-    {
-      "type":"file",
-      "source":"windows/sshd-recovery.bat",
-      "destination":"$Env:ProgramFiles/OpenSSH-Win64/sshd-recovery.bat"
-    },
-    {
-      "type":"powershell",
-      "scripts":[
-        "windows/install-ssh.ps1"
-      ]
-    },
-    {
-      "type":"powershell",
-      "scripts":[
-        "windows/cleanup.ps1"
-      ]
-    },
-    {
-      "type":"powershell",
-      "scripts":[
-        "windows/setup-ec2config.ps1"
-      ],
-      "only":[
-        "amazon-ebs"
-      ]
-    }
-  ]
-}
\ No newline at end of file
diff --git a/packer/windows-2012-r2-base.json b/packer/windows-2012-r2-base.json
index d211116..50ed0c0 100644
--- a/packer/windows-2012-r2-base.json
+++ b/packer/windows-2012-r2-base.json
@@ -51,11 +51,6 @@
       "destination":"$Env:ProgramFiles/Amazon/Ec2ConfigService/Scripts/init-ssh.ps1"
     },
     {
-      "type":"file",
-      "source":"windows/sshd-recovery.bat",
-      "destination":"$Env:ProgramFiles/OpenSSH-Win64/sshd-recovery.bat"
-    },
-    {
       "type":"powershell",
       "scripts":[
         "windows/install-ssh.ps1"
@@ -77,4 +72,4 @@
       ]
     }
   ]
-}
\ No newline at end of file
+}
diff --git a/packer/windows-2012-r2-vs-2015.json b/packer/windows-2012-r2-vs-2015.json
index dc9c4ff..f795d92 100644
--- a/packer/windows-2012-r2-vs-2015.json
+++ b/packer/windows-2012-r2-vs-2015.json
@@ -21,8 +21,10 @@
         "version":"{{user `version`}}",
         "source_ami":"{{user `source_ami`}}"
       },
-      "communicator":"winrm",
-      "winrm_username":"Administrator",
+      "communicator":"ssh",
+      "ssh_username":"Administrator",
+      "ssh_handshake_attempts":100,
+      "ssh_timeout":"15m",
       "launch_block_device_mappings":[
         {
           "device_name":"/dev/sda1",
@@ -36,19 +38,13 @@
     {
       "pause_before":"30s",
       "type":"file",
-      "source":"windows/Packer.psm1",
-      "destination":"Documents/WindowsPowerShell/Modules/Packer/Packer.psm1"
-    },
-    {
-      "pause_before":"30s",
-      "type":"file",
       "source":"windows/vs-2015-admin.xml",
-      "destination":"C:/vs-2015-admin.xml"
+      "destination":"vs-2015-admin.xml"
     },
     {
       "type":"powershell",
-      "scripts":[
-        "windows/install-vs-2015-community.ps1"
+      "inline":[
+        "choco install visualstudio2015community -y --ignore-package-exit-codes --ia \"/AdminFile C:\\Users\\Administrator\\vs-2015-admin.xml\""
       ]
     },
     {
diff --git a/packer/windows-2012-vs-2013.json b/packer/windows-2012-vs-2013.json
deleted file mode 100644
index 9052aca..0000000
--- a/packer/windows-2012-vs-2013.json
+++ /dev/null
@@ -1,64 +0,0 @@
-{
-  "variables":{
-    "region":"us-west-2",
-    "source_ami":"ami-ac5395cc",
-    "source_image_name":"X.vmx",
-    "image_name":"windows-2012-vs-2013"
-  },
-  "builders":[
-    {
-      "type":"amazon-ebs",
-      "instance_type":"t2.large",
-      "ami_name":"native-{{user `version`}}-{{user `image_name`}} {{timestamp}}",
-      "access_key":"{{user `aws_access_key`}}",
-      "secret_key":"{{user `aws_secret_key`}}",
-      "region":"{{user `region`}}",
-      "source_ami":"{{user `source_ami`}}",
-      "subnet_id":"{{user `subnet_id`}}",
-      "vpc_id":"{{user `vpc_id`}}",
-      "tags":{
-        "team":"native",
-        "version":"{{user `version`}}",
-        "source_ami":"{{user `source_ami`}}"
-      },
-      "communicator":"winrm",
-      "winrm_username":"Administrator",
-      "launch_block_device_mappings":[
-        {
-          "device_name":"/dev/sda1",
-          "delete_on_termination":true,
-          "volume_size":60
-        }
-      ]
-    }
-  ],
-  "provisioners":[
-    {
-      "pause_before":"30s",
-      "type":"file",
-      "source":"windows/Packer.psm1",
-      "destination":"Documents/WindowsPowerShell/Modules/Packer/Packer.psm1"
-    },
-    {
-      "type":"powershell",
-      "scripts":[
-        "windows/install-vs-2013-community.ps1"
-      ]
-    },
-    {
-      "type":"powershell",
-      "scripts":[
-        "windows/cleanup.ps1"
-      ]
-    },
-    {
-      "type":"powershell",
-      "scripts":[
-        "windows/setup-ec2config.ps1"
-      ],
-      "only":[
-        "amazon-ebs"
-      ]
-    }
-  ]
-}
\ No newline at end of file
diff --git a/packer/windows-2012-vs-2015.json b/packer/windows-2012-vs-2015.json
deleted file mode 100644
index 8a42a17..0000000
--- a/packer/windows-2012-vs-2015.json
+++ /dev/null
@@ -1,70 +0,0 @@
-{
-  "variables":{
-    "region":"us-west-2",
-    "source_ami":"",
-    "source_image_name":"",
-    "image_name":"windows-2012-r2-vs-2015"
-  },
-  "builders":[
-    {
-      "type":"amazon-ebs",
-      "instance_type":"t2.large",
-      "ami_name":"native-{{user `version`}}-{{user `image_name`}} {{timestamp}}",
-      "access_key":"{{user `aws_access_key`}}",
-      "secret_key":"{{user `aws_secret_key`}}",
-      "region":"{{user `region`}}",
-      "source_ami":"{{user `source_ami`}}",
-      "subnet_id":"{{user `subnet_id`}}",
-      "vpc_id":"{{user `vpc_id`}}",
-      "tags":{
-        "team":"native",
-        "version":"{{user `version`}}",
-        "source_ami":"{{user `source_ami`}}"
-      },
-      "communicator":"winrm",
-      "winrm_username":"Administrator",
-      "launch_block_device_mappings":[
-        {
-          "device_name":"/dev/sda1",
-          "delete_on_termination":true,
-          "volume_size":60
-        }
-      ]
-    }
-  ],
-  "provisioners":[
-    {
-      "pause_before":"30s",
-      "type":"file",
-      "source":"windows/Packer.psm1",
-      "destination":"Documents/WindowsPowerShell/Modules/Packer/Packer.psm1"
-    },
-    {
-      "pause_before":"30s",
-      "type":"file",
-      "source":"windows/vs-2015-admin.xml",
-      "destination":"C:/vs-2015-admin.xml"
-    },
-    {
-      "type":"powershell",
-      "scripts":[
-        "windows/install-vs-2015-community.ps1"
-      ]
-    },
-    {
-      "type":"powershell",
-      "scripts":[
-        "windows/cleanup.ps1"
-      ]
-    },
-    {
-      "type":"powershell",
-      "scripts":[
-        "windows/setup-ec2config.ps1"
-      ],
-      "only":[
-        "amazon-ebs"
-      ]
-    }
-  ]
-}
diff --git a/packer/windows-2012-vs-2017.json b/packer/windows-2012-vs-2017.json
deleted file mode 100644
index ad72f3a..0000000
--- a/packer/windows-2012-vs-2017.json
+++ /dev/null
@@ -1,64 +0,0 @@
-{
-  "variables":{
-    "region":"us-west-2",
-    "source_ami":"ami-ac5395cc",
-    "source_image_name":"X.vmx",
-    "image_name":"windows-2012-vs-2017"
-  },
-  "builders":[
-    {
-      "type":"amazon-ebs",
-      "instance_type":"t2.large",
-      "ami_name":"native-{{user `version`}}-{{user `image_name`}} {{timestamp}}",
-      "access_key":"{{user `aws_access_key`}}",
-      "secret_key":"{{user `aws_secret_key`}}",
-      "region":"{{user `region`}}",
-      "source_ami":"{{user `source_ami`}}",
-      "subnet_id":"{{user `subnet_id`}}",
-      "vpc_id":"{{user `vpc_id`}}",
-      "tags":{
-        "team":"native",
-        "version":"{{user `version`}}",
-        "source_ami":"{{user `source_ami`}}"
-      },
-      "communicator":"winrm",
-      "winrm_username":"Administrator",
-      "launch_block_device_mappings":[
-        {
-          "device_name":"/dev/sda1",
-          "delete_on_termination":true,
-          "volume_size":60
-        }
-      ]
-    }
-  ],
-  "provisioners":[
-    {
-      "pause_before":"30s",
-      "type":"file",
-      "source":"windows/Packer.psm1",
-      "destination":"Documents/WindowsPowerShell/Modules/Packer/Packer.psm1"
-    },
-    {
-      "type":"powershell",
-      "scripts":[
-        "windows/install-vs-2017-community.ps1"
-      ]
-    },
-    {
-      "type":"powershell",
-      "scripts":[
-        "windows/cleanup.ps1"
-      ]
-    },
-    {
-      "type":"powershell",
-      "scripts":[
-        "windows/setup-ec2config.ps1"
-      ],
-      "only":[
-        "amazon-ebs"
-      ]
-    }
-  ]
-}
diff --git a/packer/windows/buildenv.bat b/packer/windows/buildenv.bat
deleted file mode 100644
index fa02cf3..0000000
--- a/packer/windows/buildenv.bat
+++ /dev/null
@@ -1,25 +0,0 @@
-@rem Licensed to the Apache Software Foundation (ASF) under one or more
-@rem contributor license agreements.  See the NOTICE file distributed with
-@rem this work for additional information regarding copyright ownership.
-@rem The ASF licenses this file to You under the Apache License, Version 2.0
-@rem (the "License"); you may not use this file except in compliance with
-@rem the License.  You may obtain a copy of the License at
-@rem 
-@rem      http://www.apache.org/licenses/LICENSE-2.0
-@rem 
-@rem Unless required by applicable law or agreed to in writing, software
-@rem distributed under the License is distributed on an "AS IS" BASIS,
-@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-@rem See the License for the specific language governing permissions and
-@rem limitations under the License.
-
-@rem Fixup ENV issues with SSH
-set APPDATA=C:\Users\build\AppData\Roaming
-set LOCALAPPDATA=C:\Users\build\AppData\Local
-set TEMP=C:\Users\build\AppData\Local\Temp\3
-set TMP=C:\Users\build\AppData\Local\Temp\3
-if not exist %TEMP% mkdir %TEMP%
-
-@rem Setup VC
-call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" %*
-
diff --git a/packer/windows/init-ssh.ps1 b/packer/windows/init-ssh.ps1
index 415bb08..71fcb8f 100644
--- a/packer/windows/init-ssh.ps1
+++ b/packer/windows/init-ssh.ps1
@@ -4,15 +4,14 @@
 # The ASF licenses this file to You under the Apache License, Version 2.0
 # (the "License"); you may not use this file except in compliance with
 # the License.  You may obtain a copy of the License at
-# 
+#
 #      http://www.apache.org/licenses/LICENSE-2.0
-# 
+#
 # Unless required by applicable law or agreed to in writing, software
 # distributed under the License is distributed on an "AS IS" BASIS,
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-# TODO host keys
 
 $ssh = "C:\Users\Administrator\.ssh"
 $authorized_keys = "$ssh\authorized_keys"
@@ -23,4 +22,17 @@ if ( -not (Test-Path $authorized_keys -PathType Leaf) ) {
   mkdir -p $ssh -ErrorAction SilentlyContinue
 
   Invoke-WebRequest -Uri 'http://169.254.169.254/latest/meta-data/public-keys/0/openssh-key' -OutFile $authorized_keys
+
+  # Give sshd permission to read authorized_keys
+  Import-Module 'C:\Program Files\OpenSSH-Win64\OpenSSHUtils' -force
+
+  $currentUserSid = Get-UserSID -User "NT SERVICE\sshd"
+  $account = Get-UserAccount -UserSid $currentUserSid
+  $ace = New-Object System.Security.AccessControl.FileSystemAccessRule `
+                            ($account, "Read", "None", "None", "Allow")
+  $acl = Get-Acl $authorized_keys
+  $acl.AddAccessRule($ace)
+  Enable-Privilege SeRestorePrivilege | out-null
+  Set-Acl -Path $authorized_keys -AclObject $acl -Confirm:$false
+
 }
diff --git a/packer/windows/init-user-build.ps1 b/packer/windows/init-user-build.ps1
index 589639a..20fd98b 100644
--- a/packer/windows/init-user-build.ps1
+++ b/packer/windows/init-user-build.ps1
@@ -4,14 +4,15 @@
 # The ASF licenses this file to You under the Apache License, Version 2.0
 # (the "License"); you may not use this file except in compliance with
 # the License.  You may obtain a copy of the License at
-# 
+#
 #      http://www.apache.org/licenses/LICENSE-2.0
-# 
+#
 # Unless required by applicable law or agreed to in writing, software
 # distributed under the License is distributed on an "AS IS" BASIS,
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
+
 $ssh = "C:\Users\build\.ssh"
 $authorized_keys = "$ssh\authorized_keys"
 if ( -not (Test-Path $authorized_keys -PathType Leaf) ) {
@@ -21,8 +22,17 @@ if ( -not (Test-Path $authorized_keys -PathType Leaf) ) {
   mkdir -p $ssh -ErrorAction SilentlyContinue
 
   Invoke-WebRequest -Uri 'http://169.254.169.254/latest/meta-data/public-keys/0/openssh-key' -OutFile $authorized_keys
-  
-  Stop-Service sshd
-  Start-Service sshd
-}
 
+  # Give sshd permission to read authorized_keys
+  Import-Module 'C:\Program Files\OpenSSH-Win64\OpenSSHUtils' -force
+
+  $currentUserSid = Get-UserSID -User "NT SERVICE\sshd"
+  $account = Get-UserAccount -UserSid $currentUserSid
+  $ace = New-Object System.Security.AccessControl.FileSystemAccessRule `
+                            ($account, "Read", "None", "None", "Allow")
+  $acl = Get-Acl $authorized_keys
+  $acl.AddAccessRule($ace)
+  Enable-Privilege SeRestorePrivilege | out-null
+  Set-Acl -Path $authorized_keys -AclObject $acl -Confirm:$false
+
+}
diff --git a/packer/windows/install-cygwin.ps1 b/packer/windows/install-cygwin.ps1
deleted file mode 100644
index 6b5339b..0000000
--- a/packer/windows/install-cygwin.ps1
+++ /dev/null
@@ -1,37 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-# 
-#      http://www.apache.org/licenses/LICENSE-2.0
-# 
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-$ErrorActionPreference = "Stop"
-
-# Chocolatey broken
-#choco install cygwin cyg-get -confirm
-#cyg-get git make
-#exit 0
-
-Import-Module Packer
-
-Install-Package https://cygwin.com/setup-x86_64.exe `
-    -Hash 08079A13888B74F6466DEF307A687E02CB26FC257EA2FA78D40F02E28330FD56 `
-    -ArgumentList @(
-        "--quiet-mode",
-        "--verbose",
-        "--site", "http://cygwin.osuosl.org", 
-        "--packages", "git,patch,make"
-        )
-
-# Set Cygwin home to Windows profile
-Add-Content C:\cygwin64\etc\nsswitch.conf "db_home: /%H"
-
-# Remove Perl to avoid conflicts with AvtivePerl
-Remove-Item -Path C:\cygwin64\bin\perl.exe
diff --git a/packer/windows/install-gnuwin.ps1 b/packer/windows/install-gnuwin.ps1
deleted file mode 100644
index 3a2bc4b..0000000
--- a/packer/windows/install-gnuwin.ps1
+++ /dev/null
@@ -1,22 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-# 
-#      http://www.apache.org/licenses/LICENSE-2.0
-# 
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-$ErrorActionPreference = "Stop"
-
-choco install gnuwin --allowEmptyChecksums -confirm
-
-# Fixup system path since installer puts it in user path
-$env:Path += ";" + "C:\GnuWin\bin"
-
-[Environment]::SetEnvironmentVariable( "Path", $env:Path, [System.EnvironmentVariableTarget]::Machine )
diff --git a/packer/windows/install-ssh.ps1 b/packer/windows/install-ssh.ps1
index 009db59..9faec8f 100644
--- a/packer/windows/install-ssh.ps1
+++ b/packer/windows/install-ssh.ps1
@@ -4,36 +4,20 @@
 # The ASF licenses this file to You under the Apache License, Version 2.0
 # (the "License"); you may not use this file except in compliance with
 # the License.  You may obtain a copy of the License at
-# 
+#
 #      http://www.apache.org/licenses/LICENSE-2.0
-# 
+#
 # Unless required by applicable law or agreed to in writing, software
 # distributed under the License is distributed on an "AS IS" BASIS,
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-# Install sshd
-
-write-host "Installing OpenSSH"
-choco install win32-openssh -version 2016.05.30 -params '"/SSHServerFeature /KeyBasedAuthenticationFeature"' -confirm 
 
-# Chocolatey installer fails to setup permissions correctly via WinRM these scripts until fixed
-Push-Location
-cd "C:\Program Files\OpenSSH-Win64"
-& "C:\Program Files\OpenSSH-Win64\install-sshd.ps1"
-Set-Service sshd -StartupType Automatic
-Set-Service ssh-agent -StartupType Automatic
-& "C:\Program Files\OpenSSH-Win64\install-sshlsa.ps1"
-Pop-Location
-
-(Get-Content "C:\Program Files\OpenSSH-Win64\sshd_config") -replace 'C:/Program Files/OpenSSH', 'C:/Program Files/OpenSSH-Win64' | Set-Content "C:\Program Files\OpenSSH-Win64\sshd_config"
+# Install sshd
 
-# Configure services to restart after failure
-sc.exe failure sshd reset= 86400 actions= run/1000 command= "C:\Program Files\OpenSSH-Win64\sshd-recovery.bat"
-sc.exe failure ssh-agent reset= 86400 actions= restart/1000
+$ErrorActionPreference = "Stop"
 
-sc.exe sdset "sshd" "D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;IU)(A;;CCLCSWLOCRRC;;;SU)(A;;RPWPDTLO;;;S-1-5-80-3847866527-469524349-687026318-516638107-1125189541)S:(AU;FA;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;WD)"
-sc.exe sdset "ssh-agent" "D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;IU)(A;;CCLCSWLOCRRC;;;SU)(A;;RP;;;AU)(A;;RPWPDTLO;;;S-1-5-80-3847866527-469524349-687026318-516638107-1125189541)S:(AU;FA;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;WD)"
+write-host "Installing OpenSSH"
+choco install openssh -params '"/SSHServerFeature"' -confirm
 
-schtasks.exe /Create /TN init-ssh /RU SYSTEM /SC ONSTART /TR "powershell.exe -File 'C:\Program Files\Amazon\Ec2ConfigService\Scripts\init-ssh.ps1'" 
-#debug schtasks.exe /Query /TN init-ssh /XML
+schtasks.exe /Create /TN init-ssh /RU SYSTEM /SC ONSTART /TR "powershell.exe -File 'C:\Program Files\Amazon\Ec2ConfigService\Scripts\init-ssh.ps1'"
diff --git a/packer/windows/install-vs-2013-community.ps1 b/packer/windows/install-vs-2013-community.ps1
deleted file mode 100644
index 5edae49..0000000
--- a/packer/windows/install-vs-2013-community.ps1
+++ /dev/null
@@ -1,26 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-# 
-#      http://www.apache.org/licenses/LICENSE-2.0
-# 
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-# TODO AdminDeploy.xml
-# vs_community.exe /AdminFile C:\Users\Administrator\AdminDeployment.xml /Log setup.log /Passive
-Set-PSDebug -Trace 0
-
-Import-Module Packer
-
-$log = "vs_community.log"
-
-Install-Package https://download.microsoft.com/download/A/A/D/AAD1AA11-FF9A-4B3C-8601-054E89260B78/vs_community.exe `
-    -Hash EA57DF0294AE3CE4B893D19D497AEC02D1627F40B9576BC7013588DF79A0C528 `
-    -ArgumentList @("/quiet", "/log", $log) `
-    -Log $log -Verbose
diff --git a/packer/windows/install-vs-2015-community.ps1 b/packer/windows/install-vs-2015-community.ps1
deleted file mode 100644
index d9addda..0000000
--- a/packer/windows/install-vs-2015-community.ps1
+++ /dev/null
@@ -1,26 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-# 
-#      http://www.apache.org/licenses/LICENSE-2.0
-# 
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-# TODO AdminDeploy.xml
-# vs_community.exe /AdminFile C:\Users\Administrator\AdminDeployment.xml /Log setup.log /Passive
-Set-PSDebug -Trace 0
-
-Import-Module Packer
-
-$log = "vs_community.log"
-
-Install-Package https://download.microsoft.com/download/e/4/c/e4c393a9-8fff-441b-ad3a-3f4040317a1f/vs_community.exe `
-    -Hash ED8D88D0AB88832754302BFC2A374E803B3A21C1590B428092944272F9EA30FE `
-    -ArgumentList @("/AdminFile", "C:\\vs-2015-admin.xml", "/quiet", "/log", $log) `
-    -Log $log -Verbose
diff --git a/packer/windows/install-vs-2017-community.ps1 b/packer/windows/install-vs-2017-community.ps1
deleted file mode 100644
index 81c5d0f..0000000
--- a/packer/windows/install-vs-2017-community.ps1
+++ /dev/null
@@ -1,21 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-# 
-#      http://www.apache.org/licenses/LICENSE-2.0
-# 
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-# TODO AdminDeploy.xml
-# vs_community.exe /AdminFile C:\Users\Administrator\AdminDeployment.xml /Log setup.log /Passive
-Set-PSDebug -Trace 2
-
-choco install visualstudio2017community -y --ignore-package-exit-codes
-
-Exit 0
diff --git a/packer/windows/install-windows-8-wmf-5.ps1 b/packer/windows/install-windows-8-wmf-5.ps1
deleted file mode 100644
index f3ebb40..0000000
--- a/packer/windows/install-windows-8-wmf-5.ps1
+++ /dev/null
@@ -1,21 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-# 
-#      http://www.apache.org/licenses/LICENSE-2.0
-# 
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-$ErrorActionPreference = "Stop"
-
-Import-Module Packer
-
-Install-Package https://download.microsoft.com/download/2/C/6/2C6E1B4A-EBE5-48A6-B225-2D2058A9CEFB/W2K12-KB3134759-x64.msu `
-    -Hash 6E59CEC4BD30C505F426A319673A13C4A9AA8D8FF69FD0582BFA89F522F5FF00 `
-    -MsuPackage .\Windows8-RT-KB3134759-x64.cab 
\ No newline at end of file
diff --git a/packer/windows/run-sshd-as-build.ps1 b/packer/windows/run-sshd-as-build.ps1
deleted file mode 100755
index 1f1eb0a..0000000
--- a/packer/windows/run-sshd-as-build.ps1
+++ /dev/null
@@ -1,106 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-# 
-#      http://www.apache.org/licenses/LICENSE-2.0
-# 
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-$accountToAdd = "build"
-
-#written by Ingo Karstein, http://blog.karstein-consulting.com
-#  v1.0, 01/03/2014
-
-## <--- Configure here
-
-if( [string]::IsNullOrEmpty($accountToAdd) ) {
-	Write-Host "no account specified"
-	exit
-}
-
-## ---> End of Config
-
-$sidstr = $null
-try {
-	$ntprincipal = new-object System.Security.Principal.NTAccount "$accountToAdd"
-	$sid = $ntprincipal.Translate([System.Security.Principal.SecurityIdentifier])
-	$sidstr = $sid.Value.ToString()
-} catch {
-	$sidstr = $null
-}
-
-Write-Host "Account: $($accountToAdd)" -ForegroundColor DarkCyan
-
-if( [string]::IsNullOrEmpty($sidstr) ) {
-	Write-Host "Account not found!" -ForegroundColor Red
-	exit -1
-}
-
-Write-Host "Account SID: $($sidstr)" -ForegroundColor DarkCyan
-
-$tmp = [System.IO.Path]::GetTempFileName()
-
-Write-Host "Export current Local Security Policy" -ForegroundColor DarkCyan
-secedit.exe /export /cfg "$($tmp)" 
-
-$c = Get-Content -Path $tmp 
-
-$currentSetting = ""
-
-foreach($s in $c) {
-	if( $s -like "SeServiceLogonRight*") {
-		$x = $s.split("=",[System.StringSplitOptions]::RemoveEmptyEntries)
-		$currentSetting = $x[1].Trim()
-	}
-}
-
-if( $currentSetting -notlike "*$($sidstr)*" ) {
-	Write-Host "Modify Setting ""Logon as a Service""" -ForegroundColor DarkCyan
-	
-	if( [string]::IsNullOrEmpty($currentSetting) ) {
-		$currentSetting = "*$($sidstr)"
-	} else {
-		$currentSetting = "*$($sidstr),$($currentSetting)"
-	}
-	
-	Write-Host "$currentSetting"
-	
-	$outfile = @"
-[Unicode]
-Unicode=yes
-[Version]
-signature="`$CHICAGO`$"
-Revision=1
-[Privilege Rights]
-SeServiceLogonRight = $($currentSetting)
-"@
-
-	$tmp2 = [System.IO.Path]::GetTempFileName()
-	
-	
-	Write-Host "Import new settings to Local Security Policy" -ForegroundColor DarkCyan
-	$outfile | Set-Content -Path $tmp2 -Encoding Unicode -Force
-
-	#notepad.exe $tmp2
-	Push-Location (Split-Path $tmp2)
-	
-	try {
-		secedit.exe /configure /db "secedit.sdb" /cfg "$($tmp2)" /areas USER_RIGHTS 
-		#write-host "secedit.exe /configure /db ""secedit.sdb"" /cfg ""$($tmp2)"" /areas USER_RIGHTS "
-	} finally {	
-		Pop-Location
-	}
-} else {
-	Write-Host "NO ACTIONS REQUIRED! Account already in ""Logon as a Service""" -ForegroundColor DarkCyan
-}
-
-Write-Host "Done." -ForegroundColor DarkCyan
-
-# Configure the sshd service
-cmd /c sc config sshd obj= .\build password= p1votal!
diff --git a/packer/windows/sshd-recovery.bat b/packer/windows/sshd-recovery.bat
deleted file mode 100644
index 2b278f0..0000000
--- a/packer/windows/sshd-recovery.bat
+++ /dev/null
@@ -1,19 +0,0 @@
-@rem Licensed to the Apache Software Foundation (ASF) under one or more
-@rem contributor license agreements.  See the NOTICE file distributed with
-@rem this work for additional information regarding copyright ownership.
-@rem The ASF licenses this file to You under the Apache License, Version 2.0
-@rem (the "License"); you may not use this file except in compliance with
-@rem the License.  You may obtain a copy of the License at
-@rem 
-@rem      http://www.apache.org/licenses/LICENSE-2.0
-@rem 
-@rem Unless required by applicable law or agreed to in writing, software
-@rem distributed under the License is distributed on an "AS IS" BASIS,
-@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-@rem See the License for the specific language governing permissions and
-@rem limitations under the License.
-
-net stop ssh-agent /y
-net stop sshd /y
-net start sshd /y
-net start ssh-agent /y

-- 
To stop receiving notification emails like this one, please contact
['"commits@geode.apache.org" <co...@geode.apache.org>'].