08-28-2010 11:47 AM
I'm looking for some help implementing SSH connections in LabVIEW. I've tried several different solutions that have been demonstrated on the forums here, but with no success.
I've done a lot with the Telnet commands in LabVIEW and they work great for my needs - but aren't helping me at all with the SSH connection.
Here's the project:
I'm trying to communicate with an embedded product that has a command line interface accessable only by an SSH connection. I'm trying to automate the collection of data and setting of parameters that is tediuos, time consuming and subject to errors by the repeated process via the manual process of working with the command line interface.
The embedded product has an IP address of 192.168.0.1.
My computer has an IP address of 192.168.0.200. Computer runs Windows XP SP3 with LabVIEW 2009.
I can communicate manually with PuTTY just fine, so there's no connectivity issues. I just need help with the automation of interacting with the SSH session.
I've tried...
1) Using PuTTY tunneling to bring the SSH session to a Telnet session - I've had no luck with this. I'm not sure if it's possible, that is taking an SSH session and making it available via Telnet. I'm no expert on PuTTY so I welcome ideas or input.
2) Using ExtraPuTTY. This has been very unreliable. Examples found here on the forum (http://forums.ni.com/t5/LabVIEW/Send-Receive-Data-on-Telnet-SSH-protocol/m-p/1193669#M514954) haven't worked for me and consistenly crash LabVIEW upon running.
I'm open to...
Thanks for your help!
Justin
08-30-2010 05:40 PM
Hi Justin,
To start with, have you checked out this KB?
Aaron P
National Instruments
Applications Engineer
09-02-2010 08:37 AM
Yes, this is where I started. I have not been able to get PuTTY to do the tunneling in a manner I need. If someone thinks PuTTY can solve my problem and has a step-by-step guide to help me out, I'd love to get it.
Plink is not a viable solution because it doesn't appear to allow interaction with the remote system (only sending commands as part of script files - no ability to read/return information). Also, Plink appears to require you to log on with every transaction. The embedded system I'm talking to takes 10 seconds to show a command prompt after entering the username and password. So logging in for each command is not a workable solution either.
Justin
09-07-2010 11:32 AM
Bump...
Any additional thoughts?
09-07-2010 11:41 AM
@Justin Ogden wrote:
Bump...
Any additional thoughts?
http://www.tamirgal.com/blog/page/SharpSSH.aspx
Looks like there is a .NET Assembly for this. If your programing on a windows machine. I do not have an SSH server to try it with or I would have tried to deliver a small demo. Hope it works for you
09-07-2010 11:52 AM
Hi Justin,
I too work with embedded systems accessable only by SSH. Labivew has been a huge PITA when attempting to work with this. There are a few things we have done, not sure if any will work for you...
1. Plink (though you've already said no)
2. Use SCP to load a script onto the device and then plink to execute it
3. Change the firmware on the device to support either telnet or CGI commands
I had started a project to use python to maintain an SSH connection to the device and then use labview to telnet to the python script, but I didn't end up finishing this, as it was more cost effective to do option number 2 or 3.
I am very interested if anyone finds a good SSH solution to work with though...
10-15-2010 10:29 AM
If you really want or need for LV to handle SSH and/or SFTP then be sure to kudo this idea.