Comments (3)
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.
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.
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)
- [Question] Postprocessor return type HOT 3
- [Bug] task-single throws NPE HOT 1
- [Security] Workflow release.yml is using vulnerable action s4u/maven-settings-action HOT 1
- 1.7.0 maven central HOT 2
- Circular dependecy when importing the library HOT 7
- Remote code execution HOT 1
- [Support Request] BuiltInCommand Script can not be disabled HOT 2
- CVE-2022-27772 in spring-shell-starter HOT 1
- Release (2.0.1) not working with J8 HOT 3
- After upgrading to 2.0.2 release ValueProviderSupport class is not longer supported HOT 2
- [support request] HOT 3
- Pasting a command in Linux environment after upgrading to latest version does not work properly HOT 2
- [Question] How to open ssh connection and immediately execute command HOT 1
- Thank God, on the basis of your program to achieve the server/container fortress machine HOT 1
- [Support Request] How to disable CBC mode cipher encryption in Apache Mina SSHD Java library HOT 2
- [Support Request] sessionId vs getIoSession().getId() HOT 2
- Show command result as table in linux
- SpringBoot 3.1 HOT 1
- Exit command is missing in 3.1.0 Release HOT 3
- javax/jakarta annotations
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ssh-shell-spring-boot.