|
|
|
|
- Properties specific to sshSession variables
- Authentication mode
- Using sshSession variables
sshSession (Type of variable) In french: sshSession
The sshSession type is used to define the characteristics of a connection to an SSH server. The characteristics of this connection are described by several WLanguage properties. Remark: For more details on the declaration of this type of variable and the use of WLanguage properties, see Declaring a variable.
cMySession is sshSession cMySession.Address = "127.0.0.1" cMySession.Port = 22 cMySession.User = "login" cMySession.UserPassword = "pass"
Remarks Properties specific to sshSession variables The following properties can be used to define a connection to an SSH server: | | | Property name | Type used | Effect |
---|
Address | Character string | Address of SSH server. This address can be given in the following format: - IP address in XXX.XXX.XXX.XXX format (125.5.110.100 for example).
- IP address containing the server name (SSHServer for example). This syntax is recommended.
| ConnectionTimeout | Integer ou Duration | Connection timeout expressed in milliseconds (20 seconds by default, which means 20000 milliseconds). This property can correspond to: - an integer corresponding to the number of milliseconds,
- a Duration variable,
- the duration in a readable format (e.g., 20 s or 20000 ms).
| Port | Integer | Connection port (22 by default). | PrivateKey | Character string or Certificate variable | Name of the variable of type Certificate to be used or key files in OpenSSH format (for a connection by private key). If this property is specified, an authentication by key is performed: only the User, PrivateKey and PrivateKeyPassword properties are taken into account. | PrivateKeyPassword | Character string | Password of key file (for a connection by private key). The PrivateKey property corresponds to the private key to be used. | User | Character string | User name. | UserPassword | Character string | User's password used in password authentication (the User property is the user's name). |
Authentication mode The authentication by key has priority over the authentication by password. Key authentication is used if: - the server supports this authentication mode.
- the PrivateKey property is specified.
Password authentication is used if: - the server supports this authentication mode.
- the UserPassword is specified.
Using sshSession variables sshSession variables can be used in WLanguage functions: - standard syntax:
| | SSHCommand | Sends a command to an SSH server. The session is automatically started and closed as soon as the command is sent. | SSHConnectShell | Starts a new SSH session of "Shell" type. | SSHDisconnectShell | Closes an SSH session that was opened by SSHConnectShell. | SSHRead | Reads the data found on the output buffer of the SSH session. | SSHWrite | Writes data into the specified SSH session. |
- prefix syntax:
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|