Sends a command to an SSH server. The session is automatically started and closed as soon as the command is sent.
cMySession is sshSession
cMySession.Address = "127.0.0.1"
cMySession.Port = 22
cMySession.User = "login"
cMySession.UserPassword = "pass"
nExitCode is int
sOutput is ANSI string
sOutputErr is ANSI string
(nExitCode, sOutput, sOutputErr) = SSHCommand(cMySession, EDT_Command)
IF ErrorOccurred THEN
EDT_ExitCode = nExitCode
EDT_StdOut = UTF8ToString(sOutput)
EDT_StdErr = UTF8ToString(sOutputErr)
(<Result>, <Data received>, <Data if error>) = SSHCommand(<SSH session> , <Command> [, <Data to send>])
Exit code of the command.
<Data received>: Buffer
Data received from the server.
<Data if error>: Buffer
Data received from the server if an error occurs.
<SSH session>: sshSession variable
Name of sshSession variable corresponding to the SSH session on which the command must be run.
<Command>: Character string
Command that must be sent to the SSH server.
<Data to send>: Optional buffer
Data that must be sent to the server.
Business / UI classification: Business Logic