SFTP connect
Hello,
I'm trying to upload file to SFTP server.
I have access to SFTP server .
My code is bellow
Set sftp = ##class(%Net.SSH.Session).%New()
Set sc = sftp.AuthenticateWithUsername(username,password)
if 'sftp.Connect(host){
Set status = $$$ERROR($$$GeneralError,"Cannot connect to sftp ")
Quit
}
Set sc = sftp.OpenSFTP(.t)
}
Set status=$$$ERROR($$$GeneralError,$ZE)
Quit
}
The output : $lb(5001,"Cannot connect to sftp "
What i'm doing wrong ?