# keychaincredential.setup_ssh_connection

Creates an SSH Connection performing the following steps:

1. 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.

Type: object

##

Type: array
No Additional Items

#### Tuple Validation

##### Parameter 1: options

#### options

## One of

#### SetupSSHConnectionManual

Type: object
No Additional Properties

##

#### Private Key

## One of

#### KeychainCredentialSetupSSHConnectionKeyNew

Type: object
No Additional Properties

##

#### Generate Key

Type: const Default: true
Specific value: `true`

##

#### Name

Type: string

Must be at least `1` characters long

#### KeychainCredentialSetupSSHConnectionKeyExisting

Type: object
No Additional Properties

##

#### Generate Key

Type: const Default: false
Specific value: `false`

##

#### Existing Key Id

Type: integer

##

#### Connection Name

Type: string

Must be at least `1` characters long

##

#### Setup Type

Type: const Default: "MANUAL"
Specific value: `"MANUAL"`

##

#### SetupSSHConnectionManualSetup

Type: object
No Additional Properties

##

#### Host

Type: string

##

#### Port

Type: integer Default: 22

##

#### Username

Type: string Default: "root"

##

#### Remote Host Key

Type: string

Can be discovered with keychaincredential.remotesshhostkeyscan.

##

#### Connect Timeout

Type: integer Default: 10

#### SetupSSHConnectionSemiautomatic

Type: object
No Additional Properties

##

#### Private Key

## One of

#### KeychainCredentialSetupSSHConnectionKeyNew

Type: object
No Additional Properties

##

#### Generate Key

Type: const Default: true
Specific value: `true`

##

#### Name

Type: string

Must be at least `1` characters long

#### KeychainCredentialSetupSSHConnectionKeyExisting

Type: object
No Additional Properties

##

#### Generate Key

Type: const Default: false
Specific value: `false`

##

#### Existing Key Id

Type: integer

##

#### Connection Name

Type: string

Must be at least `1` characters long

##

#### Setup Type

Type: const Default: "SEMI-AUTOMATIC"
Specific value: `"SEMI-AUTOMATIC"`

##

#### KeychainCredentialSetupSSHConnectionSemiAutomaticSetup

Type: object
No Additional Properties

##

#### Url

Type: string Format: uri

Must be at least `1` characters long

Must be at most `2083` characters long

##

#### Verify Ssl

Type: boolean Default: true

##

#### Token

Default: null

## Any of

Type: string
Type: null

##

#### Admin Username

Type: string Default: "root"

##

#### Password

Default: null

## Any of

Type: string
Type: null

##

#### Otp Token

Default: null

## Any of

Type: string
Type: null

##

#### Username

Type: string Default: "root"

##

#### Connect Timeout

Type: integer Default: 10

##

#### Sudo

Type: boolean Default: false

##

#### SSHCredentialsEntry

Type: object
No Additional Properties

##

#### Id

Type: integer

##

#### Name

Type: string

Distinguishes this Keychain Credential from others.

Must be at least `1` characters long

##

#### Type

Type: const
Specific value: `"SSH_CREDENTIALS"`

##

#### Attributes

Type: object
No Additional Properties

##

#### Host

Type: string

##

#### Port

Type: integer Default: 22

##

#### Username

Type: string Default: "root"

##

#### Private Key

Type: integer

Keychain Credential ID.

##

#### Remote Host Key

Type: string

Can be discovered with keychaincredential.remotesshhostkeyscan.

##

#### Connect Timeout

Type: integer Default: 10

Required roles: KEYCHAIN_CREDENTIAL_WRITE