Class SSHConnection

    • Field Detail

      • m_ForwardX

        protected boolean m_ForwardX
        whether to forward X11.
      • m_XHost

        protected String m_XHost
        the xhost to use.
      • m_XPort

        protected int m_XPort
        the xport to use.
      • m_Wait

        protected int m_Wait
        the time in msec to wait before disconnecting the session again.
    • Constructor Detail

      • SSHConnection

        public SSHConnection()
    • Method Detail

      • setForwardX

        public void setForwardX​(boolean value)
        Sets whether to forward X11.
        Parameters:
        value - if true then X11 is forwarded
      • getForwardX

        public boolean getForwardX()
        Returns whether X11 is forwarded.
        Returns:
        true if X11 is forwarded
      • forwardXTipText

        public String forwardXTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setXHost

        public void setXHost​(String value)
        Sets the xhost to connect to.
        Parameters:
        value - the host name/ip
      • getXHost

        public String getXHost()
        Returns the xhost to connect to.
        Returns:
        the host name/ip
      • XHostTipText

        public String XHostTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setXPort

        public void setXPort​(int value)
        Sets the xport to connect to.
        Parameters:
        value - the port
      • getXPort

        public int getXPort()
        Returns the xport to connect to.
        Returns:
        the port
      • XPortTipText

        public String XPortTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setWait

        public void setWait​(int value)
        Sets the period in msec to wait before disconnecting the session.
        Parameters:
        value - the waiting period
      • getWait

        public int getWait()
        Returns the period in msec to wait before disconnecting the session.
        Returns:
        the waiting period
      • waitTipText

        public String waitTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • createSession

        protected com.jcraft.jsch.Session createSession​(String host,
                                                        int port)
                                                 throws Exception
        Creates a new Session object, but does not connect or establish the tunnel.
        Overrides:
        createSession in class AbstractSSHConnection
        Returns:
        the Session object
        Throws:
        Exception
      • doSend

        protected String doSend​(RemoteCommand cmd,
                                RemoteCommandProcessor processor,
                                boolean request)
        Sends the command to the specified sscripting engine.
        Specified by:
        doSend in class AbstractSSHConnection
        Parameters:
        cmd - the command to send
        processor - the processor for formatting/parsing
        request - whether Request or Response
        Returns:
        null if successfully sent, otherwise error message