Control Method  
 

Send a control message to the server.

Syntax

object.Control( ControlCode )

Parameters

ControlCode
A numeric control code which specifies the control message which should be sent to the server. This may be one of the following values:
Value Constant Description
1 sshControlBreak Sends a control message to the server which simulates a break signal on a physical terminal. This is used by some operating systems as an instruction to enter a privileged configuration mode. Note that this is not the same as sending an interrupt character such as Ctrl+C to the server. This control code is ignored for SSH 1.0 sessions. This is the same as calling the Break method.
2 sshControlNoop Sends a control message to the server, but it does not perform any operation. This is typically used by clients to prevent the server from automatically closing a session that has been idle for a long period of time.
3 sshControlEof Sends a control message to the server indicating that the client has finished sending data. Note that this option is normally not used with interactive terminal sessions, and should only be used when required by the server.
4 sshControlPing Sends a control message to the server which is used to test whether or not the server is responsive to the client. This is typically used by clients to attempt to detect if the connection to the server is still active.
5 sshControlRekey Sends a control message to the server requesting that the key exchange be performed again. This control code is ignored for SSH 1.0 sessions.

Return Value

A value of zero is returned if the control code was sent successfully. Otherwise, a non-zero error code is returned which indicates the cause of the failure.

Remarks

The Control method enables an application to send control messages to the server, which can cause it to take specific actions such as simulate a terminal break or request that the key exchange be performed again. Some control messages are not supported by the SSH 1.0 protocol, in which case the control message is ignored.

See Also

Break Method, Cancel Method