Closed nicferrier closed 8 years ago
@nicferrier it's possible to specify PTY options if you use the session.allocatePTY()
option, there are various echo options on PTYMode
that I'm not sure of the semantics of, you might want to poke around there.
@nicferrier does this also happen if you regularly connect to the server/program? Or only through SSHJ?
@nicferrier Do you still have this problem? If so can you share some code on how you setup your connection, and preferably a reproduction scenario?
I had this problem with echo too - what helped for me was like it was already mentioned above - providing one of PTYMode (PTYMode.ECHO) flags when setting up the pseudo terminal.
I provided an example in https://github.com/hierynomus/sshj/issues/273
See #273, closing this question.
Note for others with similar problems: I got (non-local) echo when being stupid and sending commands before I got the prompt when connecting to a Red Pitaya (Linux-based). This could maybe apply to other systems as well.
I'm trying to connect to a remote program and talk over ssh to it. But when I do that I get local echo, which obviously makes parsing the output of the program rather difficult.
Here's an example with a simple shell:
I can't remember if this is a thing about ssh or java or what... obviously local echo is an option in some terminals... can anyone point me to how I can stop it happening?
The code I'm using is basically the RudimentaryPTY example.