How to get complete ssh output if strings are very long?

Hi nrGurus, I am using sshtools (and ssh-v3) plugins to get outputs from a server. The returned json is a pretty long strings which cause the debug node displays a "..." in the end, in this case I can't parse into valid json because of that "..." at the end.

At first glance I thought this was a problem of the plugins, so I pipe the output into a file (stored inside that server of cause), and then read the file, but still I get that "..." at the end. I also googled how to deal with this situation but can't find a solution.

My question is, how to get rid of that "..."? or better, how to get a complete string from ssh output? Thanks guys!

Set the debug to output to console, or save the output to a file using file write node or send through a json node where you should be able to copy the javascript object from the debug sidebar., as the debug truncates when displaying over 100 chars to save bandwidth.

You can increase the 1000 chars in the settings file if you want to also

1 Like

Awesome! thanks man. The setting file tips really helped!

    debugMaxLength: 10000,

Just to point out - the value shown in the debug sidebar is deliberately truncated to keep things nice and responsive. The actual FULL value is present in the msg. Assuming the value is JSON, if you simply passed the msg through a JSON node you would see the full parsed object. Another way of seeing the full value is to send it to a debug node configured to send the value to console (you WILL see the full value in console)

Setting debugMaxLength to 10000 is not a great idea.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.