Solution
As of LabVIEW 2025, LabVIEW's native SSH function (OpenSSH Exec VI and PuTTY SSH Exec VI) can only send and receive a single session and it's not possible to keep it alive by default.
If continuous communication with an SSH session is required, please review the following workarounds:
- Use third-party addon for LabVIEW such as LIBSSH2 for LabVIEW Toolkit which can be downloaded via VI Package Manager. Note: support for this third-party addon is provided by Field R&D Services.
- If you are looking to establish continuous communication with a Linux server through SSH, you can use the tmux command. tmux allows you to create several pseudo-terminals from a single terminal. It also decouples your programs from the main SSH terminal, protecting them from accidentally disconnecting. With the tmux command, you can detach your application from the main terminal, and it will continue to run safely in the background. For more information, please refer to the following documentation from RedHat: A beginner's guide to tmux. When using this approach, you need to consider the following:
- To start your program and detach it, you can run tmux new-session -d -s <your_session_name> "your_application_name"
- To send commands to your separate session you can execute: tmux send-keys -t <your_session_name> "<your_Query>" Enter
- To read the response: tmux capture-pane -t <your_session_name> -p
- To end the session and close the program in the background: tmux kill-server
You can use the following framework as a guide:

Note: This image is a LabVIEW snippet, which includes LabVIEW code that you can reuse in your project. To use a snippet, right-click the image, save it to your computer, and drag the file onto your LabVIEW diagram.
- If you can modify your application, consider adding TCP/IP communication so you can send commands to it via the TCP/IP functions available in LabVIEW. You can still use the OpenSSH Exec VI or PuTTY SSH Exec VI to start your program in the background and then use TCP/IP functions for sending requests and receiving replies.