Class InteractiveProcessShellFactory

All Implemented Interfaces:
ShellFactory

public class InteractiveProcessShellFactory extends ProcessShellFactory
A simplistic interactive shell factory.

Caveat: Apache MINA SSHD does not provide privilege separation, and SSH users are by default not tied to OS users. The OS shell will run as the same OS user the process using Apache MINA SSHD runs. The shell will have the same access rights as the Apache MINA SSHD server process itself.

It is in general not recommended to use this class as is in a production server.

  • Field Details

  • Constructor Details

    • InteractiveProcessShellFactory

      public InteractiveProcessShellFactory()
  • Method Details

    • resolveEffectiveCommand

      protected List<String> resolveEffectiveCommand(ChannelSession channel, String rawCommand, List<String> parsedElements)
      Description copied from class: ProcessShellFactory
      Determines the shell command to run. On Windows cmd.exe /C is used; on other systems /bin/sh -c.
      Overrides:
      resolveEffectiveCommand in class ProcessShellFactory
      Parameters:
      channel - ChannelSession the shell will be executed in
      rawCommand - the shell command passed
      parsedElements - legacy; unused
      Returns:
      a list containing the full command to run to execute the given rawCommand