ssh_glob
Find remote files by glob pattern over SSH, with support for wildcards, alternation, and recursive matching for precise results.
Instructions
Find remote files by name pattern over SSH — the remote counterpart of the local filename-pattern tool. Supports '', '?', '[seq]'/'[!seq]', '{a,b}' alternation, and '' for matching across multiple path segments (e.g. 'src//.ts'). A path segment starting with '.' is only matched by a pattern segment that itself starts with '.'. Enumerates under 'path' via remote find, skipping .git/.hg/.svn; matching is done locally.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | Remote base directory to search under. Default: '.' (the SSH login directory). | |
| port | No | ||
| target | Yes | OpenSSH target such as host, alias, or user@host. | |
| pattern | Yes | Glob pattern to match, relative to 'path', e.g. '**/*.ts' or '*.{ts,tsx}'. | |
| timeout | No | Local timeout in seconds. | |
| head_limit | No | Cap the number of returned matches. | |
| identity_file | No | ||
| extra_ssh_args | No | Additional ssh(1) flags passed verbatim, e.g. ["-J", "jumphost"]. Prefer the dedicated port, identity_file, and strict_host_key_checking parameters. | |
| known_hosts_file | No | ||
| strict_host_key_checking | No | Boolean or one of yes, no, ask, accept-new, off. |