keychaincredential.setup_ssh_connection¶
Creates an SSH Connection performing the following steps:
Generate SSH Key Pair if required 2) Set up SSH Credentials based on setup_type
In case (2) fails, it will be ensured that SSH Key Pair generated (if applicable) in the process is removed.
No Additional Items
Tuple Validation
Parameter 1: options
options
SSH connection setup configuration (manual or semi-automatic).
SetupSSHConnectionManual
Type: objectNo Additional Properties
Private Key
SSH private key configuration (new or existing).
KeychainCredentialSetupSSHConnectionKeyNew
Type: objectNo Additional Properties
Generate Key
Type: const Default: trueIndicates a new SSH key pair should be generated.
Must be one of:
- true
true
Name
Type: stringName for the new SSH key credential.
Must be at least 1
characters long
KeychainCredentialSetupSSHConnectionKeyExisting
Type: objectNo Additional Properties
Generate Key
Type: const Default: falseIndicates an existing SSH key should be used.
Must be one of:
- false
false
Existing Key Id
Type: integerID of the existing SSH private key credential to use.
Connection Name
Type: stringName for the SSH connection credential.
Must be at least 1
characters long
Setup Type
Type: const Default: "MANUAL"Setup method for the SSH connection.
Must be one of:
- "MANUAL"
"MANUAL"
SetupSSHConnectionManualSetup
Type: objectManual SSH connection configuration parameters.
No Additional PropertiesHost
Type: stringSSH server hostname or IP address.
Port
Type: integer Default: 22SSH server port number.
Username
Type: string Default: "root"SSH username for authentication.
Remote Host Key
Type: stringCan be discovered with keychaincredential.remotesshhostkeyscan.
Connect Timeout
Type: integer Default: 10Connection timeout in seconds for SSH connections.
SetupSSHConnectionSemiautomatic
Type: objectNo Additional Properties
Private Key
SSH private key configuration (new or existing).
KeychainCredentialSetupSSHConnectionKeyNew
Type: objectNo Additional Properties
Generate Key
Type: const Default: trueIndicates a new SSH key pair should be generated.
Must be one of:
- true
true
Name
Type: stringName for the new SSH key credential.
Must be at least 1
characters long
KeychainCredentialSetupSSHConnectionKeyExisting
Type: objectNo Additional Properties
Generate Key
Type: const Default: falseIndicates an existing SSH key should be used.
Must be one of:
- false
false
Existing Key Id
Type: integerID of the existing SSH private key credential to use.
Connection Name
Type: stringName for the SSH connection credential.
Must be at least 1
characters long
Setup Type
Type: const Default: "SEMI-AUTOMATIC"Setup method for the SSH connection.
Must be one of:
- "SEMI-AUTOMATIC"
"SEMI-AUTOMATIC"
KeychainCredentialSetupSSHConnectionSemiAutomaticSetup
Type: objectSemi-automatic SSH connection configuration parameters.
No Additional PropertiesUrl
Type: stringFormat: uriURL of the remote TrueNAS system for semi-automatic setup.
Must be at least 1
characters long
Must be at most 2083
characters long
Verify Ssl
Type: boolean Default: trueWhether to verify SSL certificates when connecting to the remote system.
Token
Default: nullAPI token for authentication with the remote system or null
.
Admin Username
Type: string Default: "root"Administrative username for the remote system.
Password
Default: nullPassword for the administrative user or null
.
Otp Token
Default: nullOne-time password token for 2FA authentication or null
.
Username
Type: string Default: "root"Username for the SSH connection.
Connect Timeout
Type: integer Default: 10SSH connection timeout in seconds.
Sudo
Type: boolean Default: falseWhether the SSH user should use sudo for elevated privileges.
SSHCredentialsEntry
Type: objectThe created SSH connection credential.
No Additional PropertiesId
Type: integerUnique identifier for this keychain credential.
Name
Type: stringDistinguishes this Keychain Credential from others.
Must be at least 1
characters long
Type
Type: constKeychain credential type identifier for SSH connection credentials.
Must be one of:
- "SSH_CREDENTIALS"
"SSH_CREDENTIALS"
Attributes
Type: objectSSH connection attributes including host, authentication, and connection settings.
No Additional PropertiesHost
Type: stringSSH server hostname or IP address.
Port
Type: integer Default: 22SSH server port number.
Username
Type: string Default: "root"SSH username for authentication.
Private Key
Type: integerKeychain Credential ID.
Remote Host Key
Type: stringCan be discovered with keychaincredential.remotesshhostkeyscan.
Connect Timeout
Type: integer Default: 10Connection timeout in seconds for SSH connections.
Required roles: KEYCHAIN_CREDENTIAL_WRITE