ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Win10 native SSH with BASH for Windows

    IT Discussion
    3
    16
    2.8k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • ObsolesceO
      Obsolesce @scottalanmiller
      last edited by Obsolesce

      @scottalanmiller said in Win10 native SSH with BASH for Windows:

      The confusing bit is that SSH is available for Windows. Microsoft has provided it for a while now. It's real SSH for Windows. If you just want SSH to a container you have had that for decades with virtual machines with Linux on top of Windows.

      I had one simple goal. It was to securely transfer files from WinServer1 to Win10Client1 via SSH.

      I figured out a rather simple way to do just that by doing nothing more than enabling developer mode in Win10, and enabling Windows Subsystem for Linux.

      If Microsoft has their own native Windows client SSH server (as you suggested), then I was not aware of it. That would be much better than how I am doing it now, as long as it's just as secure as open-ssh and supports RSA Authentication. I would prefer to have developer mode off, and I would also prefer to not have to do it through a Linux container on the Win10 client. Additionally, I would also prefer to not have to use WinSCP on WinServer1.

      Could you provide me with a link to Microsoft's SSH Server? I did a quick search and found things like this:

      • https://blogs.msdn.microsoft.com/powershell/2015/10/19/openssh-for-windows-update/
      • https://github.com/PowerShell/Win32-OpenSSH
      • https://www.linkedin.com/pulse/fastest-way-get-your-hands-new-win32-openssh-darwin-sanoy

      Going off of that stuff, it looks like a witch hunt and a real pain to get set up, unless I am misinterpreting it. I unfortunately don't know what to do to get it installed and set up just from looking at it quick in the above links. The way you worded it, seemed like a quick double-click .exe to install, configure, done. That doesn't seem to be the case.

      So I think I'll keep what I have, as it's just so simple to do and doesn't require any more time.

      Did you have a better direction to point me to?

      scottalanmillerS 1 Reply Last reply Reply Quote 0
      • scottalanmillerS
        scottalanmiller @Obsolesce
        last edited by

        @Tim_G the Microsoft "official" server is an MS port of OpenSSH. So you get the full OpenSSH stack. I use Chocolatey to deploy it. MS provides it via NuGet and Chocolatey picks it up directly.

        ObsolesceO 1 Reply Last reply Reply Quote 1
        • scottalanmillerS
          scottalanmiller
          last edited by

          Chocolatey and NuGet make it easier than even dealing with exe installers as you don't even need to know a site to go to or anything. It's one of the first MS packages that they are handling via repos like most Linux distros do.

          1 Reply Last reply Reply Quote 1
          • ObsolesceO
            Obsolesce @scottalanmiller
            last edited by

            @scottalanmiller said in Win10 native SSH with BASH for Windows:

            @Tim_G the Microsoft "official" server is an MS port of OpenSSH. So you get the full OpenSSH stack. I use Chocolatey to deploy it. MS provides it via NuGet and Chocolatey picks it up directly.

            Oh perfect!

            I seen Chocolatey and Win32 OpenSSH references in Google/Bing searches, but kept seeing the word "[DEPRECATED]" next to it, so I kept ignoring Chocolatey and links to it. They should really remove that from search results. I would have found the current version if had they done so:

            https://chocolatey.org/packages/openssh

            Thanks for clarifying the reference. This looks a lot more like a real solution to my original "simple goal" than my "BASH in a Win10 container for Windows" solution.

            I will give this a go on Monday.

            I'll provide feedback of the results and steps to help others who are potentially in the same situation.

            1 Reply Last reply Reply Quote 1
            • ObsolesceO
              Obsolesce
              last edited by

              That worked, here's what I did: (it's rather stupid simple... but now I know)

              1. Install chocolatey (powershell)
                iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
              2. Install openssh
                choco install openssh
              JaredBuschJ 1 Reply Last reply Reply Quote 2
              • scottalanmillerS
                scottalanmiller
                last edited by

                They need to get Chocolatey built in, that's the big gap that's missing. Most Linux distros have that, making installations so much simpler.

                1 Reply Last reply Reply Quote 1
                • JaredBuschJ
                  JaredBusch @Obsolesce
                  last edited by JaredBusch

                  @Tim_G said in Win10 native SSH with BASH for Windows:

                  That worked, here's what I did: (it's rather stupid simple... but now I know)

                  1. Install chocolatey (powershell)
                    iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
                  2. Install openssh
                    choco install openssh

                  You generally need to Set-ExecutionPolicy RemoteSigned first to make sure you have no issues with the powershell command to install chocolatey.

                  Also, you only need to use a single backtick for inline code. If you want it in the full code block, the triple backtick needs to be on it's own line.

                  ObsolesceO 1 Reply Last reply Reply Quote 0
                  • ObsolesceO
                    Obsolesce @JaredBusch
                    last edited by

                    @JaredBusch said in Win10 native SSH with BASH for Windows:

                    Also, you only need to use a single backtick for inline code. If you want it in the full code block, the triple backtick needs to be on it's own line.

                    Good to know, thanks!

                    Finding a table with all of this stuff is not convenient. There something I can bookmark? Could most of this be added as a button to the editor? This is the main reason I went away from "mediaWiki" for some things. Just got tired of all the manual formatting.

                    JaredBuschJ 1 Reply Last reply Reply Quote 0
                    • JaredBuschJ
                      JaredBusch @Obsolesce
                      last edited by

                      @Tim_G https://mangolassi.it/topic/7433/getting-a-handle-on-mangolassis-markdown-markup

                      ObsolesceO 1 Reply Last reply Reply Quote 2
                      • ObsolesceO
                        Obsolesce @JaredBusch
                        last edited by

                        @JaredBusch said in Win10 native SSH with BASH for Windows:

                        @Tim_G https://mangolassi.it/topic/7433/getting-a-handle-on-mangolassis-markdown-markup

                        Thanks, bookmarked!

                        1 Reply Last reply Reply Quote 2
                        • 1 / 1
                        • First post
                          Last post