LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

SSH connection

Good evening,

 

I'm trying to connect to a device shell with a telnet or an SSH connection with a VI. The aim is to connect, send command to obtain the RAM and CPU usages of a process and save the shell output. All the data will be collected for monitoring the device and presented in a diagram. I have found the zip with ExtraPutty integration but I always receive the -604 error when i try to connect. I don't understand the cause. 

So someone has any idea, advice or solution?

 

 

I add the zip with the Putty vi integration. 

Message 1 of 4
(1,477 Views)

It's probably easier to create a PuTTY session then use the PuTTY scripting (through System Exec) to open the session, redirect output to stdout, run your commands, grab the results from System Exec stdout when the session closes and there you go.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
Message 2 of 4
(1,460 Views)

Hi billko,

 

Do you mean "plink.exe"?
I've tried to use LabVIEW to run the commands as well as Putty, but it has a lot of limitations, especially for the cases about interactive mode.

And I wonder if the SFTP API featured since LabVIEW 2021 is a solution for that?

https://forums.ni.com/t5/LabVIEW-2021-Public-Beta/New-Feature-SFTP-Secure-File-Transfer-Protocol-API...

 

0 Kudos
Message 3 of 4
(1,383 Views)

@William1225 wrote:

Hi billko,

 

Do you mean "plink.exe"?
I've tried to use LabVIEW to run the commands as well as Putty, but it has a lot of limitations, especially for the cases about interactive mode.

And I wonder if the SFTP API featured since LabVIEW 2021 is a solution for that?

https://forums.ni.com/t5/LabVIEW-2021-Public-Beta/New-Feature-SFTP-Secure-File-Transfer-Protocol-API...

 


Yes, plink.  Seemed like you just executed the same commands all the time.  It's not difficult to redirect the output to stdout instead of the screen.  Then when the session exits - provided it was called with system exec - you just collect the contents of stdout.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 4 of 4
(1,375 Views)