SSH Configuration for Remote Host
You can use SmartAgentctl for deployments that require SSH authentication and proxy connectivity.
SSH Password Authentication
In addition to the existing private key authentication, you can use the SSH connections to support username and password authentication for environments where key-based authentication is unavailable or not required. To configure SSH using environment variable, see Configure SSH Using Environment Variable.
SSH Proxy Configuration for Remote Host
SSH connections can now route through HTTP or SOCKS5 proxies, enabling connectivity in network-restricted environments where direct SSH access is not available. To configure SSH connections through HTTP or SOCKS5 proxies, see Supported Proxy Types.
Configure SSH Using Environment Variable
Supported Proxy Types for Remote Host
HTTP Proxy
protocol:
type: ssh
auth:
username: sshuser
type: password
password: sshpass
proxy:
type: http
address: proxy.company.com:8080
username: proxyuser
password: proxypass
plaintext: false # optional, defaults to false
insecure: false # optional, defaults to false
Here, when:
plaintextis set totrue, it connects to HTTP proxy without TLS encryption.insecureis set totrue, it skips TLS certificate verification for HTTPS proxies.
SOCKS5 Proxy
protocol:
type: ssh
auth:
username: sshuser
type: privatekey
private_key_path: /path/to/key
proxy:
type: socks5
address: socks-proxy.company.com:1080
username: proxyuser
password: proxypass
Proxy Configuration
| Field | Type | Required | Description |
|---|---|---|---|
type |
string | Yes | The proxy type. The value can be http or socks5 |
address |
string | Yes | The proxy server address with port. For example, proxy.example.com:8080. |
username |
string | No | The proxy authentication username. |
password |
string | No | The proxy authentication password. |
plaintext |
boolean | No | (For HTTP proxy only) To use plain HTTP. The default value is false. |
insecure |
boolean | No | (For HTTP proxy only) To skip TLS verification. The default value is false. |
Configuration Consideration
-
addressmust include both hostname/IP and port. -
Proxy authentication (username/password) is optional for both proxy types.
-
plaintextandinsecureoptions are only valid for HTTP proxies
SSH Remote Host Configuration Examples
SSH with Password and HTTP Proxy
remote_dir: /opt/smartagent
protocol:
type: ssh
auth:
username: deployuser
type: password
password_env_var: DEPLOY_PASSWORD
proxy:
type: http
address: corporate-proxy.company.com:8080
username: proxyuser
password: proxypass
hosts:
- host: production-server-1.company.com
port: 22
- host: production-server-2.company.com
port: 2222
SSH with Private Key and SOCKS5 Proxy
remote_dir: /home/appd
protocol:
type: ssh
auth:
username: appd
type: privatekey
private_key_path: ~/.ssh/appd_deploy_key
proxy:
type: socks5
address: jump-host.company.com:1080
hosts:
- host: 10.0.1.100
- host: 10.0.1.101