How to Continuously Communicate in a SSH Session using LabVIEW?

Updated Aug 23, 2024

Reported In

Software

  • LabVIEW
  • JKI VI Package Manager

Issue Details

I want to automate SSH communication using LabVIEW.
The target device operates by receiving ASCII character commands sequentially while maintaining an SSH communication session. I tried using the PuTTY SSH Exec VI, but the SSH communication session gets disconnected after the first command and I'm unable to execute the follow up ASCII commands, which is causing issues.

putty interface.png
In the above screenshot, I sent gpascii, save and P0 command and get response from the connected device after each command.
LV interface.png
On the other hand when I sent gpascii command using LabVIEW, only the first command work and I get the response but it will automatically exit. The second command save did not reach the device at all.

Could you please advise on how to maintain the SSH communication session? 

Solution

As of LabVIEW 2024, LabVIEW's native SSH function (OpenSSH Exec VI and PuTTY SSH Exec VI) can only send and receive a single session.
To maintain the SSH session you need to use third party addon for LabVIEW such as LIBSSH2 for LabVIEW Toolkit which can be downloaded via VI Package Manager.