ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Communication / SSH functions
  • Properties specific to sshSession variables
  • Authentication mode
  • Using sshSession variables
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
The sshSession type is used to define the characteristics of a connection to an SSH server. The characteristics of this connection can be defined using different WLanguage properties.
Note: For more details on the declaration of this type of variable and the use of WLanguage properties, see Declaring a variable.
Example
cMySession is sshSession
cMySession.Address = "127.0.0.1"
cMySession.Port = 22
cMySession.User = "login"
cMySession.UserPassword = "pass"
Properties

Properties specific to sshSession variables

The following properties can be used to define a connection to an SSH server:
Property nameType usedEffect
AddressCharacter stringAddress of the SSH server.
This address can be specified as follows:
  • IP address in XXX.XXX.XXX.XXX format (125.5.110.100 for example).
  • IP address containing the server name (e.g. SSHServer). This syntax is recommended.
ConnectionTimeoutInteger or DurationConnection timeout expressed in milliseconds (20 seconds by default, i.e. 20000 milliseconds). This property can correspond to:
  • an integer representing the number of milliseconds,
  • a Duration variable,
  • the duration in a readable format (e.g., 20 s or 20000 ms).
New in version 2025
KeepAliveInterval
Integer or DurationTime between requests sent to keep the connection alive and check that the SSH server is still responding. If the SSH server shuts down unexpectedly while a long command initiated by SSHCommand is being executed, the keep alive functionality can detect the loss of connection between the application and the server.
This property can correspond to:
  • an integer corresponding to the number of seconds,
  • a Duration variable,
  • the duration in a readable format (e.g., 20s or 20000 ms).
If this property is set to:
  • 0, the keep alive functionality will be disabled.
  • less than 2 seconds, the duration will be set to 2 seconds for technical reasons.
PortIntegerConnection port (22 by default).
PrivateKeyCharacter string or Certificate variableName of the Certificate variable to be used or OpenSSH key files (for a private key-based authentication).
If this property is set, authentication by key is performed: only the properties User, PrivateKey and PrivateKeyPassword are taken into account..
PrivateKeyPasswordCharacter string or Secret stringPassword of the key file (for a private-key based authentication). The PrivateKey property corresponds to the private key to be used.
New in version 2025
Secret strings: The secret string can be of one of the following types: Ansi string - Latin, Ansi or Unicode string, Unicode string..
To learn more about secret strings and how to use the vault, see Secret string vault.
UserCharacter stringUser name.
UserPasswordCharacter string or Secret stringUser password (the User property corresponds to the user's name).
New in version 2025
Secret strings: If you use the secret string vault, the type of secret string used for this parameter must be "Ansi or Unicode string".
To learn more about secret strings and how to use the vault, see Secret string vault.
Remarks

Authentication mode

Key-based authentication takes precedence over password-based authentication.
Key-based authentication is used if:
  • the server supports this authentication mode.
  • the PrivateKey property is specified.
Password-based authentication is used if:
  • the server supports this authentication mode.
  • property UserPassword is set.

Using sshSession variables

sshSession variables can be used with WLanguage functions:
Minimum version required
  • Version 20
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 11/23/2024

Send a report | Local help