02-20-2015 10:13 AM
Hi all CSLUGers,
I am looking for a way to interactively communicate with a remote system using SSH.
I currently have something like this. (Thanks to Steve's VPN presentation for the example)
This does the job well for one or two commands, but as it creates a new session everytime, is a bit slow. It also does not allow me to do certain tasks.
I am looking for a way to open an SSH session, using a reference to that session communicate with it, and then close the session when complete. There are some applications that I need to run on the remote system which needs interaction and the session to remain open.
Does anyone know if this can be done, ideally without having to write a C# dll?
Thanks,
Greg
02-20-2015 10:18 AM
Have you looked at
https://labwerx.net/products/labssh/purchase/
notice I linked you the price page.
Steve
Opportunity to learn from experienced developers / entrepeneurs (Fab,Joerg and Brian amongst them):
DSH Pragmatic Software Development Workshop
02-20-2015 10:22 AM
If you fancy playing with .Net
Steve
Opportunity to learn from experienced developers / entrepeneurs (Fab,Joerg and Brian amongst them):
DSH Pragmatic Software Development Workshop
02-20-2015 10:23 AM
Thanks Steve,
I did come accross that. Will give a try and see.
02-20-2015 10:27 AM
I was playing with that last night.
I got it to work in one method, but my lack of .Net knowledge clearly showed when I tried to separate Connect, Execute and Disconnect into separate methods.
I will brave another go as it must be able to be done. Apparently labwerx is just a dll.
02-20-2015 10:34 AM
I'd like to crack the .Net one too, add it to the list after opendoc stuff
Steve
Opportunity to learn from experienced developers / entrepeneurs (Fab,Joerg and Brian amongst them):
DSH Pragmatic Software Development Workshop
02-20-2015 01:05 PM
For anyone that is interested, here is a quick and nasty .net application using ssh.net that sort of works.
It connects, sends commands and disconnects. For some reason I can't change directory, but that is a problem for next week.
https://drive.google.com/file/d/0ByzG2Ps_dpjcdU5IUzdDYnp1dWM/view?usp=sharing
Be warned that I am not a .net programmer so when I say this is nasty code, it is!!!!
02-22-2015 06:38 AM
So after a few hours of bashing my head against the C# wall, I have a working C# and LabVIEW application, still needs to be cleaned up though.
If anyone is interested, I'd be happy could do a quick presentation at CSLUG about it.
02-22-2015 02:32 PM
Very interested indeed matey, I'll pop it on the discussion for May.
Steve
Opportunity to learn from experienced developers / entrepeneurs (Fab,Joerg and Brian amongst them):
DSH Pragmatic Software Development Workshop
02-23-2015 04:17 AM
Nice one Greg. I got asked by a customer recently about communicating with a Linux device via SSH through Teststand. I did a little bit of prototyping and got some responses from one of our Linux based cRIO's, but haven't yet had a chance to take it any further.
Hopefully I'll be doing more work with this customer soon so might have some more ideas on it for when you present - or if that hasn't happened yet I'll be listening carefully for all the potential pitfalls
Cheers