Hey,
I need to read a directory on a remote server which requires a user to be su.
The question is how to correctly read the server response and then to send a su password using IRIS device I/O API (I'm able to read other commands output such as uname, but can't figure out how to switch to su):
// Init SSH session
Set .Session = ##class(%Net.SSH.Session).%New()
Set status = .Session.Connect(.Server)
$$$ThrowOnError(status)
Set status = .Session.AuthenticateWithUsername(.UserName, .Password)
$$$ThrowOnError(status)
// SUDO
#Dim device
Set device = ""
Set status = .




