ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Communication / SSH functions
  • Properties specific to sshSession variables
  • Authentication mode
  • Using sshSession variables
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
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.
Example
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 nameType usedEffect
AddressCharacter stringAddress 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.
ConnectionTimeoutInteger ou DurationConnection 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).
PortIntegerConnection port (22 by default).
PrivateKeyCharacter string or Certificate variableName 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.
PrivateKeyPasswordCharacter stringPassword of key file (for a connection by private key). The PrivateKey property corresponds to the private key to be used.
UserCharacter stringUser name.
UserPasswordCharacter stringUser'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:
Minimum version required
  • Version 20
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 01/26/2023

Send a report | Local help