Forget host key
forget_hostRemove a host's known_hosts entry to fix 'Remote host identification has changed' errors. The next connection accepts the new key while SSH config and secrets remain intact.
Instructions
Remove known_hosts entries for a host without touching the config.
For the "Remote host identification has changed" case: the next connection will accept the new key. The config and secrets are left in place.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"target": "<target>"
},
"name": "forget_host"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| target | Yes | Alias from the config (its hostname is cleaned) or the hostname/IP itself. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| target | Yes | host name used to clean known_hosts | |
| removed | Yes | entries removed | |
| known_hosts_file | Yes |