ssh_file_read
Reads text files from a remote server in one call, handling multiple paths at once. Unreadable files are reported individually without blocking others, and binary content can be fetched safely via base64 transport.
Instructions
Reads text files from a server, several of them in one call. A file too large or not text comes back as a named failure rather than a partial file, and one unreadable path costs the others nothing. Real binary should travel over the transport instead of the command channel, which has a size limit. To look for something inside logs, ssh_log_search greps on the server rather than shipping the file here.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | One path, or a list: ["/etc/hosts", "/etc/resolv.conf"]. An unreadable file costs the list nothing — the others still come back. | |
| sudo | No | Read as root, for files the profile user cannot open. Default: false | |
| binary | No | Fetch over the transport, not the command channel; answer in base64. The safe way for non-text, implies encoding=base64. Default: false | |
| profile | Yes | Machine name. | |
| encoding | No | base64 keeps non-text bytes intact but still goes through the command channel and its size limit. Real binary -> binary below. Default: utf8 | utf8 |