Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Persistent history #39

Closed
daniele77 opened this issue Mar 22, 2019 · 5 comments
Closed

Persistent history #39

daniele77 opened this issue Mar 22, 2019 · 5 comments
Assignees

Comments

@daniele77
Copy link
Owner

It would be useful to (optionally) make persistent the cli history.

The local session and each remote session should maintain its own history.
But how to identify remote sessions?
According to the client IP address?
Or more simply by providing one history for the local session and just one for all the remote sessions? In this case, what happens when more than one client is connected simultaneously?

Maybe we could start by providing persistent history just for the local session.

@daniele77 daniele77 self-assigned this Mar 22, 2019
@vrobles-gee
Copy link
Contributor

vrobles-gee commented Feb 25, 2020

Hi @daniele77, I was wondering if you ever started to work on this feature. It would be really useful for our use case (we are using remote sessions on telnet server). About the question "what happens when more than one client is connected simultaneously", I am not sure how SSH manages it, but maybe the same behavior can be duplicated?.

@daniele77
Copy link
Owner Author

@vrobles-gee I will start as soon as possible with this issue, because it's relevant for our applications also. I'd like to copy the behavior of ssh/telnet.
BTW: in the future, I'd like to publish somewhere a list of known applications using this library. If you don't have privacy constraints, could you share publicly in what kind of application are you using cli? Thanks.

@daniele77
Copy link
Owner Author

After a couple of tests, ssh seems to save history data in a persistent way only after exiting the session. It seems there is only one persistent history, and each time a session is closed, its history data is appended to the history file. When a new session starts, the history file is loaded.

This will also be the behavior of the library.

@vrobles-gee
Copy link
Contributor

@daniele77, that behavior seems good.

I also wanted to ask how would this feature behave if we had Authentication feature (issue #57) in the future, and multiple credentials are supported? I believe persistent history would behave like you described but will store separated history file per user right?

About the application, we are using cli library to provide remote access to a network management software. I'm sorry I can't disclose more details due to privacy constraints as you said.

Thanks,

@daniele77
Copy link
Owner Author

The feature is almost completed (both with persistent history on a file and with in-memory history, as policies).

As for the authentication, see my answer on issue #57

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants