The Connect method will initiate a connection between wodSSH
and a remote server. It can be used only if wodSSH is not
connected with a server at the time (in other words,
if State is set
to Disconnected).
If an error occurs during connection, a Connected event
will be fired with the ErrorCode set to
the error that occurred. If ErrorCode
is set to 0, wodSSH successfully connected with the remote
server.
Upon connection, wodSSH may perform an initial
'handshake' with the remote server, depending on
the protocol selected. For example, when using the Telnet protocol wodSSH
will negotiate connection parameters. For SSH protocols, it
will negotiate encryption algorithms and other properties
related to a secured connection.
After the handshake is completed, wodSSH may
automatically authenticate with the server, depending on whether the Login and Password properties
are set.
Optionally, if the Command property is
set, wodSSH will send the command, wait for an answer from the
server and disconnect automatically. If the Command property
is empty (default), wodSSH will open a shell on the remote server
and it will allow you to send/receive data.