Slashdot Mirror


Microsoft To Support SSH In Windows and Contribute To OpenSSH

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.

16 of 285 comments (clear)

  1. finally by Anonymous Coward · · Score: 5, Funny

    it's only 2015 guys...

    1. Re:finally by Anonymous Coward · · Score: 5, Funny

      Just imagine the time warp when they discover rsync.

  2. excellent by Anonymous Coward · · Score: 5, Funny

    now you can use Windows computers the way they were meant to be used, as dummy linux clients

  3. Cygwin by ls671 · · Score: 4, 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...

    --
    Everything I write is lies, read between the lines.
  4. Odd thoughts: by Penguinisto · · Score: 4, 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.

    --
    Quo usque tandem abutere, Nimbus, patientia nostra?
    1. Re:Odd thoughts: by Penguinisto · · Score: 4, 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.

      --
      Quo usque tandem abutere, Nimbus, patientia nostra?
    2. Re:Odd thoughts: by kosmosik · · 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.

    3. Re:Odd thoughts: by nmb3000 · · Score: 4, 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.

      --
      "What do you despise? By this are you truly known." --Princess Irulan, Manual of Muad'Dib
      /)
    4. Re: Odd thoughts: by Gadget_Guy · · Score: 4, 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:

      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.

    5. Re:Odd thoughts: by AFCArchvile · · Score: 4, 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/... ). 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.

      --
      "Ancillary does not mean you get to rule the world." --U.S. Circuit Judge Harry Edwards, speaking to the FCC's lawyer
  5. Re:Cygwin by the_B0fh · · Score: 4, 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.

  6. Re:Timeo Danaos et dona ferentes by MightyMartian · · Score: 4, Funny

    Too bad opening an SSH into Windows will drop you into the complex abomination that is PowerShell.

    --
    The world's burning. Moped Jesus spotted on I50. Details at 11.
  7. Re:I wonder by the_povinator · · Score: 5, Informative
    The linked-to blog contains an interesting statement which could be interpreted as bashing Ballmer:

    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.

    --
    The .sig is dead, and I believe I had a hand in killing it.
  8. Come now by s.petry · · Score: 4, Insightful

    You know it's going to be just yet another way of hacking into a Windows box.

    --

    -The wise argue that there are few absolutes, the fool argues that there are no probabilities.

  9. Re:Timeo Danaos et dona ferentes by mi · · Score: 4, Insightful

    What exactly are you scared about?

    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...

    --
    In Soviet Washington the swamp drains you.
  10. Re:Timeo Danaos et dona ferentes by Gadget_Guy · · Score: 4, 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 {

    $i=0;
    $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.