Establishes a connection to the Remote Host.

Namespace: Jscape.Telnet
Assembly: Jscape.Telnet (in Jscape.Telnet.dll) Version: 2.6.1.0

Syntax

C#
public void Connect(
	string hostname,
	string username
)
Visual Basic
Public Sub Connect ( _
	hostname As String, _
	username As String _
)
Visual C++
public:
void Connect(
	String^ hostname, 
	String^ username
)

Parameters

hostname
Type: System..::..String
The hostname or IP address of the Remote Host.
username
Type: System..::..String
The username for the Remote Host.

Remarks

Upon successful connection, creates an asynchronous thread to read incoming data from the socket connection.

Note: Some systems limit the username to eight (8) characters or less. The Telnet Factory for .NET implementation does not restrict the length of usernames. If you have difficulty logging in to a Remote Host using a non-truncated username, try using the username truncated to 8 characters.

Rlogin requires Remote Host authorization to execute the command. This is accomplished using a combination of two system files, hosts.equiv and .rhosts, depending on your system. For example, FreeBSD only requires the host/username entry in hosts.equiv, which is located in /etc by default. Consult your system documentation for more information about managing remote logins.

Examples

To establish a connection to a Remote Host, create an Rlogin instance and provide the required hostname and username.
CopyRlogin Connect
Rlogin rlogin = new Rlogin();
rlogin.Connect("remotehost.com", "username");

CopyRlogin Connect
Private WithEvents rlogin As Rlogin
rlogin = New Rlogin
rlogin.Connect("remotehost.com", "username")

See Also