I am running the SSH utility bundled with Cygwin using the ProcessBuilder class in Java. Everything is working fine. I connect to a Linux server via SSH, I can run commands and read the output.
However, whenever the output is returned, this only happens after entering the server and running commands, for example, a list of directories ls, returns something like this:
InputStream: root@myserver:/scripts/common
InputStream: [00m[00mA1-4.yaml[00m [01;32mscip-1.2.0.linux.x86_64.gnu.opt.qso[00m
InputStream: [00madditional_files.txt[00m [01;32mscip-1.2.0.linux.x86_64.gnu.opt.spx[00m
As I understand it, this only happens with the file list command. For example, when I run other commands, such as time, etc., It shows a normal output.
Can you suggest what adding these random characters to the file name is?
I even tried using UTF8 encoding, but nothing changed. When I log in directly using the command line, I do not see these results. However, cmdline shows file names in color values. Is there any additional information that is not ASCII?
source
share