LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

SFTP Error: The SFTP session has disconnected unexpectedly (Error code -5580899)

Hello,

I'm trying to connect to a SFTP server using LabVIEW (LV2023). I'm using the SFTP APIs included in the VI.lib.

I am sure that the SFTP server is working fine. I can successfully connect using FileZilla.

 

In LV, the Connect.vi returns the following error:

 

************************************

Code: -5580899

set "LVASKPASS_PATH=\\.\Pipe\LOCAL\lvsshpw.<my Windows user>"& set "SSH_ASKPASS=C:\Program Files\National Instruments\LabVIEW 2023\resource\lvaskpass.exe"& set "SSH_ASKPASS_REQUIRE=force"& set "DISPLAY=:0"& "ssh" -p 22 -o StrictHostKeyChecking=accept-new -s <SSH user>@<SSH server> sftp

************************************

NOTE 1: In the error description above, I have removed some information for privacy reasons. Removed data is included in the '<' and '>' brackets.

NOTE 2: connection is password-based.

 

 

sftp_error2.png

 

 

 

 

 

Can you help me?

 

 

 

 

0 Kudos
Message 1 of 6
(155 Views)

Try if you can use OpenSSH for Windows from Power Shell or Windows Terminal SSH

-------------------------------------------------------
Control Lead | Intelline Inc
0 Kudos
Message 2 of 6
(120 Views)

With OpenSSH in Windows Powershell, I receive this error:

 

"PTY allocation request failed on channel 0"

 

Any idea?

 

 

0 Kudos
Message 3 of 6
(101 Views)

Any suggestion? 😞

0 Kudos
Message 4 of 6
(74 Views)

From what I found for that error message, the server does not allow an interactive session. I guess that is required for password authentication from LabVIEW.

 

Does it work when you use sftp instead of ssh from the command line?

 

You can use key-based authentication instead of username/password. Here is an article how to set that up for a windows server: https://learn.microsoft.com/en-us/windows-server/administration/openssh/openssh_keymanagement

You basically generate a key pair and put the public key into a file on the server. We use that approach with cRIOs.

0 Kudos
Message 5 of 6
(68 Views)

I don't have any issues running SSH from PowerShell or CMD.

 

Perhaps you can try to search online.

I did a quick Google and found this. From ssh - How to fix request failed on channel 0 - Stack Overflow

The client is requesting a shell session with a TTY and the server is rejecting it. The server doesn't provide the client with a detailed reason why the request was rejected. You need to troubleshoot this on the server rather than the client.

 

 

-------------------------------------------------------
Control Lead | Intelline Inc
0 Kudos
Message 6 of 6
(64 Views)