Win10 native SSH with BASH for Windows
-
@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?
-
@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.
-
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.
-
@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.
-
That worked, here's what I did: (it's rather stupid simple... but now I know)
- Install chocolatey (powershell)
iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
- Install openssh
choco install openssh
- Install chocolatey (powershell)
-
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.
-
@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)
- Install chocolatey (powershell)
iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
- 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.
- Install chocolatey (powershell)
-
@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.
-
-
@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!