LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Command PUTTY without user intervention

Solved!
Go to solution

Hello everyone,

In a project I want to create a VI witch can send a command via PUTTY.

 

For that I think I need to :

 - Open a putty window (done)

 - Write a simple command, like O2E (because of a code than I download, putty will understand it)

 - And finally, close the putty windows to be ready for the next command

 

If you have any idea or link which can help me, please share them.

It is realy simple but i add my LabVIEW code.

 

Have a nice day and thanks for your time

Vincent.

0 Kudos
Message 1 of 20
(4,140 Views)

Your Putty install should come with a command line interface (plink.exe).  Use System Exec in LabVIEW to pass commands to the Putty interface and read the results.  System Exec command line input will be something like this:

 

cmd /c plink.exe -ssh -batch -pw yourPassword yourUsername@yourIPorMachineName date

 

Specify the working directory input as the directory that plink.exe is located in.  The -batch option will allow bypassing of user prompts automatically.  If the command works that standard output should return the system date, assuming this is a Linux RT target.

 

PLink doc:

https://the.earth.li/~sgtatham/putty/0.75/htmldoc/Chapter7.html#plink

Message 2 of 20
(4,134 Views)

Which port are you connecting to? Is it possible to simply establish the TCP connection directly from LabVIEW and send your commands directly?



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 3 of 20
(4,087 Views)

Use a VISA Resource.  There is nothing PUTTY can do that VISA can't 


"Should be" isn't "Is" -Jay
0 Kudos
Message 4 of 20
(4,076 Views)

@JÞB wrote:

Use a VISA Resource.  There is nothing PUTTY can do that VISA can't 


I'm curious.  How would you do SSH on VISA?

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 5 of 20
(4,072 Views)

@billko wrote:

@JÞB wrote:

Use a VISA Resource.  There is nothing PUTTY can do that VISA can't 


I'm curious.  How would you do SSH on VISA?


Directed specific to SSH Maybe wrong.

Putty doesn't afaik

A tcp/ip raw socket can I thought


"Should be" isn't "Is" -Jay
0 Kudos
Message 6 of 20
(4,067 Views)

@JÞB wrote:

@billko wrote:

@JÞB wrote:

Use a VISA Resource.  There is nothing PUTTY can do that VISA can't 


I'm curious.  How would you do SSH on VISA?


Directed specific to SSH Maybe wrong.

Putty doesn't afaik

A tcp/ip raw socket can I thought


I'm asking because I have a bunch of plink commands that I would love to change over to native LV code.

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 7 of 20
(4,043 Views)

LabVIEW 2020 should support ssh, at least using the TCP primitives. The other alternative would be to use stunnel along with the native TCP primitive.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 8 of 20
(4,025 Views)

@billko wrote:

@JÞB wrote:

@billko wrote:

@JÞB wrote:

Use a VISA Resource.  There is nothing PUTTY can do that VISA can't 


I'm curious.  How would you do SSH on VISA?


Directed specific to SSH Maybe wrong.

Putty doesn't afaik

A tcp/ip raw socket can I thought


I'm asking because I have a bunch of plink commands that I would love to change over to native LV code.


You could start that thread


"Should be" isn't "Is" -Jay
0 Kudos
Message 9 of 20
(4,020 Views)

Use PUTTY is a must in my project.

The code is for an amplifier specially made for us and the engineer who made it told us to use PUTTY.

 

Thank for your subjection.

0 Kudos
Message 10 of 20
(3,965 Views)