LabVIEW 2021 Public Beta

cancel
Showing results for 
Search instead for 
Did you mean: 

[New Feature] SFTP (Secure File Transfer Protocol) API

(My apologies that I missed posting this with the initial round of New Feature posts).

 

Christina_R_0-1619797768204.png

The LabVIEW 2021 Beta includes a new palette for using SFTP.

 

The attached example shows SFTP upload/download with password and key-based authentication.

 

Debugging tip: in general, if you encounter problems, first ensure that ssh/plink work on the command line.

 

Known Issues
1. askpass is not implemented for OpenSSH in Windows (if you're using password authentication and don't specify a password, you won't be interactively prompted for one). It should work fine for Putty.
2. Due to issue 1, OpenSSH in Windows does not support specifying a password on the block diagram.
3. Recursive upload/download is not currently implemented.
4. There is not currently a high-level VI to run an SSH command.
5. askpass support on macos and Linux is experimental.

 

 

 


Christina Rogers
Principal Product Owner, LabVIEW R&D
Message 1 of 9
(7,118 Views)

One step closer to a native SSH client...


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 9
(7,111 Views)

@crossrulz wrote:

One step closer to a native SSH client...


SSH_FP.png

100% Pure G, born in LV2009, mostly up and running by LV2012.  Time spent implementing SCP and FISH seems a bit wasted these days, but at least my SFTP implementation is still useful.

 

The hard part is not the encryption/decryption voodoo, but rather creating a nice interactive console.  I have a kludge which is kind of nice and implements a lot of the pty codes, but I usually resort to a separate input control (ie. the command input above) and rely on server echo in the output.  Still, trying to color code the output is a real pain.

 

Message 3 of 9
(6,997 Views)

Can you post the Snippet of the example code so those of us without the Beta or 2021 can see the block diagram of the example?

Ryan Vallieu CLA, CLED
Senior Systems Analyst II
NASA Ames Research Center
0 Kudos
Message 4 of 9
(5,981 Views)

Here's the example from this thread:

SFTP_example_upload.png

 

And here's the example that ships with LabVIEW 2021:

SFTP_example_listdir_panel.pngSFTP_example_listdir.png


Christina Rogers
Principal Product Owner, LabVIEW R&D
Message 5 of 9
(5,967 Views)

Is this functionality also supported on Linux Desktop LabVIEW?

Ryan Vallieu CLA, CLED
Senior Systems Analyst II
NASA Ames Research Center
0 Kudos
Message 6 of 9
(5,961 Views)

@RVallieu wrote:

Is this functionality also supported on Linux Desktop LabVIEW?


Yes.


Christina Rogers
Principal Product Owner, LabVIEW R&D
0 Kudos
Message 7 of 9
(5,939 Views)

Does Labview2018 basic version support SFTP ?

0 Kudos
Message 8 of 9
(5,409 Views)

@ywxiao wrote:

Does Labview2018 basic version support SFTP ?


No, this is a LV21 feature.

 

OT:

 

Spoiler

You can probably use stunnel to tunnel FTP traffic to SFTP though (I did this for HTTP). There might be toolkits to get this done.

 

Of course you can consider using WebDAV instead. I'm not sure it's in LV18 basics, but it is in LV18.

 

0 Kudos
Message 9 of 9
(5,406 Views)