Posh-SSH icon indicating copy to clipboard operation
Posh-SSH copied to clipboard

Is there a way to select the shell-type for a new session?

Open cedricmenzi05 opened this issue 2 years ago • 2 comments

Is there a way to select the shell i want to use when using New-SSHSession? I need to open a SSH-Connection to the shell /bin/clsh but the device default is another one. Thanks!

cedricmenzi05 avatar Apr 10 '23 23:04 cedricmenzi05

When you create a new session, an interactive shell is not created. It is only at the protocol level. Invoke-SSHCommand runs a specified binary with the parameters passed and the command's stdout is sent back. It is not run in a shell. A ShellStream does create an interactive shell with the default shell, once started you can start the other from within the streamshell by writing to it with a carriage return to indicate the entering of a command.

darkoperator avatar Apr 11 '23 11:04 darkoperator