Larry Pinsky · Mar 22, 2017

Unable to sFTP to vendor

We have many sFTP business operations that work successfully.  I just modified an existing one to point to a new IP and Port, as well as use new credentials (username and password only).  When I attempt to sFTP a file, I receive the following error.

ERROR <Ens>ErrFailureTimeout: FailureTimeout of 15 seconds exceeded in EnsLib.FTP.PassthroughOperation; status from last attempt was ERROR <Ens>ErrOutConnectFailed: SFTP Connect failed for PMP/SSL='!SFTP'/PubKey=''/PrivKey=''
with error ERROR #7500: SSH AuthenticateWithUsername Error '-2146430958': SSH Error [80101012]: Authentication failed (username/password) [FFFFFFFF80101012] at Session.cpp:277,0

I am able to use the supplied credentials to sFTP to the site using CoreFTP and sFTP'ing directly from the Unix prompt on the server.  I know the IP/Port/Username/Password are all correct.  Any idea what else could be causing this?  BTW, there are no firewall rules blocking connectivity to this site (all sFTP connections are open).

5 0 5 1,819
Log in or sign up to continue


Larry, you probably want to open up a WRC issue to address this. The first step will be to try to figure out if the problem is with Caché or with the operation specifically. To do so, you'll want to try to make this connection in a terminal. If any of these statuses are not successful, you should 'd $system.OBJ.DisplayError(<variable>)' and collect the local file you set up with the trace mask:

set ssh=##class(%Net.SSH.Session).%New()
do ssh.SetTraceMask(511,<newlocalfile>)
st1 = ssh.Connect("<SFTP HOST>","22")
st2 = ssh.AuthenticateWithUsername("<UserName>","<Password>")
st3 = ssh.OpenSFTP(.sftp)
st4 = sftp.Put("<local path and filename","<remote path and filename>")

There should be  another call to AuthenticateWithUsername should be before the Connect call (as well as after the Connect call)

Thank you Pete.  I did what you wrote above, but still get the error when I run s st2 = ssh.AuthenticateWithUsername.... I looked at the TraceMask file, but it means nothing to me.  I will go ahead and open a WRC ticket.  Thanks. 

Did this ever get resolved as I am having the same issue

I suggest following the same steps I suggested previously and opening an issue with the WRC.