Class InteractiveProcessShellFactory
java.lang.Object
org.apache.sshd.common.util.logging.AbstractLoggingBean
org.apache.sshd.server.shell.ProcessShellFactory
org.apache.sshd.server.shell.InteractiveProcessShellFactory
- All Implemented Interfaces:
ShellFactory
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 Summary
FieldsFields inherited from class AbstractLoggingBean
log -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionresolveEffectiveCommand(ChannelSession channel, String rawCommand, List<String> parsedElements) Determines the shell command to run.Methods inherited from class ProcessShellFactory
createInvertedShell, createShell, getCommand, getElements, setCommand, setCommand
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
InteractiveProcessShellFactory
public InteractiveProcessShellFactory()
-
-
Method Details
-
resolveEffectiveCommand
protected List<String> resolveEffectiveCommand(ChannelSession channel, String rawCommand, List<String> parsedElements) Description copied from class:ProcessShellFactoryDetermines the shell command to run. On Windowscmd.exe /Cis used; on other systems/bin/sh -c.- Overrides:
resolveEffectiveCommandin classProcessShellFactory- Parameters:
channel-ChannelSessionthe shell will be executed inrawCommand- the shell command passedparsedElements- legacy; unused- Returns:
- a list containing the full command to run to execute the given
rawCommand
-