ssh / sshd commands

Skip to first unread message


Mar 7, 2019, 12:07:48 PM3/7/19
to jline-users
What are the steps I need to do to enable ssh/sshd commands?

In the demo both commands are available and do work very well. I guess they are added via the gosh_profile script but the script logic unfortunately requires two demo related classfiles (e.g. 'org.jline.demo.Gogo' and 'org.jline.demo.FunctionConverter').

I tried to copy the gosh_profile from felix into my small osgi/bnd test application without luck. The ssh and sshd commands still do not work. I really would like to learn how this works and I can offer a small bndtools project. When I manage to have a working gogo.jline terminal with ssh functionality I would also like to provide that example project and the corresponding documentation.

gosh_profile and the script language in general are both totally new to me so I am a bit lost at the moment. Is there any documentation regarding the profile synthax available? As the basic gogo shell also uses gosh_profile it might be more a felix related question where I can find the documentation but perhaps someone here can also give me a hint.

Guillaume Nodet

Apr 4, 2019, 3:00:28 PM4/4/19
The split of the ssh support between gogo and jline is a bit hacky.
Some of the magic is done because the gogo shell is using reflection.
Another example you could look at and which may be a bit less magic is the karaf integration:
On the server side, you need to create the SSHD server and configure it to use a custom shell factory such as:
When a client connects, it will create a new Command instance, 
initialize the streams and start it.
This is where a SSH JLine terminal should be created and you need to launch the shell.  This is also where the JLine's work ends as it does not really implement any shell.
The link is done in the script, but basically, the ShellFactoryImpl ends up calling
which leads to

Hopes this helps a bit and sorry for the delay.

You received this message because you are subscribed to the Google Groups "jline-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
For more options, visit
Reply all
Reply to author
0 new messages