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

Support Win32-OpenSSH

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Component/s: ssh-slaves-plugin
    • Labels:
      None
    • Environment:
      Windows >= Vista/Server 2008 64-bit, Win32-OpenSSH
    • Similar Issues:
    • Released As:
      ssh-slaves-1.27

      Description

      Microsoft's Powershell team is working on an 'official' port of OpenSSH here, with the stated goal of integrating their changes back into the OpenSSH project. The current implementation is different than other OpenSSH servers this plugin works with for a couple of reasons:

      • non-interactive sessions do not run in a shell by default, i.e. builtins like 'cd' are just not available. It's required to run 'cmd /c cd' instead.
      • standard unix/bash tools like test, set, rm, mkdir, etc. are either cmd.exe builtins or are otherwise not available by default.
      • command options or output can be different on Windows, e.g. 'set' prints quoted values in bash, but the cmd.exe builtin version does not.

      With the 5/30/2016 release it's possible to get to startSlave() by adding 'test' and 'set' workalike binaries to the install directory, but startslave() itself barfs trying to run 'cd'. AFAIK it is not possible to reimplement 'cd' in win32 as a standalone utility, so there's no easy workaround.

      The Win32-OpenSSH behavior when this happens has been brought up in at least two issues, and it doesn't seem like the dev team wants to (or can) make their implementation work more like 'standard' OpenSSH in this regard. So if this ssh slaves plugin wants to work with Win32-OpenSSH it might be necessary to offer Windows-specific test and startup commands.

        Attachments

          Issue Links

            Activity

            Hide
            jcoeltjen Jannis Oeltjen added a comment -

            Using a simple fix as I made in this PR (https://github.com/jenkinsci/ssh-slaves-plugin/pull/97) I can successfully use the ssh-slaves-plugin to start a windows slave with the native OpenSSH Version installed.

            After a quick look around the code I don't think that there are too many incompatible segments.
            I will report how the native OpenSSH windows slaves perform in our environment.

             

            Show
            jcoeltjen Jannis Oeltjen added a comment - Using a simple fix as I made in this PR ( https://github.com/jenkinsci/ssh-slaves-plugin/pull/97)  I can successfully use the ssh-slaves-plugin to start a windows slave with the native OpenSSH Version installed. After a quick look around the code I don't think that there are too many incompatible segments. I will report how the native OpenSSH windows slaves perform in our environment.  
            Hide
            wgc123 D Pasto added a comment -

            Any updates on how this went, or whether you're planning to pursue releasing this?  Can it execute things requiring interaction with the desktop, such as Selenium tests?  Is it not ready for prime time?  Is Windows OpenSSH just not ready yet?

            Show
            wgc123 D Pasto added a comment - Any updates on how this went, or whether you're planning to pursue releasing this?  Can it execute things requiring interaction with the desktop, such as Selenium tests?  Is it not ready for prime time?  Is Windows OpenSSH just not ready yet?
            Hide
            ifernandezcalvo Ivan Fernandez Calvo added a comment - - edited

            For the moment it needs a workaround, see https://github.com/jenkinsci/ssh-slaves-plugin/blob/master/doc/CONFIGURE.md#launch-windows-slaves-using-microsoft-openssh

            >Can it execute things requiring interaction with the desktop, such as Selenium tests?

            I suppose yes, but I did not test it

            Show
            ifernandezcalvo Ivan Fernandez Calvo added a comment - - edited For the moment it needs a workaround, see https://github.com/jenkinsci/ssh-slaves-plugin/blob/master/doc/CONFIGURE.md#launch-windows-slaves-using-microsoft-openssh >Can it execute things requiring interaction with the desktop, such as Selenium tests? I suppose yes, but I did not test it

              People

              Assignee:
              ifernandezcalvo Ivan Fernandez Calvo
              Reporter:
              wsaxon Will Saxon
              Votes:
              4 Vote for this issue
              Watchers:
              7 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: