ssh_file_read
Read text files from a remote server in one batch; unreadable files are reported with reasons instead of empty results.
Instructions
Reads text files from a server, several of them in one call. A file it could not read is named with the reason, never returned empty or cut short as if that were the content. To look for something inside logs rather than read them, ssh_log_search greps on the server.
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 |