Add host
add_hostDefine an SSH host alias and connection settings in a managed ~/.ssh/config block, so ssh works without editing the main config.
Instructions
Add a host to ~/.ssh/config via the server's managed file.
The block is written in canonical form to a separate file, wired into the main config via Include; the manual config is not rewritten. An existing managed block for the same alias is replaced; an alias described manually is taken.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| port | No | ssh port. | |
| user | No | Login user; empty — don't write User. | |
| alias | Yes | Host name for ssh (`ssh <alias>`); no spaces and no * ? # !. | |
| extra | No | Other ssh options as "Key: Value", written into the block as-is. | |
| hostname | Yes | Host address or domain name (HostName). | |
| proxy_jump | No | Alias of the jump host (ProxyJump); empty — direct connection. | |
| identity_file | No | Path to the private key (IdentityFile); empty — don't write it. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| host | Yes | the host as seen by ssh -G after writing; null — ssh -G couldn't parse it | |
| alias | Yes | ||
| config_file | Yes | managed file the Host block was written to | |
| include_added | Yes | an Include line pointing at the managed file was added to the main config |