Posh-SSH
Posh-SSH copied to clipboard
Is there a way to select the shell-type for a new session?
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!
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.