-
Notifications
You must be signed in to change notification settings - Fork 149
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
ssh support #42
Comments
Our libcli based application (running on Linux) is set as the 'shell' of our users, so it starts running as they log in, whether from Console or ssh. |
Our app is basically doing this. It is assigned as the user shell so it is invoked on login. Additionally we’re explicitly forking so the ‘parent’ thread intercepts single characters from the user and funnels them to the ‘child’ process. The child uses the input socket from the parent as ‘sockfd’ when calling cli_loop(). Our parent process additionally can handle some more involved user interactions coming backup from the child (enhanced login prompts, ‘pagination’ features, and so on) in addition to dealing with ctrl-c (SIG_INT) as both a ‘cancel the current prompt’ and ‘cancle any running command called from a libcli callback.
Speaking of pagination I have a long term goal of baking pagination directly into libcli (responding both to telnet control chars and sigwinch for dynamic changes and also direct user overrides). Our app does pagination right now, but we handle it internally before calling cli_print() to display it.
Also working on options and argument processing for commands that supports tab completions and help messages. If our internal devs like what I’ve done that work will be pushed back to David for possible inclusion. I’ve tried to keep him in the loop so he knows what I’m doing.
…-Rob
--
ROBERT SANDERS
Sr. Secure Systems Engineer
FORCEPOINT
T +1.703.896.4762
F +1.703.318.5041
www.forcepoint.com
FORWARD WITHOUT FEAR
From: brjoha <[email protected]>
Reply-To: dparrish/libcli <[email protected]>
Date: Monday, July 8, 2019 at 6:32 PM
To: dparrish/libcli <[email protected]>
Cc: Rob Sanders <[email protected]>, Comment <[email protected]>
Subject: EXTERNAL: Re: [dparrish/libcli] ssh support (#42)
I have a use case where the CLI needs to be embedded in an application and accessed via a secured path like SSH. I'm thinking to standup a socketpair between the secured endpoint and the CLI endpoint to accomplish this.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<#42?email_source=notifications&email_token=AHHFTFZKMAYVYAUK6JOVPE3P6O565A5CNFSM4HGZGGI2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZORFGI#issuecomment-509416089>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AHHFTF3BP6LJSKAB74GGOW3P6O565ANCNFSM4HGZGGIQ>.
|
Hi @RobSanders! |
Hi @illukin , |
Ok. Are you still using the approach that you explained above to connect via ssh, but not telnet? |
Yes. Been making some improvements on our side for processing sigints as well as sniffing the responses to our commands before doing cli_prints() back to the users. For example, if the CLI side callback issues a command that generates prompts, we currently need to intercept those and 'redisplay' them slightly different back to the user. |
Those changes are outside of libcli code. |
Hello
What do you think about different telnet, ssh support depending on the compilation options?
Is there an additional plan for ssh support?
The text was updated successfully, but these errors were encountered: