Back to product page

Command property


Command to be executed immediately after successful connection.

Type

String. Specifies command that will be executed once wodSSH.NET connects to the server, instead of the shell.

Syntax

  • C#
  • VB.NET
String Command {get; set; };

Property Command As String

Remarks

If Command property is set, then wodSSH.NET will execute specified command instead of obtaining shell on the server. After the command is executed and results are returned (and provided through DataReceived event), connection with the server will be closed. This property is very useful if you need to execute specific command and logout, because it will handle all the work for you.

Note that when you set this property, wodSSH.NET will internally also set AllocatePty to False.

Platforms

Windows