:Login() - establish a connection with the specified server and logs the specified user in
Class
Syntax
:Login(cHost, nPort, nTimeout, cUserName[, cTerminal]) --> hSession
Parameters
|
|
cHost |
The fully-qualified domain name or IP address of the Remote Host to connect to. |
|
|
nPort |
The port number the remote server is listening on.
|
|
|
nTimeout |
The number of seconds to wait for a response before failing the operation.
|
|
|
cUserName |
Character String that specifies the user name to be used to authenticate the current client session. |
|
|
cTerminal |
Optional: Specifies the terminal type.
|
Return
If the function succeeds, the return value is a numeric client session value which is stored in :Session.
If the function fails the return value is -1. To get further error information see :nErr and :cErr
Description
The Method establishes a connection with the specified server and logs the specified user in.
This Method depends on what is called host equivalence. With host equivalence, the remote server considers the client to be equivalent to itself, and as long as the specified user exists on the remote host, the client is permitted to login or execute commands on behalf of the user without requiring a password. Host equivalence is configured by the server administrator.
Note that if configured improperly, host equivalence can introduce a significant security loophole. Refer to your UNIX system documentation for more information about host equivalence and the use of the various remote commands.
See Also
:RemoteCommand(), :RemoteExecute()