Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

powershell will not start in ssh session #128

Closed
Ventusfahrer opened this issue Feb 24, 2016 · 2 comments
Closed

powershell will not start in ssh session #128

Ventusfahrer opened this issue Feb 24, 2016 · 2 comments

Comments

@Ventusfahrer
Copy link

when starting powershell in an ssh session I got following error message:

user@mydomain@hostname C:\Users\user>powershell
Windows PowerShell
Copyright (C) 2015 Microsoft Corporation. All rights reserved.


Oops, something went wrong.  Please report this bug with the details below.
Report on GitHub: https://github.com/lzybkr/PSReadLine/issues/new
-----------------------------------------------------------------------
Last 0 Keys:


Exception:
System.IO.IOException: The handle is invalid.

   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.Console.GetBufferInfo(Boolean throwOnNoConsole, Boolean& succeeded)
   at Microsoft.PowerShell.PSConsoleReadLine.Initialize(Runspace runspace, EngineIntrinsics engineIntrinsics)
   at Microsoft.PowerShell.PSConsoleReadLine.ReadLine(Runspace runspace, EngineIntrinsics engineIntrinsics)
-----------------------------------------------------------------------

I am quite no sure whether this is releted to sshd or powershell?

@quamrulmina
Copy link
Contributor

You need to use "powershell -File -" instead of just typing powershell in remote sshd session. It is a known issue due to both how powershell remotely works and how win32 ported sshd is currently designed only providing streammode/linemode features and not true windows console underneath. See closed issue #16 for full description on why you need this special options (- File -) to run powershell in sshd.

@manojampalam
Copy link
Contributor

This will be covered as part of #90

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants