Question
· Nov 6, 2023

Problem uploading files to specific directory of SFTP cache

There is test folder inside my sftp server. I executed the below lines of code

s ssh = ##class(%Net.SSH.Session).%New()

d ssh.Connect("host")

d ssh.AuthenticateWithUsername(username,password)

d ssh.OpenSFTP(.sftp)

s remote="\test\sample1.txt"

s local="c:\orders\sample1.txt"

s status=sftp.Put(local,remote)

I get the below error 

"MSSH Error [8010102B]: Unable to send FXP_OPEN* [8010102b] at SFTP.cpp:539,0Put,IM%e^zPut+2^%Net.SSH.SFTP.1^1e^^^0"

Product version: Caché 2016.1
Discussion (4)3
Log in or sign up to continue

I am using Solar Winds SFTP server to test which uses SSH2 protocol with authentication using username and password. Its able to connect and authenticate but not able to download and upload files.I am able to connect to below to it using FileZilla. I tested the below on cache 2018.1.7.721.0. I tried setting remote to below

s remote="sftp://test_user@127.0.0.1/test.txt

s local="c:/users/testuser/desktop/orders/test.txt". 

s ok=sftp.Get(remote,local)

and got the below error

 Access is denied.
 [80070005]QIMJ%e^zssherror+21^%Net.SSH.Session.1^1e^zGet+6^%Net.SSH.SFTP.1^1e^^^0

I am able to upload and download files using FileZila