Pssession Output is not to a terminal

hi guys,can some one explain how exactly enter-pssession work ?
i think this type of remote connection work only for PS command not all command type.
i have install command line text editor “VIM” on my server 2022, but when i try to edit a text file i recived this error :

192.168.254.128]: PS C:\Users\Administrator\Documents> vim C:\programdata\ssh\sshd_config
vim : Vim: Warning: Output is not to a terminal
    + CategoryInfo          : NotSpecified: (Vim: Warning: O...t to a terminal:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError

Vim: Warning: Input is not from a terminal

can i solve this issue ?

I actually wouldn’t expect VIM to work over a PSRemoting connection since it is not a classical command line tool. It handles it’s own input and output.

A PSSession is not a replacement for an SSH tunnel.

I’d say “No”. :man_shrugging:t3:

What is it actually what you’re trying to accomplish? There might be another/ a better way. :thinking:

Enter-PSSession is essentially a command to start a ‘remote session’. It uses winRM, but it’s not SSH.

It simply won’t work using VIM. Take a look at this: neovim not rendering correctly in PowerShell Remote Session · Issue #10669 · neovim/neovim (github.com)

If you want to use it, use a different software. If on Windows there’s a ton of options, also VS Code is always a great option with the poweshell extension. I can’t speak to other OS’s though.