ssh_tail
Read the last N lines of a remote file, with optional grep filtering, for checking log files without manual SSH commands.
Instructions
Read the last N lines of a file on a remote host, optionally filtering by a grep pattern. Use this for reading log files instead of ssh_exec with manual tail/grep commands.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| host | Yes | SSH hostname or IP address | |
| port | No | SSH port (default: 22) | |
| username | No | SSH username (default: current user) | |
| privateKeyPath | No | Path to SSH private key | |
| password | No | SSH password. STRONGLY prefer key-based auth (privateKeyPath or ssh-agent). Passwords pass through MCP protocol frames as plaintext and may be logged by the transport or host process. | |
| path | Yes | Absolute path to the file to tail | |
| lines | No | Number of lines to read from the end (default: 100) | |
| grep | No | Case-insensitive pattern to filter lines | |
| timeout | No | Command timeout in milliseconds (default: 30000) |