Microsoft To Support SSH In Windows and Contribute To OpenSSH 285
An anonymous reader writes: Microsoft has announced plans for native support for SSH in Windows. "A popular request the PowerShell team has received is to use Secure Shell protocol and Shell session (aka SSH) to interoperate between Windows and Linux – both Linux connecting to and managing Windows via SSH and, vice versa, Windows connecting to and managing Linux via SSH. Thus, the combination of PowerShell and SSH will deliver a robust and secure solution to automate and to remotely manage Linux and Windows systems." Based on the work from this new direction, they also plan to contribute back to the OpenSSH project as well.
finally (Score:5, Funny)
it's only 2015 guys...
Re:finally (Score:5, Funny)
Come now (Score:5, Insightful)
You know it's going to be just yet another way of hacking into a Windows box.
Re: (Score:2)
Re: (Score:3)
New, as in everyone who wants this already has this via cygwin. It even installs as a service. Presumably I should ssh in and use powershell, but I've never tried because if I want to do real computing, I do it on a real OS with a real shell.
Re:finally (Score:4, Interesting)
rsync is proof that God loves us and wants us to be happy.
Odd thoughts: (Score:5, Insightful)
* I remember joking about connecting to a 'doze server via SSH in 2005. Usually the response was a disgusted shiver.
* I guess Microsoft finally got sick of seeing PuTTY's hegemony in the terminal/SSH client market, and decided that this, *this* was a market they could finally dominate in this day and age?
* I shudder to think of how bastardized the command options are going to be, given the PowerShell's habit of using stuff like '-omgLookAtThisMassiveOptionNamingConvention', to the point where they have to alias a frickin' option...
Ah well, good on 'em. I'll stick with using Linux and OSX clients, thanks much.
Re: (Score:3, Insightful)
* I shudder to think of how bastardized the command options are going to be, given the PowerShell's habit of using stuff like '-omgLookAtThisMassiveOptionNamingConvention', to the point where they have to alias a frickin' option...
Linux is full of aliased options.
Can you explain the difference between:
cp -r
cp -R
cp --recursive
There are long options too, with no aliases
ls --dereference-command-line-symlink-to-dir
Re:Odd thoughts: (Score:5, Informative)
The big difference is that *nix started with short easy-to-type options... PowerShell did it the other way 'round. The difference is stark, truth be told; the former grew from a CLI mindset, whereas the latter is easing (back) into CLI from a GUI mindset.
TBH, I rarely if ever use --option unless I have to, since the original -o is right frickin' there.
Re:Odd thoughts: (Score:5, Insightful)
Well, when you're typing out Unix commands on an teletype that's 80 characters wide, creating short options first made a lot of sense.
Powershell's approach is more verbose, but it's also a little more readable (same as long options in Linux), especially when you're dealing with things more complicated than "copy a file", such as "create AD forest trust" or "reconfigure Exchange retention policies". That said, I still tend to use short options by default.
One thing nice about Powershell is that you can truncate options as long as they're not abmiguous. So you can make -Recursive be -Rec, or even -R, as long as there's not also a -Recreate or -Recover options. That seems to be a nice middle-ground.
Re: (Score:2)
One thing nice about Powershell is that you can truncate options as long as they're not abmiguous. So you can make -Recursive be -Rec, or even -R, as long as there's not also a -Recreate or -Recover options. That seems to be a nice middle-ground.
Interesting tidbit. Reminds of the linux ip command, such as "ip a a 192.xxx" instead of "ip address add 192.xxx". There are others I'm sure, but that command I end up using a lot.
Re: (Score:2)
You can tab-complete commands and options, too.
Re: (Score:2)
Beyond that, you can get a list of all the available commands and the number and types of parameters they take.
Re:Odd thoughts: (Score:5, Interesting)
My biggest gripe with some Powershell commands is that their defaults are not as time-tested as the near-equivalent *nix commands. Probably the best example is "get-winevent -log System" showing all of the events in the System log (which on a given system, might be as large as 4 GB in size).
Sure, that's functionally the equivalent of performing "sudo cat /var/log/messages", but of course one could run "sudo less /var/log/messages" and obtain the powerful features of less, such as forward and backward navigation, and not loading the entire file into memory (this is a key weakness of "get-winevent" in general; if its output is piped, it is forced to load everything, therefore forcing the user to use the "-MaxEvents (int64)" switch to limit to the newest X events... and this is also setting aside the fact that Windows sorts by newest events first by default, though this can be changed with the "-Oldest" switch).
The Windows event system in general is strange when looking back at it. You have the post-Vista API (accessible with "get-winevent" or the Event Viewer), and the pre-Vista API (accessible with "get-eventlog"). There are some event sources whose events aren't rendered properly (i.e.: the description of the event will read something like "The description for Event ID X in Source Y could not be found. It contains the following insertion strings: (text)" ( https://support.microsoft.com/... [microsoft.com] ). Some will render properly only in the post-Vista API, but not the pre-Vista API. Others will render properly only in the pre-Vista API, and not the post-Vista API. To my utter surprise and bafflement, event sources such as "Ntfs" and "mpio" fall into the category of rendering properly in pre-Vista API, but not post-Vista API... in Windows Server 2012. That's right, for some reason, the events of a couple of the most critical event sources could not be fixed.
Powershell is nice as a scripting language, but it's a bear as a command shell. There have been years of complaints of slow loading, especially on systems with high disk I/O activity and/or stalled disks (it doesn't even have to be the system drive; ANY stalled disk on a Windows system may cause Powershell to stall eternally until the system is rebooted; I've seen this for years, in Server 2008 as well as Server 2012). The main reasons why the Command Prompt hasn't been entirely supplanted is because it's lightweight, and has stood the test of time for over 2 decades in NT.
I recently changed careers from a mostly-Windows role to a mostly-Linux role, and it feels great to work with bash, even if I still haven't memorized most of the higher esoteric layers of shell scripting. It feels like the shell was designed for the OS, instead of being duct-taped into a jack-of-all-trades role. The way I log into a RDP-windowed Windows Server 2012 system is visual humor in itself: I right-click the taskbar to click "Task Manager", use it to open "File -> New Task", run "cmd.exe", maybe start Powershell off to the side, and don't EVER click on the Start corner (or button if it's 2012 R2) or the Charms bar. Control panel? Run "control". Computer management? "compmgmt.msc" still works. Search for a file? "dir /b /s" for it, or else creative uses of "find" will work. But don't EVER call up the abomination that is the Start Screen.
Re: (Score:2)
Powershell's approach is more verbose, but it's also a little more readable
I beg to differ. I really, really beg to differ.
long.verbose.commands.that.grab.objects.are.impossible.to.read.
--
BMO
Re: (Score:2)
Well, when you're typing out Unix commands on an teletype that's 80 characters wide, creating short options first made a lot of sense.
Graphical interfaces have been around since the 1970's and on workstations or any graphical interface you can display the equivalent of a standard 80x24 tty terminal or any sized terminal (within reason of course) so that was not the reason why creating so called short options made sense. Basically Unix people preferred efficiency in typing over long winded typing. As an example why type "copy" when you can type "cp" or "ls" when you wish to list files and directories. You can even alias commands and their
Re: (Score:2)
Except you can use tab to auto-complete options in PowerShell, not so much in any other shell.
Re: (Score:3)
Bash auto completion?
Yep, every time a Microsoftie thinks that Windows has something new, I lol.
Re: (Score:3)
PowerShell did it the other way 'round.
Not really. PowerShell had many short commands since 1.0 in addition to the long versions... it's not that PS "started" one way or the other.
the former grew from a CLI mindset, whereas the latter is easing (back) into CLI from a GUI mindset.
Also not true. There's nothing about the long syntax that grew from a GUI mindset. It was created for consistency and ease of learning.
PowerShell primary commands are formatted Verb-Noun. This is awfully convenient, as a PowerShell user can guess hundreds of commands just by learning a few verbs and a few nouns. I just counted, and to understand half of the 300+ b
Re: (Score:2)
Not to mention built in tab completion for arguments where you can read the man page after finding the cmdlet to know which arguments you will have to use, or just quickly tab through to what you know is going to be there.
Re: (Score:3)
Easy. The difference is you're using GNU.
UNIX traditionally only has short options, which are parsed using getopt(3). GNU adds getopt_long(3) which adds the long options, but I think only to GPL applications because you must link against a GPL library (libiberty?) in order to use them.
Using getopt() to parse your command line i
Re: (Score:3)
According to the man page on my Mac:
The getopt_long() and getopt_long_only() functions first appeared in GNU
libiberty. The first BSD implementation of getopt_long() appeared in
NetBSD 1.5, the first BSD implementation of getopt_long_only() in
OpenBSD 3.3. FreeBSD first included getopt_long() in FreeBSD 5.0,
getopt_long_only() in Fr
Re: (Score:2)
The man page was from http://unixhelp.ed.ac.uk/ [ed.ac.uk] so not specifically GNU.
Re: (Score:2, Insightful)
help copy
you Linux asspie
As someone who spends a lot of time RTFMing (often on shit I have no intention of ever using), I'll say that MS's documentation shits all over the inconsistent hodge podge you get on the Linux side. Thorough, explicit, detailed.
Re: Odd thoughts: (Score:5, Informative)
I just tried typing help copy on my computer and it worked, yet I don't have an msdn subscription. That said, help is not installed by default. From the equally free online version of Microsoft's documention [microsoft.com]:
Windows PowerShell 3.0 does not come with help files. To download and install the help files that Get-Help reads, use the Update-Help cmdlet. You can use the Update-Help cmdlet to download and install help files for the core commands that come with Windows PowerShell and for any modules that you install. You can also use it to update the help files so that the help on your computer is never outdated.
Finally, if you want to write help for your own Powershell code, just type help about_Comment_Based_Help for details on how to do this. No need to buy any licences.
Re: (Score:2)
I was pointing out there are plenty of aliases for options and tediously long options in other operation systems other than Windows.
I know what the options do, I got them from a man page.
Re:Odd thoughts: (Score:5, Insightful)
> I guess Microsoft finally got sick of seeing PuTTY's hegemony in
> the terminal/SSH client market
You guess wrong. There is basically no market for terminal/ssh clients. And if it is it is peanuts. There is HUGE market for centralized management tools like OpenStack, Chief, Puppet, etc. - and that is at what Microsoft is aiming. Basically they need SSH compatibility to manage Linux boxes and they want and they do (Azure) manage Linux boxes.
> I shudder to think of how bastardized the command options are going
> to be, given the PowerShell's habit of using stuff like
> '-omgLookAtThisMassiveOptionNamingConvention', to the point where
> they have to alias a frickin' option...
Oh like in GNU/Linux/BSD utils are just kosher and standardized... please... each tiny utility comes from few other schools of command line switches and are usually different. Threre is no standardisation of switches in commands used on Linux. Usually if you need to do something comples (that you haven't yet memorized) you need to open other terminal window with manual to do it. Of course this is a different *convention* from PowerShell but PS is not that bad - it is just different.
> Ah well, good on 'em. I'll stick with using Linux and OSX clients, thanks much.
Oh OSX clients and bastardized commands. Come on... ;)
And for the record I really like Linux and use it all the time. I also happen to use Windows and OSX as clients and they are also fine. Any effort to bring more interoperability between those systems is welcome in my opinion.
Re: (Score:2)
Basically they need SSH compatibility to manage Linux boxes and they want and they do (Azure) manage Linux boxes.
Almost. They need SSH compatibility to be managed by Linux boxes, yet with proper NT authentication instead of the band-aid which is Cygwin.
Re: (Score:2)
Re: (Score:2)
Powershell supports abbreviated switches.
excellent (Score:5, Funny)
now you can use Windows computers the way they were meant to be used, as dummy linux clients
Re: (Score:2)
now you can use Windows computers the way they were meant to be used, as dummy linux clients
I've been doing that for so long I've actually given Chameleon money (for Xoftware.) No, wait. Except the last time I actually wanted to do it was years ago, because it's been years since I had any Unix-specific machines. Now it's just PC Unix. I just threw away my last Unix machines, a POWER1 and an Indy R4400SC@200MHz. It wasn't worth dusting them off.
What do they need to contribute back? (Score:2)
I mean, they will take OpenSSH, compile-it for Windows, and make sure Power Shell is the default login shell. Then what? What piece of code could the Open SSH project want from Microsoft exactly?
Re:What do they need to contribute back? (Score:4, Informative)
What piece of code would the Open SSH project possibly want from any developer?
It's not like it's defect-free software that requires no more development.
https://bugzilla.mindrot.org/s... [mindrot.org]
Re: (Score:2)
I think it will be the MS cli interface helper, sshclippy. "It looks like you're trying to ssh into a remote server. Wouldn't you like to use RDP instead?"
Re: (Score:3)
Probably the best thing they can do is throw resources at it, hire an existing dev to do it full time sort of thing.
Re: (Score:3)
You obviously haven't ported OpenSSH to a different OS before. Even among Unix/POSIX-like OSes, there is significant variance between platforms that something like OpenSSH has to deal with. Go look at the diff between OpenBSD OpenSSH and portable OpenSSH (for all the other supported platforms).
Also, portable OpenSSH uses extended security features that tend to be platform-specific (but useful enough to make it worthwhile to use on each specific system). I expect that there is Windows security functionality
Probably concerned with authentication (Score:3)
Indeed. I expect one of the things they'll be looking at doing is adding support for some of Windows' built-in authentication options. For example, recent versions of RDP use machine certificates, typically with a trust-on-first-use model similar to SSH. It would be nice if SSHing into a Windows box could re-use that machine cert, and SSHing from a Windows box could take advantage of the list of IP+cert pairs that you already trust. This would require some code changes to OpenSSH though, since it is of cour
Re: (Score:2)
I mean, they will take OpenSSH, compile-it for Windows, and make sure Power Shell is the default login shell. Then what?
Then they have a vested interest in it so should contribute to maintaining it, even widely-used open source projects (PGP and OpenSSL for example) are often woefully under-resourced. It isn't as though OpenSSH is some bug-free, perfect product that requires no maintenance.
I wonder (Score:4, Funny)
Are M$ getting sensible in their old age?
Re: (Score:3, Informative)
They have no choice. Well they could just stick with Windows Server and Windows Clients but it actually happens that they are offering Linux as a product/service (in their Cloud). So why not embrace and extend methods to manage Linux via their tools? In my opinion this is good trend.
Re:I wonder (Score:5, Informative)
Finally, I'd like to share some background on today’s announcement, because this is the 3rd time the PowerShell team has attempted to support SSH. The first attempts were during PowerShell V1 and V2 and were rejected. Given our changes in leadership and culture, we decided to give it another try and this time, because we are able to show the clear and compelling customer value, the company is very supportive.
Re:I wonder (Score:4, Interesting)
The new Microsoft CEO is much more comfortable with FOSS software. We're also seeing initiatives to support Docker containers on Windows and apt/yum/ports style software repositories and I don't think we'd have gotten any of that if Ballmer were still in charge.
Re: (Score:3)
You guys are so jaded, it's insufferable.
Back in the Real World, we use PowerShell to automate all sorts of processes. Particularly provisioning VDI. while lots of non-MS stuff has PowerShell APIs (VMware, Citrix etc.) sometimes you want to execute a remote command on a device that only supports SSH. Like power up a blade PC, or add a static route to a switch. Sounds like they're going to make that possible. Awesome!
Re: (Score:2)
You guys are so jaded, it's insufferable.
If they're adapting to a changing world they're "desperate", if they're continuing on their existing course they're a sinking ship. Either way their record revenue and profits in the past year are a bad thing, Microsoft is going down hard which means the Year of the Linux Desktop is right around the corner ;)
Cygwin (Score:5, Interesting)
You mean I don't need to install Cygwin anymore like I have been doing for the past 15 years to accomplish just that?
Next proposal: implement rsync natively...
Re: (Score:2)
> Next proposal: implement rsync natively...
Rsync fails on Windows/Unix interactions due to basic filesystem architecture. There are lot of differences betweeen NTFS and *nix filesystems like ACLs, timestamping and so on. So I don't really get how Microsoft could change rsync to work with NTFS since the problem is not in rsync but in general differences in which filesystems work - f.e. how to accurately map Windows ACLs to unix ACLs?
Also I don't think that rsync support is something Microsoft clients (as
Re: (Score:2)
Not to mention such trivial things as how to translate paths f.e. C:\Users\foo to /home/foo or whatever. I don't think it is a problem which rsync should solve - it (if Microsoft ever embraces such idea) should be solved in lower layer than userland.
Re: (Score:2)
You seems like you have been trying to use it, haven't you? Like most open source solutions, you might have to tweak it a bit to get it to do what you want and then again, you have to make compromise. But be assured it works in a satisfactory way for me. Just get a proprietary solution if you can't make it work as you wish. Oh my god, I just realized you sounded like a guy that would choose the later solution ;-)
I know what you are saying although and there is some truth to it.
Take care man ;-)
Re: (Score:2)
> You seems like you have been trying to use it, haven't you? Like most
> open source solutions, you might have to tweak it a bit to get it to do what
> you want and then again, you have to make compromise.
Sorry I am an professional - for my clients I advice and implement what is best for them so in general I avoid tweaking (as in unstadarised hacks). Tweaking is good for my home machines but what I do on home machines I would not recommend to clients who just wish to do their business.
> But be a
Re: (Score:2)
hehe, that's exactly what I was saying and I understand. Peace.
Re: (Score:2)
It involves more than a little bit of tweaking. Files that are "locked" on the Windows side make rsync hang, and fail when accessed over an rsync/SSH connection. This particularly includes the Outlook ".PST" file, the email storage file that is one of the most critical files to back up on a personal system.
Re: (Score:2)
Indeed, you have to rsync when all file handles are closed.
Re: (Score:2)
Thinking twice, then again, you can still tweak with file locking strategies.
Re: (Score:2)
In the end, never say it is impossible. It's like arguing implosion won't prevail in Manhattan.
Re: (Score:2)
The best managing (IMHO) of Windows ACLs with UNIX permissions I've seen would be the EMC Isilons. You can lop off all permissions except the bare UNIX ones (user, group, rwx), use Windows permissions for everything, and stuff in between.
Adding GPO friendliness to Linux would go a long way in getting more boxes on the desktop The biggest reason why Windows is the primary desktop OS is because it has a lot of management tools.
Now here is the ironic thing. MS doesn't lose if Linux gains. For example, they
Re: (Score:2)
> tl;dr, both MS and Linux would win big. Especially if Windows had the
> ability to run Linux applications in Hyper-V wrapped Docker containers.
Just run Linux kernel in hypervisor and do some glue to map Linux/UNIX convetions (process management/filesystem/networking/etc.) to Windows host. But that is problematic - you can do it in many ways (like you've said EMC is the way you like it). I guess the problem is that we need to have some standards regarding on how to map such things and the best way po
Re: (Score:2)
Rsync fails on Windows/Unix interactions due to basic filesystem architecture.
Uh what? I use it all the time between Windows and Unix, Windows and Android... it works fine. If there are any problems, they are abstracted away by the client and/or server and I don't notice them at all.
Using source from OpenSSH ... (Score:3, Interesting)
In which case they will have to release the code that corresponds to binaries - would be useful for checking that there is not some little tweaks to help the NSA -- but if they have already put those into the system DLLs (eg for encryption) we would not really know. Maybe I am too cynical but I am very suspicious of what they did to skype.
Re: (Score:2)
Does the OpenSSH license prevent making the code proprietary? I'd have guessed it was under a BSD license, which permits closed-source derived works.
Will it be a PITA to use? (Score:2)
Will this work out of the box? Because you basically have to go into the server you are accessing it and type some really weird shit on winrm to be able to even run scripts and god forsake you if you want to access the console remotely. Its so fucking annoying that I've met some people who just disable HTTPS and go straight for HTTP with basic authentication.
Re: (Score:2)
Of course it will be a PITA to use. It's Windows, and all of the administration tools have devolved over the years. You have horrible GUI tools, like the dreaded IIS manager, ridiculous CLI commands, like ntdsutil, diskpart and netsh. Why would this be any different?
Comment removed (Score:4, Insightful)
Now the other big question (Score:2)
The feature where you can supposedly define custom network groups for the scope. Can you finally create more than localsubnet? It would be nice to be able to define "My networks" as "x.x.x.0/24, y.y.0.0/16, 10.0.0.0/8" then set scope for multiple rules as "My networks".
sftp (Score:2)
Hell must have frozen over.... (Score:2)
MS is adding actually useful standard tools (well, standard outside of the MS isle of incompatibility) to windows! Good. That means we are at a stage where they cannot ignore what works anymore. As usual for MS decades late, but better late than never.
Re: (Score:2)
Under the new guy, they don't seem to be doing that as much.
Re: (Score:2)
Betting the dude who wrote PuTTY is not in a good mood right about now...
But you know? I don't believe that Microsoft can really do much of anything in this direction; they're still charging massive amounts of money to license inferior operating systems and server application suites (If only someone would make a usable *nix-based groupware application... *sigh*).
Re: (Score:2)
Oh? How much do you think he was making through donations for PuTTY?
Re: (Score:2)
This doesn't compete with PuTTY, probably: odds are it will be a console-mode ssh binary just like what cygwin users have already but without a dependency on cygwin, and a server just like what cygwin users have already but with NT auth (incl. AD) rather than /etc/passwd authentication which maps to local SIDs. PuTTY does have a command-line client, but nobody is paying for that. They're paying (if they pay at all) for the interface.
Re: (Score:2)
Now I'm scared... We may, once again, see Microsoft's approach of Embrace, Extend, and Extinguish [wikipedia.org] in action...
What exactly are you scared about? Assuming you understand what's going on here what part of that concerns you?
Re:Timeo Danaos et dona ferentes (Score:4, Insightful)
That, for example, in order to ssh into a remote Windows system you'll have to use Microsoft's ssh-client — because they'll use some funky cipher/digest combination or some other "extension". They did it to Kerberos before...
Or that interactive logins will only work on certain terminal emulators — because nothing else will be able to properly emulate powershell's window — just imagine the termcaps entry...
In the link I gave there is a large list of Microsoft's earlier attempts to kill a standard by first adopting it — read it up...
Re: (Score:2)
That, for example, in order to ssh into a remote Windows system you'll have to use Microsoft's ssh-client — because they'll use some funky cipher/digest combination or some other "extension".
In which case people would just use putty or cygwin or openssh instead, creating an incompatibility such that none of your devices can talk to Powershell is bad for Microsoft, it doesn't help them at all.
In the link I gave there is a large list of Microsoft's earlier attempts to kill a standard by first adopting it — read it up...
Firstly I can see why you had to write "attempts", because it seems none of those actually killed anything. But obviously - unless you don't understand what SSH is or its purpose - if they create an incompatibility here it is going to completely break their system making it such that Linux, BSD, iOS, Androi
Re: (Score:3)
Or they'll expect remote servers to implement whatever changes Microsoft will require for interoperatibility. We've been through this in the 1990-ies, when Microsoft's Internet Explorer was introduced with subtle incompatibilities in HTML-rendering...
And how has that worked out? Back then that affected personal computing - an area which Microsoft had a monopoly - and it still ultimately failed. This is across desktop, server and mobile, this conspiracy theory of yours has no chance at all, in fact you don't even posit what Microsoft would gain out of it.
Well, a successful attempt is still an attempt: Netscape died.
But it failed, you need to learn your history: Netscape lived on thanks to Mozilla and now we have IE dying in favor of open standards, Microsoft themselves are killing IE in favor a browser that does no
Re: (Score:2)
Well, a successful attempt is still an attempt: Netscape died.
But it failed, you need to learn your history: Netscape lived on thanks to Mozilla ...
Why couldn't we have been so lucky as to have Microsoft live on as Netscape has?
Re:Timeo Danaos et dona ferentes (Score:4, Funny)
Too bad opening an SSH into Windows will drop you into the complex abomination that is PowerShell.
Re: (Score:3)
complex abomination
That's funny. I find PS slow and lacking basic functionality in a few areas, but "complex" is one of the last criticisms I would make. Compared to DOS or Bash, it's very straightforward and intuitive.
Re: (Score:3, Insightful)
As long as by "complex abomination" you mean completely standardarized switch syntax with tab completion and integrated help.
Re:Timeo Danaos et dona ferentes (Score:5, Informative)
K. Construct a for loop in PS that lists a directory and adds the words "This is cool" to the 13th line of any file of type "text" without downloading a module.
Off the top of my head (and using verbose commands to make it more obvious), I got:
dir | where -Property Extension -match '.te?xt' | foreach {
$s=(Get-Content $_.FullName);
$s | foreach { if ( (($i++) % 13) -eq 0) { $_+" This is cool" } else { $_ } } | Set-Content $_.FullName
}
I haven't thought of a way to do the file type determination (other than by the extension), but that will do just for a post to an AC. It can all be done on a single line; I added the line breaks and indentation so it wasn't a big line of gobbledegook. Now it is several lines of gobbledegook!
The impressive part of the tab completion of Powershell is how context sensitive it is. When I typed the where command, I entered -p<TAB> and it expanded it to -Property (although just -p would work too). But the fun part was that I could then type e<TAB> and then go through the list of property names that are returned from the dir command that begin with the letter e; first Exists, then Extension. So it was aware what was being passed to the where command on the pipeline and returning the correct properties for that object.
So if I typed the following:
get-content "file.txt" | where -Property
...and pressed the tab key, it gives me the property name of Length as it knows that it is returning a string rather than a file. The same where command will work on (and give appropriate tab completion) on a directory listing, file output, database query, or XML tree list.
Re: (Score:3, Interesting)
Granted, Powershell 1.0 was pretty horrible, I don't get all the Powershell hate. Have you even tried to learn to use recent versions of it?
I absolutely despised it back when I was deploying Exchange 2007 RTM on Windows Server 2003, but that's going back almost a decade.
These days I use Powershell for a ton of stuff. I love the fact that everything is an object. For example, manager asks me for stats from AD, powershell script requesting user objects and filtering the appropriate fields, BAM, create a CS
Re: (Score:2)
I know a guy who did that with a telephony system which calls him when something goes wrong then accepts voice input for what to do next... including executing a limited # of PS commands.
I've not seen the code, but like you said, I'm told it's pretty easy.
Re: (Score:3)
It's really powerful and a lot better than trying to use sed or perl to parse the output of programs in shell scripts.
Exactly! It's so much better to have to pipe the output to something just to print to the console! Hurrah for objects! /s
You're misinformed. PowerShell defaults to the console.
Re: (Score:3)
name of the company: SSH Communications Security
since they grabbed a lot from open source in the beginning, I guess they allowed openssh to develop an open source version.
The original SSH version is still proprietary nowadays.
Rule of tumb (Score:3)
ssh and openshh: ssh is proprietary
solaris and opensolaris: solaris is proprietary
apache and no openapache: apache is open source
Re: (Score:3)
PuTTy is already an incompatible mess all of it's own. It even has it's own special format for keys, so we get the joy of running every ssh key generated on a *nix system through puttygen.exe just to spit out some fugly PPK file. Oh, you need me to add your public key to authorized_keys? What's that you say? You used puttygen? Well fuck me, time to look up the command to convert that stupid shit again. Wonderful!
Not to mention the fractured disorganization of the configuration, the crap profile system
Re: (Score:2)
OpenSSH has been ported to Windows a number of times. Off the top of my head:
* Interix (POSIX subsystem running on native NT, but still technically Windows) has at least one version of OpenSSH (server and client).
* Cygwin (emulates Unix on Win32) has OpenSSH, (server and client).
* MSYS (a set of Unix tools ported to Win32 via MinGW) has OpenSSH (client for sure - it's installed with Git for Windows - not sure about server).
None of those are terribly well integrated with Windows' way
Re: (Score:2)
The user interface. It's quite poor and has no "export" or "import" tools for transferring configurations to other users, and the modifying settings for SSH tunnels or terminal or user options isn't saved until you return to the initial screen, with no information on what the changes wehre and no recovery of preivous configuraitons.
Putty is most useful when combined with a wrapper tool that manages multiple sessions more gracefully, there are several very effective free ones. Personally, I tend to use Cygwi
Re: (Score:2)
Kerberos is actually a good example of how attitudes at MS have changed over the years.
http://linux.slashdot.org/stor... [slashdot.org]
MS ended up opening up their extensions so that MIT and Samba etc could implement them freely.
Re:Cygwin (Score:5, Informative)
No. Cygwin runs everything under one process. This will run separate processes for each SSH session, with privilege separation. Cygwin also uses its own /etc/passwd. This will use local windows users, and, hopefully, AD users.
And code will be sent upstream.
Much better if this works out.
Re: (Score:2)
No. Cygwin runs everything under one process.
buh?
Re: (Score:2)
Or Windows still won't be able to run Power Shell scripts by default?
It takes 15 seconds to change this setting. If you don't know how to google the correct cmdlet, you probably didn't have anything useful to do in PS anyway. If you're in an enterprise environment, use GPO. Besides, there are plenty of things to do on the fly in the shell that do not require script execution.
Re: (Score:2)
I know. However it means that I can't use Power Shell in software that I develop since I need to use it on many different PCs. So I am still stuck with .cmd when I need to script something on Windows.
Re: (Score:2)
Just get a certificate and sign the script. If you're gonna be distributing it to users who: A) aren't on a network you control (else you'd be able to change the policy via the network), and B) aren't technical enough to run the command (thus, definately not good enough to make sure your script isn't malicious), you really owe it to them to sign it.
No, its not expensive. Don't pretend it is.
Re: (Score:2)
Having to sign the script completely defeats the purpose of having scripts in the first place. I want scripts because:
1. no need to compile anything
2. can be edited right away on any PC using a text editor, and executed again
3. no need to install any framework or runtime.
I can distribute and run a .exe on any PC anyway. Why couldn't I do the same with a Power Shell script?
Re: (Score:2)
It sounds like you just want to complain, no matter what. If you want to distribute scripts to others then sign them. Problem solved.
If your users want to edit the scripts then they can change their Powershell security policy allowing them to make all the script updates that they want. Problem solved.
In the meantime, the rest of the world who don't use nor care about Powershell just want to have a computer that is protected from malware attacks. They can live a little safer since Microsoft blocked the Power
Re:Nice (Score:4, Informative)
Maybe. Assuming Microsoft makes a proper SSH client that is as good as PuTTY, instead of software like that piece of shit called HyperTerminal from way back when, which almost always couldn't establish a proper working terminal with anything, had basically no file transfer support (or rather, it had very buggy and limited support,) and required a very annoying (and mostly pointless) setup process each time you wanted to connect to a different host.
Then again, why not just fork and bundle PuTTY? But do something to make the sessions easily exportable (I really hate how PuTTY stores those in the registry by default.)
In fact, it would be awesome if the registry just disappeared entirely. I haven't met anybody who actually likes it, and god knows it's been a dream come true for malware authors who want to hide shit (easy to do since it's so big, maze-like, and unwieldy for anybody to sift through.)
Re:Nice (Score:4, Informative)
Maybe. Assuming Microsoft makes a proper SSH client that is as good as PuTTY, instead of software like that piece of shit called HyperTerminal...
If I remember correctly, Microsoft didn't make HyperTerminal. They either bought it or licensed its use in Windows.
Re: (Score:2)
No more than VLC, firefox, or a ton of other popular open source programs are.
To which I mean, these programs have seen scamware sites create trojanized copies that they then pay to get first listing as an ad for in search engines. It's technically not illegal nor is it against the GPL.
The only part that is actually illegal is where the scam artist actually use information gleaned for illicit purposes.
Bing is actually a popular place for these kinds of ads, by the way, because Microsoft seems to do even les
Re: (Score:2)
I don't know the protocols in detail, but isn't CIFS/SMBFS much better suited for random access than SCP/SFTP is?
Re: (Score:2)
Are they forgetting who runs OpenSSH?
Most people who have any valuable contributions are more interested in code than historical politicking.