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
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);
- Bash
- CMD/Bat
oint ssh GetSettingsPrivateKey \
--host "172.33.0.13" \
--port "2222" \
--user "bayselonarrend" \
--key "***" \
--pub "https://hut.openintegrations.dev/test_data/ssh_key.pub"
oint ssh GetSettingsPrivateKey ^
--host "172.33.0.13" ^
--port "2222" ^
--user "bayselonarrend" ^
--key "***" ^
--pub "https://hut.openintegrations.dev/test_data/ssh_key.pub"
Result
{
"auth_type": "private_key",
"host": "172.33.0.13",
"port": 2222,
"username": "bayselonarrend",
"key_path": "./ssh_key",
"pub_path": "./ssh_key.pub"
}