Coder Social home page Coder Social logo

Comments (3)

ThanasisBarekas avatar ThanasisBarekas commented on August 23, 2024

I have seen that this sshShellEvent.getSessionId(); fetches this getIoSession().getId(). What is the difference between the IoSession and the key used sshShellSessionManager.listSessions(). Why in some cases for same session it is different ?

Thank you,
Thanasis

from ssh-shell-spring-boot.

fonimus avatar fonimus commented on August 23, 2024

Hi,

In both cases I usegetServerSession().getIoSession().getId() so the value should be the same.
I just made a quick test and it is ok

┌──────────┬───────────────────────┬────────────────────────┬──────────────────┐
│Session Id│     Local address     │     Remote address     │Authenticated User│
├──────────┼───────────────────────┼────────────────────────┼──────────────────┤
│   101    │/[0:0:0:0:0:0:0:1]:2222│/[0:0:0:0:0:0:0:1]:54219│      admin       │
├──────────┼───────────────────────┼────────────────────────┼──────────────────┤
│   102    │/[0:0:0:0:0:0:0:1]:2222│/[0:0:0:0:0:0:0:1]:54248│      admin       │
└──────────┴───────────────────────┴────────────────────────┴──────────────────┘

2021-02-16 16:50:45.977  INFO 9188 --- [-46352536190611] c.g.f.s.s.complete.DemoConfiguration     : [listener] event 'SESSION_STARTED' [id=101, ip=/[0:0:0:0:0:0:0:1]:54219]
2021-02-16 16:51:31.303  INFO 9188 --- [-46397896694077] c.g.f.s.s.complete.DemoConfiguration     : [listener] event 'SESSION_STARTED' [id=102, ip=/[0:0:0:0:0:0:0:1]:54248]
2021-02-16 16:53:04.680  INFO 9188 --- [-46397896694077] c.g.f.s.s.complete.DemoConfiguration     : [listener] event 'SESSION_STOPPED' [id=102, ip=/[0:0:0:0:0:0:0:1]:54248]
2021-02-16 16:53:05.734  INFO 9188 --- [-46352536190611] c.g.f.s.s.complete.DemoConfiguration     : [listener] event 'SESSION_STOPPED' [id=101, ip=/[0:0:0:0:0:0:0:1]:54219]

In any case I am using apache mina internal api to fetch this id.
Can you provide a non working example ?

from ssh-shell-spring-boot.

ThanasisBarekas avatar ThanasisBarekas commented on August 23, 2024

You are correct, there is no mismatch. The mismatch was caused by my implementation. Sorry for the inconvinience.

from ssh-shell-spring-boot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.