ssh_conn_add_host
Store SSH host credentials and settings in a configuration file, enabling quick connections with alias support. Requires username and host; supports password or key authentication.
Instructions
Add or update a host configuration in the host configuration TOML file. This tool will fail if the host already exists in the host config file.
You can call the 'ssh_conn_connect' tool without having to add a new host! The host may already be listed in the host config TOML file!
Authentication requires either a password OR a keyfile (or both):
Password authentication: Provide
passwordKey-based authentication: Provide
keyfile(and optionallykey_passphraseif the key is encrypted)
If using key-only authentication and sudo operations are needed, you must explicitly provide
sudo_password unless the server has passwordless sudo configured.
Warn the user that credentials will be visible to the LLM and that it would be better for the user to add the host directly in the host configuration file.
The host config file is a TOML file likely in the user's home directory. The configuration will be stored under a ["user@host"] key.
Optional fields:
alias: A short name for connecting (e.g., 'prod' instead of 'deploy@production.example.com')
description: A text description of what the host is for
Returns: Dictionary with operation status
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| user | Yes | Username for authentication | |
| host | Yes | Hostname or IP address | |
| password | No | Password for authentication | |
| port | No | SSH port | |
| sudo_password | No | Password for sudo operations (defaults to regular password if not provided) | |
| alias | No | Short name for easy connection (e.g., 'prod', 'staging') | |
| description | No | Description of what this host is for | |
| keyfile | No | Path to SSH private key file (e.g., ~/.ssh/id_rsa) | |
| key_passphrase | No | Passphrase for encrypted SSH key |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||