hierynomus / sshj

ssh, scp and sftp for java
Apache License 2.0
2.46k stars 595 forks source link

Xterm.js support? #685

Open uhhmed opened 3 years ago

uhhmed commented 3 years ago

Hi,

I've been trying to have xterm.js work properly for a while and everything I tried seems to still result in a weird display bug when the terminal shell is rendered on the front-end.

I have sshj in the project successfully able to connect to the server I pass it to, but when I display the output in the front-end, I keep getting an extra output from sshj that just passes the prompt and output from the connected server. This results in two of the same output showing after each other.

I'm using the allocateDefaultPTY() to start the shell, and was just wondering if the extra output issue could be resolved by another method (allocatePTY() with correct parameters possibly?).

is there a way to not show the prompt line from the connected server as part of the message that sshj passes back? only output Is what I'm hoping to get back. Thank you!

hierynomus commented 3 years ago

allocateDefaultPty allocates a vt100 compatible PTY. You could indeed try experimenting with that.