News for hackers. Stuff that matters.
Re:OpenSSH for Windows update by ryanprichard on Monday October 19, 2015 @07:40PM (#10416548)
Will this OpenSSH server be able to run interactive console programs (like cmd.exe or python.exe), or will it be limited to (say) PowerShell?

Windows doesn't have a good API for hosting a console--it's not like Unix, where a pty has a master end and a slave end. Trying to run a console program in mintty.exe (https://github.com/mintty/mintty/issues/56) or Cygwin SSHD fails for this reason. I wrote a tool, winpty, that makes a best-effort attempt to emulate a Unix pty master by scraping the console buffer, but it has some limitations, so I'm not sure Microsoft would want to use it. Maybe they would expand the console API?

Re:OpenSSH for Windows update by asveikau on Monday October 19, 2015 @08:13PM (#10416679)
I too was very skeptical. Something about posts from "The Powershell Team" about porting sshd makes me deeply cynical that they would get the integration right from a layering perspective, i.e. as if they would make it support powershell and nothing else.

Fortunately this example shows it going straight into cmd and then they invoke powershell as a next step:

    C:\Master>ssh.exe -l [email protected]
    [email protected]'s password: **********
    Microsoft Windows [Version 10.0.10566]
    (c) 2016 Microsoft Corporation. All rights reserved.
    user@DEV-10566-829 C:\Users\user>powershell -File -
- https://github.com/PowerShell/Win32-OpenSSH/wiki/ssh.exe-exa...

That gives me some hope that it's being done right.

Re:OpenSSH for Windows update by geofft on Monday October 19, 2015 @08:31PM (#10416748)
There are these two interesting commits, "Add pty mode support code":

https://github.com/PowerShell/Win32-OpenSSH/commit/55f2ec682...

and "Add ANSI parsing engine and console draw support to SSH client":

https://github.com/PowerShell/Win32-OpenSSH/commit/7aac59e52...

Something about this reminds me of ANSI.SYS.

Re:OpenSSH for Windows update by est on Monday October 19, 2015 @08:50PM (#10416804)
you could run ANSI.sys in modern cmd.exe, sadly there's no ANSI.sys in Win7 anymore.

https://groups.google.com/forum/#!topic/alt.msdos.batch.nt/Y...

Re:OpenSSH for Windows update by geofft on Monday October 19, 2015 @10:17PM (#10417045)
Cool. Looks like that is essentially listing DEVICE=ANSI.SYS in config.nt? Google results imply some things about 16-bit emulation here -- was that post about running actual DOS ANSI.SYS in a VDM running actual DOS COMMAND.COM, within a native Windows terminal?
Re:OpenSSH for Windows update by est on Monday October 19, 2015 @10:40PM (#10417110)
IIRC, the command.com only bootstrap the ANSI coloring, after that you can run anything in cmd.exe
Re:OpenSSH for Windows update by toyg on Monday October 19, 2015 @07:49PM (#10416585)
> Will this OpenSSH server be able to run interactive console programs

I would think so. Anything less would not be a real SSH server.