Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-70093

EC2 Plugin does not allow SSH connection to Windows instances (natively)

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Critical Critical
    • ec2-plugin
    • AWS EC2
      Linux (Controller + Agents)
      Windows (Agents)

      Windows has a native port of OpenSSH since years now. Connecting to static Windows agents via SSH (SSH agent plugin) also works fine. But the EC2 plugin still insists on connecting through WinRM (which is a nightmare in itself) or requires the workaround of setting the type to "unix" (with all the implications this may have).

      Please fix this bug.

          [JENKINS-70093] EC2 Plugin does not allow SSH connection to Windows instances (natively)

          Matt Grochowalski added a comment - - edited

          This would be useful for me as well, although I'd classify it more as an enhancement.

          For reference you can set up AWS instances to use SSH auth via what's described in https://jen20.dev/post/windows-amis-with-even-fewer-tears/

          You can replace all the OpenSSH download stuff in that article with:
          Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0

          I needed to remove the bit setting the default shell to Powershell as well (for Packer); not sure what this plugin expects.

          Matt Grochowalski added a comment - - edited This would be useful for me as well, although I'd classify it more as an enhancement. For reference you can set up AWS instances to use SSH auth via what's described in https://jen20.dev/post/windows-amis-with-even-fewer-tears/ You can replace all the OpenSSH download stuff in that article with: Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0 I needed to remove the bit setting the default shell to Powershell as well (for Packer); not sure what this plugin expects.

          I agree, WinRm is making it unfeasible to use the plugin for Windows VMs.

          Rodrigo Luiz Galdino Camargo added a comment - I agree, WinRm is making it unfeasible to use the plugin for Windows VMs.

          prasannakumar added a comment -

          Did anyone find an workaround for this? I am stuck in this issue

          prasannakumar added a comment - Did anyone find an workaround for this? I am stuck in this issue

          Hey prasperl

           

          You can try the instructions for using SSH that I posted in a comment on Stackoverflow (link below). I hope this helps you in some way.

           

          https://stackoverflow.com/questions/38011683/how-to-run-windows-instance-on-ec2-from-jenkins/76857701#76857701

          Rodrigo Luiz Galdino Camargo added a comment - Hey prasperl   You can try the instructions for using SSH that I posted in a comment on Stackoverflow (link below). I hope this helps you in some way.   https://stackoverflow.com/questions/38011683/how-to-run-windows-instance-on-ec2-from-jenkins/76857701#76857701

            thoulen FABRIZIO MANFREDI
            dhs Dirk Heinrichs
            Votes:
            3 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: