opened
borgdylan
username_0
# Summary of the new feature/enhancement

<!-- 
A clear and concise description of what the problem is that the new feature would solve.
Try formulating it in user story style (if applicable):
'As a user I want X so that Y.' with X being the being the action and Y being the value of the action.
-->
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 for `New-PSSession` and `Enter-PSSession`? Pseudo-TTYs are a must to run `sudo` 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 used `Renci.SSHNet` library used for SSH in .NET applications surfaces this option in its APIs.

<!-- 
A clear and concise description of what you want to happen.
Consider providing an example PowerShell experience with expected result.
-->
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.
Feature Request: allow parameter to ask for pseudo tty allocation for SSH PSSession
issue
created
iSazonov
username_1
For reference #11343
comment
created
iSazonov
username_1
Dup #1527
comment