Package org.apache.sshd.server.session

Examples of org.apache.sshd.server.session.ServerSession


    }

    protected boolean handleAgentForwarding(Buffer buffer) throws IOException {
        boolean wantReply = buffer.getBoolean();

        final ServerSession server = (ServerSession) session;
        final ForwardingFilter filter = server.getServerFactoryManager().getForwardingFilter();
        if (filter == null || !filter.canForwardAgent(server)) {
            if (wantReply) {
                buffer = session.createBuffer(SshConstants.Message.SSH_MSG_CHANNEL_FAILURE, 0);
                buffer.putInt(recipient);
                session.writePacket(buffer);
View Full Code Here


    }

    protected boolean handleX11Forwarding(Buffer buffer) throws IOException {
        boolean wantReply = buffer.getBoolean();

        final ServerSession server = (ServerSession) session;
        final ForwardingFilter filter = server.getServerFactoryManager().getForwardingFilter();
        if (filter == null || !filter.canForwardX11(server)) {
            if (wantReply) {
                buffer = session.createBuffer(SshConstants.Message.SSH_MSG_CHANNEL_FAILURE, 0);
                buffer.putInt(recipient);
                session.writePacket(buffer);
View Full Code Here

    final long now = System.currentTimeMillis();
    p.print(String.format("%-8s %8s %8s   %-15s %s\n", //
        "Session", "Start", "Idle", "User", "Remote Host"));
    p.print("--------------------------------------------------------------\n");
    for (final IoSession io : list) {
      ServerSession s = (ServerSession) ServerSession.getSession(io, true);
      SshSession sd = s != null ? s.getAttribute(SshSession.KEY) : null;

      final SocketAddress remoteAddress = io.getRemoteAddress();
      final long start = io.getCreationTime();
      final long idle = now - io.getLastIoTime();
View Full Code Here

        if (io.getConfig() instanceof SocketSessionConfig) {
          final SocketSessionConfig c = (SocketSessionConfig) io.getConfig();
          c.setKeepAlive(keepAlive);
        }

        final ServerSession s = (ServerSession) super.createSession(io);
        final int id = idGenerator.next();
        final SocketAddress peer = io.getRemoteAddress();
        final SshSession sd = new SshSession(id, peer);
        s.setAttribute(SshSession.KEY, sd);

        // Log a session close without authentication as a failure.
        //
        io.getCloseFuture().addListener(new IoFutureListener<IoFuture>() {
          @Override
View Full Code Here

TOP

Related Classes of org.apache.sshd.server.session.ServerSession

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.