Class SshServer

  • All Implemented Interfaces:
    InitializingPhase, Named, ShutdownPhase, Endpoint, Server, com.consol.citrus.spi.ReferenceResolverAware, Runnable

    public class SshServer
    extends AbstractServer
    SSH Server implemented with Apache SSHD (http://mina.apache.org/sshd/). It uses the same semantic as the Jetty Servers for HTTP and WS mocks and translates an incoming request into a message, for which a reply message gets translates to the SSH return value. The incoming message generated has the following format: cat - This is the standard input sent The reply message to be generated by a handler should have the following format 0 This is the standard input sent warning: no tty
    Since:
    04.09.12
    Author:
    Roland Huss
    • Constructor Detail

      • SshServer

        public SshServer()
        Default constructor using default endpoint configuration.
      • SshServer

        public SshServer​(SshEndpointConfiguration endpointConfiguration)
        Constructor using endpoint configuration.
        Parameters:
        endpointConfiguration -
    • Method Detail

      • getScpTransferEventListener

        protected org.apache.sshd.scp.common.ScpTransferEventListener getScpTransferEventListener()
        Gets Scp trsanfer event listener. By default uses abstract implementation that use trace level logging of all operations.
        Returns:
      • getSftpEventListener

        protected org.apache.sshd.sftp.server.SftpEventListener getSftpEventListener()
        Gets Sftp event listener. By default uses abstract implementation that use trace level logging of all operations.
        Returns:
      • getPort

        public int getPort()
        Gets the server port.
        Returns:
      • setPort

        public void setPort​(int port)
        Sets the port.
        Parameters:
        port - the port to set
      • getUser

        public String getUser()
        Gets the username.
        Returns:
      • setUser

        public void setUser​(String user)
        Sets the user.
        Parameters:
        user - the user to set
      • getPassword

        public String getPassword()
        Gets the user password.
        Returns:
      • setPassword

        public void setPassword​(String password)
        Sets the password.
        Parameters:
        password - the password to set
      • getAllowedKeyPath

        public String getAllowedKeyPath()
        Gets the allowed key path.
        Returns:
      • setAllowedKeyPath

        public void setAllowedKeyPath​(String allowedKeyPath)
        Sets the allowedKeyPath.
        Parameters:
        allowedKeyPath - the allowedKeyPath to set
      • getHostKeyPath

        public String getHostKeyPath()
        Gets the host key path.
        Returns:
      • setHostKeyPath

        public void setHostKeyPath​(String hostKeyPath)
        Sets the hostKeyPath.
        Parameters:
        hostKeyPath - the hostKeyPath to set
      • getUserHomePath

        public String getUserHomePath()
        Gets the userHomePath.
        Returns:
      • setUserHomePath

        public void setUserHomePath​(String userHomePath)
        Sets the userHomePath.
        Parameters:
        userHomePath -
      • getMessageConverter

        public SshMessageConverter getMessageConverter()
        Gets the message converter.
        Returns:
      • setMarshaller

        public void setMarshaller​(SshMarshaller marshaller)
        Sets the marshaller.
        Parameters:
        marshaller -
      • setMessageConverter

        public void setMessageConverter​(SshMessageConverter messageConverter)
        Sets the message converter.
        Parameters:
        messageConverter -