Discuss this help topic in SecureBlackbox Forum

TElSimpleSFTPClient.ExecuteSSHCommand

TElSimpleSFTPClient     See also     


Filter: C#  VB.NET  Pascal  C++  PHP  Java  


Executes an SSH command on the server.

Declaration

[C#]
    byte[] ExecuteSSHCommand(string Command);
    byte[] ExecuteSSHCommand(string Command, bool RedirectStdErr);
    byte[] ExecuteSSHCommand(string Command, ref byte[] StdErrData);

[VB.NET]
    Function ExecuteSSHCommand(ByVal Command As String) As Byte()
    Function ExecuteSSHCommand(ByVal Command As String, ByVal RedirectStdErr As Boolean) As Byte()
    Function ExecuteSSHCommand(ByVal Command As String, ByRef StdErrData As Byte()) As Byte()

[Pascal]
    function ExecuteSSHCommand(const Command : string) : ByteArray; overload;
    function ExecuteSSHCommand(const Command : string; RedirectStdErr : boolean) : ByteArray; overload;
    function ExecuteSSHCommand(const Command : string; var StdErrData : ByteArray) : ByteArray; overload;

[C++]
    void ExecuteSSHCommand(const std::string &Command, std::vector<uint8_t> &OutResult);
    void ExecuteSSHCommand(const std::string &Command, bool RedirectStdErr, std::vector<uint8_t> &OutResult);
    void ExecuteSSHCommand(const std::string &Command, std::vector<uint8_t> &StdErrData, std::vector<uint8_t> &OutResult);

[PHP]
    string ExecuteSSHCommand(string $Command)
    string ExecuteSSHCommand(string $Command, bool $RedirectStdErr)
    string ExecuteSSHCommand(string $Command, array of byte|string &$StdErrData)

[Java]
    byte[] executeSSHCommand(String Command);
    byte[] executeSSHCommand(String Command, boolean RedirectStdErr);
    byte[] executeSSHCommand(String Command, byte[][] StdErrData);

Parameters

  • Command - The command to be executed on the server.
  • RedirectStdErr - Set this parameter to True to redirect the output to StdErr.
  • StdErrData - The buffer where the StdErr output will be stored.

Return value

    Returns SSH command channel output data.

Description

    Use this method to execute an SSH command on the server. ElSimpleSFTPClient opens an SSH command channel, executes the command, and returns the output.

Discuss this help topic in SecureBlackbox Forum