Hello,
I am trying to integrate a client shell channel (class ChannelShell) into 
JediTerm, a terminal emulator component.I got stuck, and below is my journey. 
Hopefully somebody can lead me to the right track.
After logging in, the terminal emulator displays the welcome text and then a 
prompt, which is good.
I type "ls" (without double-quotes). It echoes back and displays the two 
characters, which is good too.
But when I press [Enter], it echoes back the Carriage Return character, whereas 
the "correct behaviour"should be echoing back the next prompt.
I also try pressing [Backspace]. It echoes back the DEL character (ASCII code 
127), whereas the "correct behaviour" should be some kind of escape sequence 
...[K
I double-quote "correct behaviour" above because I am nowhere familiar enough 
with the VT100 protocolto say what the "correct behaviour" should be. I am just 
trying to make it behave the same as anotherworking example, which uses Jsch as 
the ssh client. What I perceive as "correct behaviours" are whatI observe in 
the working example.
I suspect it is some PtyMode I have to set before opening the shell channel. I 
have tried the DEFAULT_PTY_MODES:
    ChannelShell shell = session.createShellChannel();

    shell.setPtyType("xterm"); 
    shell.setPtyModes(ChannelShell.DEFAULT_PTY_MODES); 

    shell.open().verify(5L, TimeUnit.SECONDS); 

But to no avail. There are so many possible modes to set, I just don't know 
where to start trying andhopefully somebody here can give me some pointers. Or 
it may not be PtyMode at all .....
I have also entertained the possibility that maybe JediTerm (the terminal 
emulator) is at fault. But sinceI got a working JediTerm example with Jsch, and 
the server responses are different, I think there mustbe some ways to make the 
server respond differently. I just don't know where to tweak it in SSHD.
Any help is appreciated. Thanks in advance.

Nick

Reply via email to