I cannot post the server details but here is my test code:
try {
s url=""
s un=""
s pwd=""
s sc=##class(%Net.SSH.Session).TestExecute(url,un,pwd)
throw:($$$ISERR(sc)) ##class(%Exception.General).%New("Unable to TestExecute to "_url_", "_$system.Status.GetOneStatusText(sc))
w sc,!
s sftp=##class(%Net.SSH.Session).%New()
w "Connect to "_url,!
s sc=sftp.Connect(url,22)
throw:($$$ISERR(sc)) ##class(%Exception.General).%New("Unable to connect to FTP server "_url_", "_$system.Status.GetOneStatusText(sc))
w "Creating AuthenticateWithUsername "_un_" "_pwd,!
s sc=sftp.AuthenticateWithUsername(un,pwd)
throw:($$$ISERR(sc)) ##class(%Exception.General).%New("Unable to authenticate on FTP server "_url_" with "_un_" : "_pwd_", "_$system.Status.GetOneStatusText(sc))
w "OpenSFTP",!
s sc=sftp.OpenSFTP(.myssh)
throw:($$$ISERR(sc)) ##class(%Exception.General).%New("Unable to authenticate on FTP server "_url_" with "_un_" : "_pwd_", "_$system.Status.GetOneStatusText(sc))
s sc=myssh.Put("/ensemble/nicki/test.txt","test.txt")
throw:($$$ISERR(sc)) ##class(%Exception.General).%New("Unable to put file on FTP server, "_$system.Status.GetOneStatusText(sc))
w "file put",!
s sc=myssh.CloseSFTP()
throw:($$$ISERR(sc)) ##class(%Exception.General).%New("Unable to close SFTP connection, "_$system.Status.GetOneStatusText(sc))
s sc=sftp.Disconnect()
throw:($$$ISERR(sc)) ##class(%Exception.General).%New("Unable to close SSH session, "_$system.Status.GetOneStatusText(sc))
}catch(tException) {
w "exception caught in test ",!,tException.DisplayString(),!