Package com.sshtools.daemon

Examples of com.sshtools.daemon.SshServer


    configureServer ();
  }

  private void start () throws IOException {

    SshServer server = new SshServer() {

      @Override
      public void configureServices (ConnectionProtocol connection) throws IOException {
        connection.addChannelFactory(SessionChannelFactory.SESSION_CHANNEL,
          new SessionChannelFactory());

        if (ConfigurationLoader.isConfigurationAvailable(ServerConfiguration.class)) {
          if ((ConfigurationLoader
            .getConfiguration(com.sshtools.daemon.configuration.ServerConfiguration.class)).getAllowTcpForwarding()) {
//            ForwardingServer forwarding =
            new ForwardingServer(connection);
          }
        }
      }

      @Override
      public void shutdown (String msg) {
        // Disconnect all sessions
      }

      @Override
      protected boolean isAcceptConnectionFrom(Socket socket) {
        return true;
      }

    };

    server.startServer();
  }
View Full Code Here

TOP

Related Classes of com.sshtools.daemon.SshServer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.