Feature Request: allow parameter to ask for pseudo tty allocation for SSH PSSession #11970
Labels
Issue-Enhancement
the issue is more of a feature request than a bug
Resolution-Duplicate
The issue is a duplicate.
WG-Engine
core PowerShell engine, interpreter, and runtime
Summary of the new feature/enhancement
I am finding the SSH remoting feature very useful but it is lacking a featrure that the raw ssh command has. Raw SSH allocates a pseudo-TTY automatically for interactive sessions and of given the parameter
-t
it will also do that for a batch session. Can there be a similar option forNew-PSSession
andEnter-PSSession
? Pseudo-TTYs are a must to runsudo
in a remote interactive shell. The workaround of using<password> | sudo -s <command>
violates a commonly held tenet of not typing passwords where command history may save them. It maybe acceptable to do so in a batch script but not in an interactive setting where the user is there to type teh password when prompted.Proposed technical implementation details (optional)
I propose a new parameter
-AllocateTTY
that would force allocate a pseudo-TTY. According to forums I have looked at the commonly usedRenci.SSHNet
library used for SSH in .NET applications surfaces this option in its APIs.I expect that I can run sudo normally like when I use the normal ssh command whenever I create and enter a remote SSH based PSSession.
The text was updated successfully, but these errors were encountered: