SSH Connector
The SSH Component enables your MuleSoft to execute remote commands over SSH.
Remarks
The SSH Connector uses the SSH "exec" subsystem to remotely execute commands from your Mule Project.
SSH Send Connector
The SSH Send Connector provides an ultra light-weight remote command execution client for your Mule Project. You must first set an SSHHost. If the SSH server requires authentication, you should set the necessary SSHUser, and either SSHPassword or SSHCert depending on the SSHAuthMode you wish to use. Once the SSH server information is set, you must enter the Command you wish to execute.
Whenever called from the Mule Project, the connector will execute the given command. If the outbound message has any data, that data will supplied to the executing command's standard input.
Once the command has finished executing, the connector will write the output from the command's standard out pipe to the CommandStdOut property in the message context. It will also write the command's exit code to the CommandExitStatus property, and any data from the standard err pipe to the CommandErrorMessage property in the message context.
Send Example
Add an SSH Send connector to the body of your flow. Just as an example, say you would like to execute a script in the SSH user's home directory on the server. Configure the connection settings appropriately and set the Command property to:
sh script.sh
For the purposes of this example, lets say the contents of the script on the remote machine are as follows:
#!/bin/bash
echo "Hello from my script!"
The connector will write the standard output resulting from the Command to both the payload of the Mule Message and the CommandStdOut attribute. A logger which prints the message payload behind the SSH Connector in this case shows:
org.mule.runtime.core.internal.processor.LoggerMessageProcessor: Hello from my script!
Additional information about the command such as CommandExitStatus, CommandErrorMessage, and CommandStdErr are available in the attributes collection.
Sender Property List
The following is the full list of the properties of the sender Connector with short descriptions. Click on the links for further details.
Command | The command to be sent to the remote host. |
CommandErrorMessage | The error message, if any, returned by the server after command execution. |
CommandExitStatus | The exit code for the executed command for the current message. |
CommandSSHUser | The SSH user name used by the component when executing the command. |
CommandStdErr | The standard error output of the executed Command . |
CommandStdOut | The standard output of the executed Command . |
FailOnError | Controls how the component treats error codes returned by command execution. |
Firewall | A set of properties related to firewall access. |
LogFile | The file to write logging information to at runtime. |
LogMode | What information gets logged during component execution. |
LogType | How information gets logged during component execution. |
Other | Defines a set of configuration settings to be used by the component. |
PersistentConnection | Instructs the component whether to keep the connection to the server open. |
RuntimeLicense | Specifies the component runtime license key. |
SSHAcceptServerHostKey | Instructs the component to accept the server host key that matches the supplied key. |
SSHAuthMode | The type of authentication used by the component. |
SSHCert | The certificate to use for client authentication during the SSH handshake. |
SSHCompressionAlgorithms | A comma-separated list of compression algorithms allowed for this connection. |
SSHHost | The address of the SSH host. |
SSHPassword | The password for SSH password-based authentication. |
SSHPort | The port on the SSH server where the SSH service is running; by default, 22. |
SSHUser | The username for SSH authentication. |
Timeout | A timeout for the component. |
Config Settings
The following is a list of config settings for the Connector with short descriptions. Click on the links for further details.
KeyRenegotiationThreshold | Sets the threshold for the SSH Key Renegotiation. |
LogSSHPackets | If True, detailed SSH packet logging is performed. |
SSHAcceptServerHostKeyFingerPrint | Instructs the component to accept the server's host key with this fingerprint. |
SSHEncryptionAlgorithms | A comma-separated list containing all allowable compression algorithms. |
SSHKeyExchangeAlgorithms | Specifies the supported key exchange algorithms. |
SSHMacAlgorithms | Specifies the supported Mac algorithms. |
SSHPublicKeyAlgorithms | Specifies the supported public key algorithms for the server's public key. |
UseStrictKeyExchange | Specifies how strict key exchange is supported. |
AbsoluteTimeout | Determines whether timeouts are inactivity timeouts or absolute timeouts. |
LocalHost | The name of the local host or user-assigned IP interface through which connections are initiated or accepted. |
TcpNoDelay | Whether or not to delay when sending packets. |
UseInternalSecurityAPI | Tells the component whether or not to use the system security libraries or an internal implementation. |
Command Property (SSH Connector)
The command to be sent to the remote host.
Data Type
String
Default Value
""
Remarks
Assigning a UNIX command to this property makes the connector attempt to connect to the SSHHost and execute the command under the user's default shell. There is no need to append an end-of-line character to the command. All output from the remote application will be returned to the connector.
Note: the connector will terminate the connection once the remote application has finished executing.
CommandErrorMessage Property (SSH Connector)
The error message, if any, returned by the server after command execution.
Data Type
String
Default Value
""
Remarks
After executing the Command, the server will send a notification containing the CommandExitStatus. The server may also send a textual representation of that code, which will be stored in CommandErrorMessage.
This property is not available in the Receiver.
CommandExitStatus Property (SSH Connector)
The exit code for the executed command for the current message.
Data Type
Integer
Default Value
0
Remarks
After executing the Command, the server will send a notification containing the CommandExitStatus. The server may also send a textual representation of that code, which will be stored in CommandErrorMessage.
This property is not available in the Receiver.
CommandSSHUser Property (SSH Connector)
The SSH user name used by the component when executing the command.
Data Type
String
Default Value
""
Remarks
This value contains the SSHUser used by the connector to authenticate before executing the Command. It can be read from the context of a message being received by an connector receive location.
This property is not available in the Receiver.
CommandStdErr Property (SSH Connector)
The standard error output of the executed Command .
Data Type
String
Default Value
""
Remarks
This property will contain the standard error output of the Command once execution has completed.
This property is not available in the Receiver.
CommandStdOut Property (SSH Connector)
The standard output of the executed Command .
Data Type
String
Default Value
""
Remarks
This property will contain the standard output of the Command once execution has completed.
This property is not available in the Receiver.
FailOnError Property (SSH Connector)
Controls how the component treats error codes returned by command execution.
Data Type
Boolean
Default Value
true
Remarks
If set to True, FailOnError will cause the connector to stop processing the inbound data and raise an error if the SSHHost returns an unsuccessful error code when executing the Command.
If set to False, the connector will return all error information through the message context properties CommandExitStatus and CommandErrorMessage. Any standard output from the command's execution will be stored as usual in the message body.
Note: since FailOnError defaults to True, some improper command values may result in unexpected errors. In this case, it is useful to examine the standard output for any hints on proper command usage by setting FailOnError to false and writing the contents of the message to a file.
Firewall Property (SSH Connector)
A set of properties related to firewall access.
Data Type
FirewallRemarks
This is a Firewall type property which contains fields describing the firewall through which the connector will attempt to connect.
LogFile Property (SSH Connector)
The file to write logging information to at runtime.
Data Type
String
Default Value
""
Remarks
To write logging information to a file instead of using the connector's logging API, set this property to a valid file on disk and set the LogType property to "File".
LogMode Property (SSH Connector)
What information gets logged during component execution.
Data Type
Enumeration
Possible Values
Verbose (0)
Info (1)
Warning (2)
Error (3)
Fatal (4)
Default Value
3
Remarks
This property controls what information the connector logs. The possible values have the following affect on the connector's behavior:
Verbose | The connector will report all information regarding the transport. |
Info | The connector will report all major operations, as well as all warnings and errors. |
Warning | The connector will report any conditions that could result in unpredictable behavior as well as errors. |
Error | The connector will report all errors that prevent normal operations from completing. |
Fatal | The connector will report only serious errors that cause the connector to completely stop functioning. |
LogType Property (SSH Connector)
How information gets logged during component execution.
Data Type
Enumeration
Possible Values
None (0)
Console (1)
File (2)
Default Value
1
Remarks
This property controls where the connector will log the information. The possible values have the following affect on the connector's behavior:
None | The connector will not report any logging information. |
Console | The connector will report all logging information to the console. |
File | The connector will report all logging information to a file. The desired file must be specified in the LogFile when this type has been selected. |
Other Property (SSH Connector)
Defines a set of configuration settings to be used by the component.
Data Type
String
Default Value
""
Remarks
The connector accepts one or more configuration settings. Configuration settings are similar in functionality to properties, but they are rarely used. In order to avoid "polluting" the property namespace of the connector, access to these internal properties is provided through the Other property.
The Other property may be set to one or more configuration settings (name/value pairs). Set one setting per line.
For example:
configname1=value1
configname2=value2
PersistentConnection Property (SSH Connector)
Instructs the component whether to keep the connection to the server open.
Data Type
Boolean
Default Value
false
Remarks
If set to true, the connector will first attempt to use an existing connection. If no such connection exists, it will create a new connection. When the connector completes, it will persist the connection so that the connector will reuse it during the next polling interval. Setting this property to true can improve performance if you are polling very frequently.
RuntimeLicense Property (SSH Connector)
Specifies the component runtime license key.
Data Type
String
Default Value
""
Remarks
You can use the RuntimeLicense property to set the runtime key for the connector license.
SSHAcceptServerHostKey Property (SSH Connector)
Instructs the component to accept the server host key that matches the supplied key.
Data Type
CertificateRemarks
If the host key that will be used by the server is known in advance, this property may be set to accept the expected key. If you are using the fingerprint, you may supply it to the SSHAcceptServerHostKeyFingerPrint setting by HEX encoding the values in the form "0a:1b:2c:3d". If this property is not set the server will not be authenticated, and the connection will be refused by the client.
Note: You may also set the Accept Any field to Yes without opening the certificate selection dialog to force the adapter to unilaterally authenticate any server during the security handshake. It is strongly recommended that you use this only for testing purposes. Set the LogMode to Info to cause the connector to report the server's credentials to Location.
SSHAuthMode Property (SSH Connector)
The type of authentication used by the component.
Data Type
Enumeration
Possible Values
None (0)
Multi Factor (1)
Password (2)
Public Key (3)
Keyboard Interactive (4)
GSSAPIWith Mic (5)
Default Value
2
Remarks
SSHAuthMode controls how the connector attempts to authenticate when connecting to the SSHHost. The following authentication methods are available:
None | The connector will attempt anonymous authentication. |
Multi-Factor | The connector will attempt as many authentication steps as the server requires using whatever credentials it has available. |
Password | The connector will send the SSHPassword to the server. |
Public Key | The connector will send the SSHCert to the server; |
Keyboard-Interactive | The connector will perform SSH keyboard-interactive authentication, responding automatically to the server's authentication prompts. It will supply the value of SSHPassword as the response to the "password" prompt. Note: this method is not truly keyboard-interactive, and the connector may not recognize all prompts supplied by the server. It should be used only when the SSHHost cannot be configured to authenticate the SSHUser via more easily automated methods such as Password or Public Key. |
GSSAPIWithMic | This allows the connector to attempt Kerberos authentication using the GSSAPI-WITH-MIC scheme. The client will try Kerberos authentication using the value of SSHUser (single sign-on), or if SSHPassword is specified as well, it will try Kerberos authentication with alternate credentials. |
SSHCert Property (SSH Connector)
The certificate to use for client authentication during the SSH handshake.
Data Type
CertificateRemarks
This property is used to assign a specific certificate for SSH client authentication.
This field is used to set a Private Key Certificate.
Private key certificates may be loaded from the registry, from files in PKCS#12 format, or from a PEM file format.
SSHCompressionAlgorithms Property (SSH Connector)
A comma-separated list of compression algorithms allowed for this connection.
Data Type
String
Default Value
"none"
Remarks
This list is used for both directions: client to server and server to client. When negotiating algorithms, each side sends a list of all algorithms it supports or allows. The algorithm chosen for each direction is the first algorithm to appear in the sender's list that the receiver supports, so it is important to list multiple algorithms in preferential order. If no algorithm can be agreed upon, the connector will raise an error and the connection will be aborted.
SSHCompressionAlgorithms must be set to a comma-separated list containing at least one of the following values:
zlib | Zlib compression is allowed for this connection. |
none | No compression is allowed for this connection. |
SSHHost Property (SSH Connector)
The address of the SSH host.
Data Type
String
Default Value
""
Remarks
The SSHHost property specifies the IP address (IP number in dotted internet format) or Domain Name of the remote host. It is set before a connection is attempted and cannot be changed once a connection is established.
If the SSHHost property is set to a Domain Name, a DNS request is initiated, and upon successful termination of the request, the SSHHost property is set to the corresponding address. If the search is not successful, an error is logged.
SSHPassword Property (SSH Connector)
The password for SSH password-based authentication.
Data Type
Password
Default Value
""
Remarks
SSHPassword specifies the password which is used to authenticate the client to the SSH server.
SSHPort Property (SSH Connector)
The port on the SSH server where the SSH service is running; by default, 22.
Data Type
Integer
Default Value
22
Remarks
The SSHPort specifies a service port on the SSH host to connect to.
SSHUser Property (SSH Connector)
The username for SSH authentication.
Data Type
String
Default Value
""
Remarks
SSHUser specifies the username which is used to authenticate the client to the SSH server. This property is required.
Timeout Property (SSH Connector)
A timeout for the component.
Data Type
Integer
Default Value
60
Remarks
If the Timeout property is set to 0, all operations will run uninterrupted until successful completion, or an error condition is encountered.
If Timeout is set to a positive value, the connector will wait for the operation to complete before returning control.
If Timeout expires, and the operation is not yet complete, the connector fails with an error.
Please note that by default, all timeouts are inactivity timeouts, i.e. the timeout period is extended by Timeout seconds when data is successfully sent or received.
Optionally, the behavior of the connector may be changed to absolute timeouts, i.e. the connector will wait for a maximum of Timeout seconds since the beginning of the operation, without extending the timeout period during communications.
This behavior is controlled by the AbsoluteTimeout configuration setting.
The default value for the Timeout property is 60 (seconds).
Certificate Type
The digital certificate being used.
Remarks
This type describes the current digital certificate. The certificate may be a public or private key. The fields are used to identify or select certificates.
Fields
Store
String
Default Value: "MY"
The name of the certificate store for the client certificate.
The StoreType field specifies the type of the certificate store specified by Store. If the store is password protected, specify the password in StorePassword.
Store is used in conjunction with the Subject field in order to specify client certificates. If Store has a value, and Subject is set, a search for a certificate is initiated. Please refer to the Subject field for details.
Designations of certificate stores are platform-dependent.
The following are designations of the most common User and Machine certificate stores in Windows:
MY | A certificate store holding personal certificates with their associated private keys. |
CA | Certifying authority certificates. |
ROOT | Root certificates. |
SPC | Software publisher certificates. |
In Java, the certificate store normally is a file containing certificates and optional private keys.
When the certificate store type is PFXFile, this property must be set to the name of the file. When the type is PFXBlob, the property must be set to the binary contents of a PFX file (i.e. PKCS12 certificate store).
If the provider is OpenSSL, the certificate store is a file containing a certificate and a private key. This property must be set to the name of the file.
StorePassword
String
Default Value: ""
If the certificate store is of a type that requires a password, this property is used to specify that password in order to open the certificate store.
StoreType
CertStoreTypes
Default Value: 0
The type of certificate store for this certificate.
The connector supports both public and private keys in a variety of formats. When the cstAuto value is used, the connector will automatically determine the type. This field can take one of the following values:
0 (cstUser - default) | For Windows, this specifies that the certificate store is a certificate store owned by the current user.
Note: This store type is not available in Java. |
1 (cstMachine) | For Windows, this specifies that the certificate store is a machine store.
Note: This store type is not available in Java. |
2 (cstPFXFile) | The certificate store is the name of a PFX (PKCS#12) file containing certificates. |
3 (cstPFXBlob) | The certificate store is a string (binary or Base64-encoded) representing a certificate store in PFX (PKCS#12) format. |
4 (cstJKSFile) | The certificate store is the name of a Java Key Store (JKS) file containing certificates.
Note: This store type is only available in Java. |
5 (cstJKSBlob) | The certificate store is a string (binary or Base64-encoded) representing a certificate store in Java Key Store (JKS) format.
Note: this store type is only available in Java. |
6 (cstPEMKeyFile) | The certificate store is the name of a PEM-encoded file that contains a private key and an optional certificate. |
7 (cstPEMKeyBlob) | The certificate store is a string (binary or Base64-encoded) that contains a private key and an optional certificate. |
8 (cstPublicKeyFile) | The certificate store is the name of a file that contains a PEM- or DER-encoded public key certificate. |
9 (cstPublicKeyBlob) | The certificate store is a string (binary or Base64-encoded) that contains a PEM- or DER-encoded public key certificate. |
10 (cstSSHPublicKeyBlob) | The certificate store is a string (binary or Base64-encoded) that contains an SSH-style public key. |
11 (cstP7BFile) | The certificate store is the name of a PKCS#7 file containing certificates. |
12 (cstP7BBlob) | The certificate store is a string (binary) representing a certificate store in PKCS#7 format. |
13 (cstSSHPublicKeyFile) | The certificate store is the name of a file that contains an SSH-style public key. |
14 (cstPPKFile) | The certificate store is the name of a file that contains a PPK (PuTTY Private Key). |
15 (cstPPKBlob) | The certificate store is a string (binary) that contains a PPK (PuTTY Private Key). |
16 (cstXMLFile) | The certificate store is the name of a file that contains a certificate in XML format. |
17 (cstXMLBlob) | The certificate store is a string that contains a certificate in XML format. |
18 (cstJWKFile) | The certificate store is the name of a file that contains a JWK (JSON Web Key). |
19 (cstJWKBlob) | The certificate store is a string that contains a JWK (JSON Web Key). |
21 (cstBCFKSFile) | The certificate store is the name of a file that contains a BCFKS (Bouncy Castle FIPS Key Store).
Note: This store type is only available in Java and .NET. |
22 (cstBCFKSBlob) | The certificate store is a string (binary or Base64-encoded) representing a certificate store in BCFKS (Bouncy Castle FIPS Key Store) format.
Note: This store type is only available in Java and .NET. |
23 (cstPKCS11) | The certificate is present on a physical security key accessible via a PKCS#11 interface.
To use a security key, the necessary data must first be collected using the CERTMGR connector. The ListStoreCertificates method may be called after setting CertStoreType to cstPKCS11, CertStorePassword to the PIN, and CertStore to the full path of the PKCS#11 DLL. The certificate information returned in the CertList event's CertEncoded parameter may be saved for later use. When using a certificate, pass the previously saved security key information as the Store and set StorePassword to the PIN. Code Example. SSH Authentication with Security Key:
|
99 (cstAuto) | The store type is automatically detected from the input data. This setting may be used with both public and private keys and can detect any of the supported formats automatically. |
Subject
String
Default Value: ""
The subject of the certificate used for client authentication.
When this property is set, a search is performed in the current certificate store certificate with matching subject.
If an exact match is not found, the store is searched for subjects containing the value of the property.
When setting the property to a partial subject, CN= should be omitted. For example, the following code would find the certificate with subject CN=Test Certificate, OU=People, C=US
Example (Searching with partial subject)
Control.CertSubject = "Test"
If a match is not found, the property is set to an empty string, and no certificate is selected.
The special value "*" picks a random certificate in the certificate store.
If a matching certificate is found, Subject is set to the full subject of the matching certificate.
Thumbprint
String (read-only)
Default Value: ""
The thumbprint of the certificate.
This field is used to specify the thumbprint of the certificate. When there are multiple certificates in the store that have the same subject, the thumbprint will be used to distinguish between them.
Firewall Type
The firewall the component will connect through.
Remarks
When connecting through a firewall, this type is used to specify different properties of the firewall such as the firewall Host and the FirewallType.
Fields
AutoDetect
Boolean
Default Value: False
Tells the connector whether or not to automatically detect and use firewall system settings, if available.
FirewallType
FirewallTypes
Default Value: 0
Determines the type of firewall to connect through. The applicable values are the following:
Host
String
Default Value: ""
Name or IP address of firewall (optional). If a Host is given, requested connections will be authenticated through the specified firewall when connecting.
If the Host field is set to a Domain Name, a DNS request is initiated. Upon successful termination of the request, the Host field is set to the corresponding address. If the search is not successful, an error is returned.
Password
String
Default Value: ""
A password if authentication is to be used when connecting through the firewall. If Host is specified, the User and Password fields are used to connect and authenticate to the given firewall. If the authentication fails, a trappable error is fired.
Port
Integer
Default Value: 0
The TCP port for the firewall Host. See the description of the Host field for details.
Note that the Port is set automatically when FirewallType is set to a valid value. See the description of the FirewallType field for details.
User
String
Default Value: ""
A user name if authentication is to be used connecting through a firewall. If the Host is specified, the User and Password fields are used to connect and authenticate to the given Firewall. If the authentication fails, a trappable error is fired.
Config Settings (SSH Connector)
The connector accepts one or more of the following configuration settings. Configuration settings are similar in functionality to properties, but they are rarely used. In order to avoid "polluting" the property namespace of the connector, access to these internal properties is provided through the Other property.SSH Config Settings
Example (for setting the threshold to 500 MB):
SSHComponent.Config("KeyRenegotiationThreshold=524288000")
SSHAcceptServerHostKeyFingerprint=0a:1b:2c:3d
At least one supported algorithm must appear in this list. The following encryption algorithms are supported by the component:
aes256-cbc | 256-bit AES encryption in CBC mode |
aes192-cbc | 192-bit AES encryption in CBC mode |
aes128-cbc | 128-bit AES encryption in CBC mode |
3des-cbc | 192-bit (3-key) triple DES encryption in CBC mode |
aes256-ctr | 256-bit AES encryption in CTR mode |
aes192-ctr | 192-bit AES encryption in CTR mode |
aes128-ctr | 128-bit AES encryption in CTR mode |
3des-ctr | 192-bit (3-key) triple DES encryption in CTR mode |
cast128-cbc | CAST-128 encryption |
blowfish-cbc | Blowfish encryption |
arcfour | ARC4 encryption |
arcfour128 | 128-bit ARC4 encryption |
arcfour256 | 256-bit ARC4 encryption |
aes256-gcm@openssh.com | 256-bit AES encryption in GCM mode. |
aes128-gcm@openssh.com | 128-bit AES encryption in GCM mode. |
The default value is "aes256-ctr,aes192-ctr,aes128-ctr,aes256-cbc,aes192-cbc,aes128-cbc,3des-ctr,3des-cbc,blowfish-cbc,arcfour256,arcfour128,arcfour,cast128-cbc,aes256-gcm@openssh.com,aes128-gcm@openssh.com".
- curve25519-sha256
- curve25519-sha256@libssh.org
- diffie-hellman-group1-sha1
- diffie-hellman-group14-sha1
- diffie-hellman-group14-sha256
- diffie-hellman-group16-sha512
- diffie-hellman-group18-sha512
- diffie-hellman-group-exchange-sha256
- diffie-hellman-group-exchange-sha1
- ecdh-sha2-nistp256
- ecdh-sha2-nistp384
- ecdh-sha2-nistp521
- gss-group14-sha256-toWM5Slw5Ew8Mqkay+al2g==
- gss-group16-sha512-toWM5Slw5Ew8Mqkay+al2g==
- gss-nistp256-sha256-toWM5Slw5Ew8Mqkay+al2g==
- gss-curve25519-sha256-toWM5Slw5Ew8Mqkay+al2g==
- gss-group14-sha1-toWM5Slw5Ew8Mqkay+al2g==
- gss-gex-sha1-toWM5Slw5Ew8Mqkay+al2g==
- hmac-sha1
- hmac-md5
- hmac-sha1-96
- hmac-md5-96
- hmac-sha2-256
- hmac-sha2-256-96
- hmac-sha2-512
- hmac-sha2-512-96
- hmac-ripemd160
- hmac-ripemd160-96
- hmac-sha2-256-etm@openssh.com
- hmac-sha2-512-etm@openssh.com
- umac-64@openssh.com
- umac-64-etm@openssh.com
- umac-128@openssh.com
- umac-128-etm@openssh.com
This setting specifies a list of signature algorithms that may be used when authenticating to the server using public key authentication. This applies only when public key authentication is performed by the client.
The setting should be a comma separated list of algorithms. At runtime the connector will evaluate the specified algorithms and if the algorithm is applicable to the certificate specified in SSHCert it will be used. If the algorithm is not applicable the connector will evaluate the next algorithm. Possible values are:
- ssh-rsa
- rsa-sha2-256
- rsa-sha2-512
- ssh-dss
- ecdsa-sha2-nistp256
- ecdsa-sha2-nistp384
- ecdsa-sha2-nistp521
- ssh-ed25519
- x509v3-sign-rsa
- x509v3-sign-dss
The default value in Windows is ssh-rsa,rsa-sha2-256,rsa-sha2-512,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-ed25519.
rsa-sha2-256 and rsa-sha2-512 notes
The connector will query the server for supported algorithms when connecting. If the server indicates support for rsa-sha2-256 or rsa-sha2-512 and the algorithm is present in the list defined by this setting (as in the default value), that algorithm will be used instead of ssh-rsa even when ssh-rsa appears first in the list.
For the rsa-sha2-256 and rsa-sha2-512 algorithms to be automatically preferred the server must support the ext-info-c mechanism. In practice, older servers do not support this and in that case ssh-rsa will be used since it appears first in the list. Newer servers do support this mechanism and in that case rsa-sha2-256 or rsa-sha2-512 will be used even though it appears after ssh-rsa.
This behavior has been carefully designed to provide maximum compatibility while automatically using more secure algorithms when connecting to servers which support them.
Since both client and server must implement strict key exchange to effectively mitigate the Terrapin attack, the connector provides options to further control the behavior in different scenarios. Possible values for this setting are:
0 | Disabled. Strict key exchange is not supported in the connector. |
1 (default) | Enabled, but not enforced. This setting enables strict key exchange, but if the remote host does not support strict key exchange the connection is still allowed to continue. |
2 | Enabled, but reject affected algorithms if the remote host does not support strict key exchange. If the remote host supports strict key exchange all algorithms may be used. If the remote host does not support strict key exchange the connection will only continue if the selected encryption and MAC algorithms are not affected by the Terrapin attack. |
3 | Required. If the remote host does not support strict key exchange the connection will fail. |
General Config Settings
In multihomed hosts (machines with more than one IP interface) setting LocalHost to the value of an interface will make the connector initiate connections (or accept in the case of server connectors) only through that interface.
If the connector is connected, the LocalHost configuration shows the IP address of the interface through which the connection is made in internet dotted format (aaa.bbb.ccc.ddd). In most cases, this is the address of the local host, except for multihomed hosts (machines with more than one IP interface).
By default, this config is set to false.
Setting this configuration setting to True tells the connector to use the internal implementation instead of using the system security libraries.
This setting is set to False by default on all platforms.