Skip to content

SSH.Execute

Andrew Lambert edited this page Nov 26, 2022 · 4 revisions

SSH.Execute

Method signature

 Protected Function Execute(Optional Session As SSH.Session, Command As String) As SSH.SSHStream

Parameters

Name Type Comment
Session Session Optional. If specified, an active SSH session to use.
Command String The command to execute. If Session is not specified then the command is in URL format.

Return value

An object that implements the SSHStream interface, from which the command's output can be read.

Remarks

This convenience method executes the Command on the remote server. Commands may be given in URL format if the Session parameter is not provided, e.g. ssh://192.168.0.1:2222/command%20arg1%20arg2

The Channel returned from this method has its DataMode property set to ExtendedDataMode.Merge.

Clone this wiki locally