297 points · by mwadams · 11y ago · 116 comments
So on Linux you have SSH (for shell) and X11 Forwarding/VNC for GUI remoting. On Windows you have RDP for GUI and nothing for remote shell.
Now, I know what you're going to say, "WMI" but WMI was never designed for use over the internet. You have to forward two fixed ports and a dynamic range (shudder). Plus it isn't security hardened either by design or through fire.
VPN you say? In theory yes. But the reality on the ground is that for most SMBs they're still using RDP or SSH directly to manage Windows/Linux servers, and if Windows wants to compete (and they are dropping RDP) they need to have an "answer" to SSH.
Essentially they need to take whatever WMI is, wrap it into a secure protocol, and bind it to just a single port, then harden the heck out of whatever process directly runs on that port (before you hit the WMI interface itself).
Or alternatively write an SSH server (literally), and after login redirect input to a Powershell process. Nobody would complain about that (plus free SFTP support!).
PS - I'm totally going to get attacked by "VPN purists" here. But really everyone knows that SSH and RDP is extremely common for SMBs/private individuals. Let's quit pretending that it is not and support the client that actually exists, not the client you wished existed.
https://msdn.microsoft.com/en-us/library/aa384426(v=vs.85).a...
"Windows Remote Management (WinRM) is the Microsoft implementation of WS-Management Protocol, a standard Simple Object Access Protocol (SOAP)-based, firewall-friendly protocol that allows hardware and operating systems, from different vendors, to interoperate. The WS-Management protocol specification provides a common way for systems to access and exchange management information across an IT infrastructure. WinRM and Intelligent Platform Management Interface (IPMI), along with the Event Collector are components of the Windows Hardware Management features."
And, being SOAP-based, it's certainly nothing like a command-line.
But most of all, it's not fun.
It was a bit arcane to set up but mainly it was slow, like, really slow. All the SOAP serialization is terrible for performance but it is flexible and it did work.
Part of that is the lack of a history of automation - basic things to do with processes and I/O are kind of schizophrenic. All of the basics are clearly unix inspired (standard streams, processes, redirection - this is all unix-like), but many windows tools use different conventions to exchange data and control channels - powershell has a real object model.
In principle powershell's richer object model is a boon to automation - it's so much easier not to make mistakes if you don't need to massage your data through lots of slightly different text-based hacks, but the object model just isn't nearly pervasive enough. Sometimes you still need plain text/binary streams, and the transition isn't great. More fundamentally, the object model isn't well thought out - it's built on .NET, but that's clearly a single-process focused world view, and for a inter-process management tool, that poses problems. Even if sending objects between processes would work smoothly, there's the issue that objects don't compose or reflect as smoothly as text. It's hard to put your finger on, but for example, you can use things like regex's to do fairly fancy pattern matching on strings, and the equivalent for objects just isn't there in powershell. As a result, things work great if you're doing something that the underlying processes "want" you to do - but if you're trying to hack around some limitation, or try something novel, it's much more painful than in bash.
I think it's also worth mentioning some practical problems: Powershell is really slow and heavy. You can cheaply pipe and juggle data in a unix shell, but by doing that in powershell I've seen machines grind to a halt. A fresh powershell instance has a working set of 100MB on my machine; bash: 5MB. That's a problem. Startup time, similarly, is slow. This isn't a problem if you're working purely interactively - no human is going to notice an extra 10ms here or there, but in scripting, you can easily start so many processes that the difference becomes very noticable.
Powershell isn't terrible, but it just doesn't work as well as the unix shell, despite all the warts that has. Maybe some day everything will speak powershell, and it'll faster, smaller, and have a better story concerning pattern matching, but right now it's relatively ineffective compared to a plain unix shell, in my experience (which is windows centric).
Powershell reeks of development with C# on Windows. You have specific function calls that can do very niche things such as convert an application to a virtual machine in IIS. The problem comes up when you are trying to do something novel or just out of the scope of what Microsoft thought up. Bash allows for those things by having separate and reusable components that do their one job well.
Get-Object and Set-Object don't work universally as advertised so you can't just write boilerplate and expect things to work. Instead, you have to google "how do I set up a virtual application?" or "how do I change bindings to an existing virtual application?" You'll get the job done, but you won't feel like you learned anything. I'm glad you wrote this up. It's been something that's been bothering me, but I was having difficulty verbalizing it.
As a JS guy, these days most of my scripts run via node/iojs and are as platform agnostic as possible. More and more I know it only needs to run in linux, or is guiding dockerization. Even then, bash scripts tend to be easier to reason about.
MS should really include something like this in Windows.
Hell, I (or you) should find the time and write it ourselves, node.js has great TLS support and has a Windows port.
Is PowerShell not what you're looking for, or is it not implemented similar to SSH?
Also setting it up to work over the internet securely is, a touch complicated: http://blogs.technet.com/b/askpfeplat/archive/2012/09/17/wan...
It is a cool party trick that it can work via a web-browser and IIS. But if that's what it takes to make Powershell remoting secure without a VPN then it isn't workable.
A few lines. See my reply at https://news.ycombinator.com/item?id=9343060
[1] Grep for "http" on this page: http://ss64.com/ps/enter-pssession.html
I know they're working on it, and PS is a great shell overall, even if it is missing a lot of simple tools by default.
But MS is way late to the party. OpenVZ was in heavy use what, a decade ago? And MS did nothing to respond, really. But hey, maybe they'll pull it off. I don't have a fundamental objection to Windows.
As a trivial example, remapping caps-lock to something sane was easier on the last few windows releases I tried (just run a registry script) than on any of the 'nixes I used in the same time period.
MS has a ton of work to do if they wanna make a non-GUI Windows viable, and it seems like if they don't have a lot of that work done upfront, they're going to end up providing a very unappealing first taste to customers. I hope they succeed, just that it seems to be a much larger problem than just cutting out parts of Windows.
I do. I have a fundamental objection to MicroSoft too. I do not know why people forget that MS actually tried very hard to make internet just a special button in MS Word. How they fought against anything looking like an open communication protocol. This is a sin, the kind of sin that shall not be forgiven. I respect Mr Gates being a generous guy in his old age, but he led a company that did and still do a lot of harm to almost all industries over the world.
Be reminded that Windows is still the dominant OS by very very far. Almost everyone on earth working on a desk uses MS Windows, Word, IE and Excel. This is not a sane distribution of powers.
What would we say if 98% of the oil and the gaz stations on earth were operated by the same company? We are living in this Orwellian world, where one company drives 98% of the computers and their major softwares in the world.
Why are we so fast to forget that?
Happy to see Microsoft is evolving. Let's hope it will be for everyone's best.
Anything making MS better cannot be for everyone's best: they have a de facto monopoly, and of the most dangerous kind.
That's why despite all the bad that can be said against Google and Android, at the very least they had enough weigth (and talent, and luck) to push MS out of mobile. Which was the greatest news for our industry since Internet.
Also, I do not agree with Paul Graham (http://www.paulgraham.com/microsoft.html): sadly, MS is not dead yet. It cannot be dead for real with 9x% of install on PCs.
> As customers adopt modern applications and next-generation cloud technologies, they need an OS that delivers speed, agility and lower resource consumption.
I know the kneejerk reply to this is, "Yeah, Linux!", but I can think of at least 2 Windows-based applications in my company which would benefit from this. And in general, yay competition.
That seems like a reasonable approach to me, if that was their methodology.
Still many times more frequent than w/Linux. The 2008 R2 development system we have needs to be rebooted every two weeks, on average, due to Windows Updates that require a reboot. Updates come in almost every day for CentOS and I only need to reboot once ever couple of months for new kernels.
Can't wait for the no-reboot kernel patches planned for a future Linux kernel.
Uhh they literally don't release updates that often, so you'll have to explain that one to us...
> Updates come in almost every day for CentOS and I only need to reboot once ever couple of months for new kernels.
Windows doesn't support hotpatching, Linux does, it really is as simple as that. Linux has more people working on it than the Windows kernel does, and is just a more advanced kernel in general at this point.
But for what Microsoft has to work with Windows Server is darn stable and requires very few restarts in my experience (approx. 4/year in my experience with 2008 and 2008 R2).
Actually, hotpatching is easier on Linux because it has a technically inferior virtual memory subsystem to Windows.
The Windows kernel is technically superior in numerous areas: virtual memory, thread synchronization primitives, and I/O (specifically, overlapped I/O), just to name a few.
Microsoft most certainly releases reboot updates more often than the once a month patch Tuesday. I'm not sure if they apply to the OP's specific system, Win2008 R2, but I am rebooting my various computers more than once a month.
My system's update history shows two fixes around Mar 27 (KB2976978 and KB3048778) and one of those required a reboot. I remember because I had to do it. This pattern goes back in time quite far - bunch of fixes for patch Tuesday (requires a reboot), and a handful of off-cycle recommended/optional fixes, which often require a reboot too.
If you apply updates as they appear (and take the optional and recommended ones) you will DEFINITELY be rebooting more than once a month.
Windows Updates are published once a month (except for very critical fixes), so I wonder how that is possible in your environment?
With linux there is no friction you need to overcome in determining if the cost of trying something out is worth the financial side.
The elastic hosting options take away a lot of this, but there is still (to me at least) this mental barrier to Windows in knowing that I might run into licensing costs or administration issues before I determine if the project itself is worth said cost.
Literally the only C# "thing" which won't run on Linux is Visual Studio itself. Heck we might even see a Linux Powershell version here in the next few years.
But for sever-side code, .net core + asp.net will get the job done.
That doesn't really cover remote management, though.
I can't tell from a quick read.
--92 percent fewer critical bulletins
--80 percent fewer reboots
Compared to what a barebones Linux install (Say... a Docker instance)?I can easily shut off a service in Linux. And I can turn it on. The only reboot needed is for the Kernel itself, and that is soon changing.
What I'm reading here is that MS is most of the way there to Linux.
net stop [service name]
Important utilities:
- findstr ('grep') - sc (control services) - taskkill (kill/control processes) - netsh (everything network) - wevtutil (windows event log)
http://azure.microsoft.com/blog/2015/04/08/microsoft-unveils...
I read:
> Nano Server provides just the components you need – nothing else
And that's exactly what I do not trust MS with.
With a well documented history of backdoor ridden bloat ware products it is not quite the company that I accept any non-opensource release to have "just what I need and nothing else".
Though I must admit that the opensource train they are riding lately allows me to look at them them from a very new perspective. But still, MS if you are listening: if it is not opensource, I do not trust you!
But some enterprises use MS software, and this is a much needed option.
ObVote: I downvoted your complaint imaginary internet points has no bearing on the discussion at hand.
I've certainly re-considered dotNet after it got open sourced recently! It (finally) seemed like a reasonable proposition -- as I explain in my post BTW.
But indeed, Windows, and especially Windows-closed-source-on-a-server, is not my cup of tea. And I don't understand how it could be anyone's tea.
> But some enterprises use MS software
Sure, and this is a start-up forum. :)
Anyway, I upvoted your post for taking the trouble to explain your downvote. Thanks.
While Azure is overpriced compared to Google Cloud (and maybe compared to AWS - dunno cause AWS pricing is convoluted), having them comp it is really nice. Azure is also a lot more full service than Google's stuff, if you need more than IaaS.