Class UnsupportedSession

java.lang.Object
com.sshtools.synergy.ssh.ChannelNG<SshServerContext>
com.sshtools.server.SessionChannelNG
com.sshtools.server.UnsupportedSession
All Implemented Interfaces:
com.sshtools.common.nio.IdleStateListener, com.sshtools.common.ssh.Channel, com.sshtools.common.ssh.SessionChannel, com.sshtools.common.ssh.SessionChannelServer

public class UnsupportedSession extends SessionChannelNG
This is a basic session that provides a message to the user to inform them that a shell or command cannot be executed because the server does not support an interactive session.
  • Constructor Details

    • UnsupportedSession

      public UnsupportedSession(com.sshtools.common.ssh.SshConnection con)
  • Method Details

    • executeCommand

      protected boolean executeCommand(String cmd)
    • startShell

      protected boolean startShell()
      Description copied from class: SessionChannelNG
      Invoked when the user wants to start a shell.
      Specified by:
      startShell in class SessionChannelNG
      Returns:
      true if the shell has been started, otherwise false
    • allocatePseudoTerminal

      protected boolean allocatePseudoTerminal(String parm1, int parm2, int parm3, int parm4, int parm5, byte[] parm6)
      Description copied from class: SessionChannelNG
      If the client requests a pseudo terminal for the session this method will be invoked before the shell, exec or subsystem is started.
      Specified by:
      allocatePseudoTerminal in class SessionChannelNG
      Returns:
      boolean
    • setEnvironmentVariable

      public boolean setEnvironmentVariable(String name, String value)
      Description copied from class: SessionChannelNG
      If the client requests that an environment variable be set this method will be invoked.
      Specified by:
      setEnvironmentVariable in interface com.sshtools.common.ssh.SessionChannelServer
      Specified by:
      setEnvironmentVariable in class SessionChannelNG
      Returns:
      true if the variable has been set, otherwise false
    • changeWindowDimensions

      protected void changeWindowDimensions(int cols, int rows, int width, int height)
      Description copied from class: SessionChannelNG
      When the window (terminal) size changes on the client side, it MAY send notification in which case this method will be invoked to notify the session that a change has occurred.
      Specified by:
      changeWindowDimensions in class SessionChannelNG
    • onLocalEOF

      protected void onLocalEOF()
      Specified by:
      onLocalEOF in class com.sshtools.synergy.ssh.ChannelNG<SshServerContext>
    • processSignal

      protected void processSignal(String signal)
      Description copied from class: SessionChannelNG
      A signal can be delivered to the process by the client. If a signal is received this method will be invoked so that the session may evaluate and take the required action.
      Specified by:
      processSignal in class SessionChannelNG