06-30-2021 09:35 AM
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.
Solved! Go to Solution.
06-30-2021 09:53 AM
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
06-30-2021 01:29 PM
Which port are you connecting to? Is it possible to simply establish the TCP connection directly from LabVIEW and send your commands directly?
06-30-2021 02:51 PM
Use a VISA Resource. There is nothing PUTTY can do that VISA can't
06-30-2021 03:52 PM
@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?
06-30-2021 04:00 PM - edited 06-30-2021 04:04 PM
06-30-2021 04:26 PM
@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.
06-30-2021 05:11 PM
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.
06-30-2021 05:34 PM
@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
07-01-2021 04:57 AM
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.