1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-11-25 22:12:29 +02:00
Files
OpenIntegrations/docs/en/md/SSH/Common-methods/Get-settings-private-key.mdx
Vitaly the Alpaca (bot) aa10e4c564 Main build (Jenkins)
2025-10-21 11:36:43 +03:00

80 lines
2.3 KiB
Plaintext
Vendored

---
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 | ✔ | SSH host |
| Port | --port | Number | ✔ | SSH port |
| Login | --user | String | ✔ | SSH username |
| Private | --key | String | ✔ | Path to private key file |
| Public | --pub | String | ✖ | Path to public key file |
| Password | --pass | String | ✖ | Private key password (passphrase) |
Returns: Structure Of KeyAndValue - Connection configuration
<br/>
```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": "./ssh_key",
"pub_path": "./ssh_key.pub"
}
```