I have a blackbox device that we currently connect to using PuTTY. I now need to integrate that functionality into a LabVIEW VI. I have tried using PuTTY and PLink through the system exec VI which works but I need to be able to read the responses back from the blackbox into my VI. Using the system exec I am simply launching a PuTTY window, this is not exchanging data with my VI. I then tried the "Native SSH" example I found in this community. I entered the Username, IP and password and the VI runs with no errors but I am not seeing the response from the black box. I will need to send additional commands to the box based on the responses received. Any help?
I have written a library that creates an SSH session where you can interactively communicate with a remote machine.
Have a look at the following blog post where I have videos showing how to use the library and also a download for the library. http://www.labvolution.com/ssh-with-labview/
There is also an SFTP component which allows transfering of files. http://www.labvolution.com/sftp-file-transfer-labview/
I hope this helps,
Thanks for the reply. I haven't dug into your application as it appears to be created in a newer version than I am running. I'm on LV '14. I believe there is a link for converting which I will try to find.
I have a 2014 version at home which I can email to you later this evening. If you DM me your email address I can send it.
There used to be an online converter on LabVIEW Hacker, but I couldn't find it when I looked the other day.
Please support this idea:
6 years and 200+ kudos later and still no native support for SSH.
Products under test as well as test & measurement equipment (like IoT) is migrating to secure comms and we still have to limp around without native support.
OK, fella's these tools are great and I am happy that Greg was kind enough to post them. I have made some progress but am now, once again, stumped. When I write a single letter out to my end device (the letter being 'c') I am actually sending c^J. I put in a message box so I could pause execution and grab the following screenshot. What am I doing wrong (and I assume I am). THANKS!!!
I'm glad you are making pogress. One thing that might be happening is that when you send 'c', a line feed (\n) is automatically concatenated to the string to simulate the return key being pressed. This is done by the dll.
When trying to change the serial number, the device might be expecting 'c' only, without the line feed. Have you tried to do this process manually using PuTTY? What are the process steps?
I'll compile a new version of the dll that does not concatenate a line feed so you can try it out. You will then have to concatenate a line feed to all the other commands you input to Write.vi.
Do this for normal commands: (This change only applies to Write.vi)
Do this for commands that do not require a line feed:
I've DM'd you a link to the new dll. I've versioned it 188.8.131.52.
I hope this helps.
You are absolutely correct. In PuTTY, I just enter 'c' without a carriage return so the line feed is probably the issue. I'll try the new DLL. Being a rather remedial LabView coder I try to power through things to see if I can figure them out on my own. But one thing I don't understand is how the .DLL's come into play. Is it as simple as deleting the old one and copying the new one in its place (in the...\references directory) or is there something I need to do inside of my project?
Just close down all your LabVIEW code and the LabVIEW getting started window.
Copy and replace the LabSSH.dll in the references folder of my library.
Open your LabVIEW project, this will cause the conflict dialog to open which you can just skip through as it is only indicating that the dll version has changed.
Add a line feed to the commands where you need them in your LabVIEW code.
That should be it. If it doesn't work then let me know and there is another step that you could do.