Class SuExec

All Implemented Interfaces:
org.apache.sshd.server.command.Command, org.apache.sshd.server.command.CommandDirectErrorStreamAware, org.apache.sshd.server.command.CommandDirectInputStreamAware, org.apache.sshd.server.command.CommandDirectOutputStreamAware, org.apache.sshd.server.command.CommandDirectStreamsAware, org.apache.sshd.server.command.CommandLifecycle

public final class SuExec extends BaseCommand
Executes any other command as a different user identity.

The calling user must be authenticated as a PeerDaemonUser, which usually requires public key authentication using this daemon's private host key, or a key on this daemon's peer host key ring.

  • Method Details

    • start

      public void start(org.apache.sshd.server.channel.ChannelSession channel, org.apache.sshd.server.Environment env) throws IOException
      Throws:
      IOException
    • destroy

      public void destroy(org.apache.sshd.server.channel.ChannelSession channel)
      Specified by:
      destroy in interface org.apache.sshd.server.command.CommandLifecycle
      Overrides:
      destroy in class BaseCommand