|
Events |
|
Methods |
|
Properties |
|
ExecCommand
Sub ExecCommand (Host As String, Port As
Integer, Login As String, Password As String, Command As String) As
SSHERROR |
This is the main function of the MySSH component. It authorizes on the remote
host, executes the given command and return the error code of the operation.
This is not the return code of the executed program. If not error
happened the return value is SSHERR_NO_ERRORS. The output of the remote
command is stored in the Result property of the
component.
If KeyFile is specified, MySCP will try to authorize using this public key.
As a passphrase for the key it will use given Password. If authorization with
key will fail, it will try to authorize using usual login/password scheme.
|