---
sidebar_position: 7
description: Get settings (private key) and other functions to work with SSH in the Open Integration Package, a free open-source integration library for 1C:Enterprise 8, OneScript and CLI
keywords: [1C, 1С, 1С:Enterprise, 1С:Enterprise 8.3, API, Integration, Services, Exchange, OneScript, CLI, SSH]
---

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

# Get settings (private key)
 Gets connection settings with private key authentication



`Function GetSettingsPrivateKey(Val Host, Val Port, Val Login, Val Private, Val Public = "", Val Password = "") Export`

  | Parameter | CLI option | Type | Required | Description |
  |-|-|-|-|-|
  | Host | --host | String | &#x2714; | SSH host |
  | Port | --port | Number | &#x2714; | SSH port |
  | Login | --user | String | &#x2714; | SSH username |
  | Private | --key | String | &#x2714; | Path to private key file |
  | Public | --pub | String | &#x2716; | Path to public key file |
  | Password | --pass | String | &#x2716; | Private key password (passphrase) |

  
  Returns:  Structure Of KeyAndValue - Connection configuration



```bsl title="1C:Enterprise/OneScript code example"
    Host       = "172.33.0.13";
    Port       = "2222";
    Login      = "bayselonarrend";
    PrivateKey = "./ssh_key";
    PublicKey  = "./ssh_key.pub";

    Result = OPI_SSH.GetSettingsPrivateKey(Host, Port, Login, PrivateKey, PublicKey);
```
 

 <Tabs>
  
    <TabItem value="bash" label="Bash" default>
        ```bash
            oint ssh GetSettingsPrivateKey \
             --host "172.33.0.13" \
             --port "2222" \
             --user "bayselonarrend" \
             --key "***" \
             --pub "https://hut.openintegrations.dev/test_data/ssh_key.pub"
        ```
    </TabItem>
  
    <TabItem value="bat" label="CMD/Bat" default>
        ```batch
            oint ssh GetSettingsPrivateKey ^
             --host "172.33.0.13" ^
             --port "2222" ^
             --user "bayselonarrend" ^
             --key "***" ^
             --pub "https://hut.openintegrations.dev/test_data/ssh_key.pub"
        ```
    </TabItem>
</Tabs>


```json title="Result"
{
 "auth_type": "private_key",
 "host": "172.33.0.13",
 "port": 2222,
 "username": "bayselonarrend",
 "key_path": "***",
 "pub_path": "./ssh_key.pub"
}
```
