Please note that this project is no longer being actively supported and does not support some of the newer connection methods.
The LabSSH and LabSFTP libraries provide interactive SSH communication and SFTP file transfer from a LabVIEW application to a remote machine.
The libraries are shared by Labvolution, a UK Alliance Partner.
Requirements
References
For videos on how to use the libraries, see the following links:
Support
Please post questions or comments here or get in touch with me directly.
Downloads
The source code is attached to this document.
Thank you for contribution to the Reference Design Portal. This looks like a great set of tools. Have you considered also submitting them to the LabVIEW Tools Network which will give you even more exposure?
http://sine.ni.com/np/app/main/p/bot/no/ap/lvtn/lang/en/pg/1/sn/n21:28/sb/default/fmid/3067/
If you don't mind I will update your posting to include some of the components of the document template (https://decibel.ni.com/content/docs/DOC-47096) we provide for code submissions.
Hi Christian,
Thanks for approving my submission. I hadn't thought of the tools network but will definitely look in to it, thanks for the link.
I don't mind at all you updating the document to the template.
Hello Greg.
I would like to try this design as I'm looking for a suitable solution for SSH communication. I have try NI's partner Labwerx but that wasn't what we need. Curently I'm using own code based on putty but again, I'm not 100% happy about it as it is not suitable for automated tests.
Could you please afford this code for LV2014 or is that a problem?
Best Regards
First, thanks very much for this. When everything is correct such as connections and passwords, this works wonders.
I am having a problem however when the password is entered wrong or there is an invalid connection. In the "Connect.vi" I get a 1172 error at the password Invoke Node, which I would expect. However, once execution is stopped after that invoke node or the VI completes execution on it's own, LabVIEW crashes. I've tried this on two different PC's with both LabVIEW 2016 and 2018.
Has anyone else had this issue? Are there any ways around this?
Thanks.
I'd like to echo my thanks in providing the VIs to the LabVIEW community!
I'm seeing the same problem you are SteveC_43 and haven't found a way around it. I'm on a W7 64-bit machine using LabVIEW 2016 (32-bit) and observed the exact same behavior you described.
I've also noticed if I manually try to load the LabSSH.dll (or any of the DLLs) into a .NET constructor, I get the error: "An error occurred trying to load the assembly.". So as long as your SSH host is on the right IP and everything else is working.. the VIs work fine.
Very neat. However, I'm also seeing the same as SteveC_43. To me, that issue is significant enough to inspire searching for another SSH option.
Hi Greg and Christian
I found this tool very important. Till now to use sftp I have to use putty in an unusual way...
However, as all my servers are in Linux, I am not able to use it. I have an error on the all Invoke Node (in someway it seems that the invoke has no any method in list)
How can use it? there is a possibility to use this tool with linux/mac servers?
thanks
dh
Hello,
Would it be possible to implement a SFTP server on a VxWorks cRIO-9022 controler with this library ?
Hello,
LabVIEW 2020 offers some SFTP VIs for your RT project. Unfortunately, there is no help for these VIs. I am using the OpenSSH Connect.vi trying to establish a connection but get an error all the time. My understanding is that the server is unknown. I get a similar pop-up message from FileZilla connecting to the SFTP. But there I have the option to click OK and trust the server. The error message says to connect by hand and make it trusted. How would I go about that? I would appreciate any advice on how to get this resolved or any other solution to use a cRIO and upload files to an SFTP. Thanks.
Error -5580997 occurred at NI_SSH.lvlib:Generic Client.lvclass:Scan stderr.vi:400001
Possible reason(s):
LabVIEW: (Hex 0xFFAAD73B) The SSH server's identity is unknown and could not be read. No previous connection attempt to this server is recorded. No server fingerprint could be identified from the connection logs. Connect to the target by hand and ensure that the host key is trusted.
Complete call chain:
NI_SSH.lvlib:Generic Client.lvclass:Scan stderr.vi:400001
NI_SSH.lvlib:OpenSSH Client.lvclass:Transform error.vi:5130001
NI_SFTP.lvlib:Session.lvclass:Connect.vi:3060001
NI_SFTP.lvlib:Connect (OpenSSH).vi:3190001
Test NI SFTP.vi
ssh_askpass: exec(/tmp/.lvsshpw-lvuser.sh): No such file or directory
Host key verification failed.
hi friend, i going to ssh my linux os that installed on VMware on my pc using "laview tools for ssh and sftp 2021".
could u please help me how to do it.
thanks in advance