我正在尝试通过 VB.NET 从命令中获取结果,它返回空字符串,如下面的代码所示:
Dim connInfo As New Renci.SshNet.PasswordConnectionInfo(serverip, user, pass)
Dim sshClient As New Renci.SshNet.SshClient(connInfo)
Dim cmd As Renci.SshNet.SshCommand
Using sshClient
sshClient.Connect()
cmd = sshClient.RunCommand("opmnctl status -l")
MsgBox(cmd.Result)
sshClient.Disconnect()
End Using
当我尝试使用普通命令时,"ls -ltr"
它会成功返回结果。
还有另一种获取结果字符串的方法吗?或者opmnctl
Renci 不支持 OPMN Oracle 引擎的命令?任何帮助,将不胜感激。