After a quick investigation, it looks like the differences came from the
client side.
Using openssh client with a command requires the -t option (Force
pseudo-terminal allocation).
Without a command enables this option by default.

On Fri, Jul 7, 2023 at 7:13 PM Jorge Martín Cuervo <[email protected]>
wrote:

> I see that with the shell factory y get this from the ssh client:
>
> debug1: ENABLE_VIRTUAL_TERMINAL_INPUT is supported. Reading the VTSequence
> from console
> debug1: ENABLE_VIRTUAL_TERMINAL_PROCESSING is supported. Console supports
> the ansi parsing
>
> which I dont get with the command factory.
> how can i make the command factory work like the shell factory?
>
>
> On Fri, Jul 7, 2023 at 2:04 PM Jorge Martín Cuervo <[email protected]>
> wrote:
>
>> Hello,
>>
>> I have a working server with a shell implementation and I want to improve
>> it with a command. I want to use the command to receive parameters in the
>> shell:
>>
>> ssh user@server param1 param2
>>
>> And in both cases open an interactive shell. I have instructed the 2
>> factories (Command and Shell) to create instances of the same class.
>> However I see slightly different behaviours. With the console factory it
>> looks like the commands I input are echoed.
>>
>> Reading the documentation, there is a mention that the channel types are
>> different.
>> https://github.com/apache/mina-sshd/blob/master/docs/server-setup.md
>>
>> [...]
>> CommandFactory - The CommandFactory provides the ability to run a
>> *single* direct command at a time instead of an interactive session (it
>> also uses a *different* channel type than shells). It can be used *in
>> addition* to the ShellFactory.
>> [...]
>>
>> Could you please explain the different types?
>>
>> Many thanks!!
>>
>>
>
> --
> ____________________________________
> Jorge Martin Cuervo
>
> email <[email protected]>
> voice 0032 489 336 802
> ____________________________________
>

Reply via email to