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

**URL:** <https://discourse.nodered.org/t/how-to-get-complete-ssh-output-if-strings-are-very-long/92466>\
**Category:** General\
**Tags:** exec\
**Created:** [17 October 2024 15:09 UTC](https://discourse.nodered.org/t/how-to-get-complete-ssh-output-if-strings-are-very-long/92466 "2024-10-17T15:09:50Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![kevinshane](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/kevinshane/32/300_2.png) [@kevinshane](https://discourse.nodered.org/u/kevinshane)\
**Post date:** [17 October 2024 15:09 UTC](https://discourse.nodered.org/t/how-to-get-complete-ssh-output-if-strings-are-very-long/92466/1 "2024-10-17T15:09:50Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [17 October 2024 15:18 UTC](https://discourse.nodered.org/t/how-to-get-complete-ssh-output-if-strings-are-very-long/92466/2 "2024-10-17T15:18:16Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![kevinshane](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/kevinshane/32/300_2.png) [@kevinshane](https://discourse.nodered.org/u/kevinshane)\
**Post date:** [17 October 2024 15:32 UTC](https://discourse.nodered.org/t/how-to-get-complete-ssh-output-if-strings-are-very-long/92466/3 "2024-10-17T15:32:21Z")

</div>

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

```js
    debugMaxLength: 10000,

```

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [17 October 2024 17:17 UTC](https://discourse.nodered.org/t/how-to-get-complete-ssh-output-if-strings-are-very-long/92466/4 "2024-10-17T17:17:50Z")

</div>

> [@kevinshane](#):
>
> 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.

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.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [31 October 2024 17:18 UTC](https://discourse.nodered.org/t/how-to-get-complete-ssh-output-if-strings-are-very-long/92466/5 "2024-10-31T17:18:31Z")

</div>

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